Skip to main content

.obj files

2 replies [Last post]
cooljprince
Offline
Joined: 2007-09-07
Points: 0

Hello,

How come when i load up my .obj file in java 3d it loads up with no color? Is there any other type of file that java can load up and it will display the color?

thanks very much.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jon987
Offline
Joined: 2007-09-18
Points: 0

> Hello,
>
> How come when i load up my .obj file in java 3d it
> loads up with no color? Is there any other type of
> file that java can load up and it will display the
> color?
>
> thanks very much.

This is the best way I've found: Download a program called [b]AccuTrans3D[/b], load your model into it, mess about with the colours(yes, I'm British) and even textures if you want, and then save it as a new .obj file. Java should then be fine with loading the object into a scene with all it's material attributes applied.

Here's a tip though: I've found that the objects always appear too bright so, if you think you have the same problem, make sure you 1) turn down shininess to 1.0 and 2) set specular colour to black(seems stupid I know).

puybaret
Offline
Joined: 2004-12-04
Points: 0

The easiest way to add colors to an .obj file is to add usemtl lines in it.
Please see the message https://sourceforge.net/forum/message.php?msg_id=4565941 for detailed instructions.