Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 4
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 5570 times and has 3 replies Next Thread
npi
Newbie




Joined: Jan 29, 2010
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
confused Missing texture coordinates in MTL file lead to blurry textures?

Hi all,

I am currently developing an application which renders 3D models exported from Sweet Home 3D using Java3D.

The models are exported as obj / mtl file. The model itself looks OK within my own application. However, as described in this thread thread in the Java3D forum, most textures are rendered blurry allthough the exported image files look OK.

A commentor in my Java 3D forum thread mentioned the idea, that the blurryness may come from missing texture coordinates within the exported MTL file. This idea makes sense to me especially since I can improvove the texture rendering result by making some manual transformations (allthough I was not able to reach a result even similar to what SH3D can do).

Therefore, my question is: Is there any possibility to export texture coordinates from SH3D or does anyone have another solution to the mentioned problem?

Sincerely,
Thomas
[Jun 12, 2013, 9:08:56 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Missing texture coordinates in MTL file lead to blurry textures?

Is your OBJ/MTL model correctly rendered when you reimport it in Sweet Home 3D or in another 3D software like Blender?
Did you try to load it with com.eteks.sweethome3d.j3d.OBJLoader class, the OBJ loader I developed for Sweet Home 3D? Actually, I developed it because Java 3D com.sun.j3d.loaders.objectfile.ObjectFile class had some issues in texture coordinates and transparency management. Even I also needed a few other things for Sweet Home 3D, I managed to keep OBJLoader class independent from other Sweet Home 3D classes, except the small OBJMaterial class.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 12, 2013, 9:56:44 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
npi
Newbie




Joined: Jan 29, 2010
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Re: Missing texture coordinates in MTL file lead to blurry textures?

Hi Emmanuel,

first, thanks for the quick reply!

Regarding your questions and hints:

Is your OBJ/MTL model correctly rendered when you reimport it in Sweet Home 3D or in another 3D software like Blender?

I was not able to find a menu option to import an obj-file into SH3D. Do I miss something or do you refer to programmatically loading a file using the libraries of SH3d? I also tried Blender but my notebook has not enough performance to load my current model in the program - actually, I wanted to create a simpler model to try the import but didn't do it yet.

id you try to load it with com.eteks.sweethome3d.j3d.OBJLoader class, the OBJ loader I developed for Sweet Home 3D?

No, I was not aware of this class but just tried it. The model loads and I assume it may look better regarding the textures. However, the viewpoint is zoomed to maximum into an object and I am not able to zoom out enough to see the whole model. The problem may be, that I use the RESIZE flag and the radiens param of the class com.sun.j3d.loaders.objectfile.ObjectFile when loading the obj using pure Java3D. I could not find those params in your class. Could you provide a hint how to change the viewport or resize the model?

Thanks in advance, seem to be close to a solution!
[Jun 12, 2013, 11:18:03 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Missing texture coordinates in MTL file lead to blurry textures?

I was not able to find a menu option to import an obj-file into SH3D.
Drag and drop the OBJ file onto the plan, or use the furniture import wizard displayed by Furniture > Import Furniture menu item.

However, the viewpoint is zoomed to maximum into an object and I am not able to zoom out enough to see the whole model. The problem may be, that I use the RESIZE flag and the radiens param of the class com.sun.j3d.loaders.objectfile.ObjectFile when loading the obj using pure Java3D. I could not find those params in your class. Could you provide a hint how to change the viewport or resize the model?
As the RESIZE flag isn't supported by OBJLoader class, just add a TransformGroup instance that will resize the loaded model. Have a look to ModelManager#getNormalizedTransform method if you look for a way to get the right transformation.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 12, 2013, 11:27:47 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved