www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: penprakash on September 05, 2013, 03:00:19 pm

Title: when i load obj file without mtl definition
Post by: penprakash on September 05, 2013, 03:00:19 pm
Hi,

  I'm loading obj file which is not having mtl definition in android, it rendered 3d model colored with white. But when i render same obj model in IOS it renders 3d model with gray color. what could be the problem?. Should i add any properties for the 3d model?

Prakash V
Title: Re: when i load obj file without mtl definition
Post by: EgonOlsen on September 05, 2013, 05:16:23 pm
I don't see any problem. The obj file has no color information. If some others renderer renders that in gray, then so be it. So can try setAdditionalColor on the object or give it a small gray  texture.
Title: Re: when i load obj file without mtl definition
Post by: penprakash on September 05, 2013, 05:37:56 pm
It doesn't have any texture information and i applied the additional color as

model.setAdditionalColor(new RGBColor(190, 190, 190));

but, still it is displaying in white color.

Prakash V
Title: Re: when i load obj file without mtl definition
Post by: EgonOlsen on September 05, 2013, 06:15:21 pm
An additional color has no effect if the ambient color is white already. That's caused by the way in which GL's lighting pipeline works. It doesn't matter if the model has texturing information or not, you can assign a small colored texture anyway. The Texture class has a constructor to create such things.