when i load obj file without mtl definition

Started by penprakash, September 05, 2013, 03:00:19 PM

Previous topic - Next topic

penprakash

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

EgonOlsen

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.

penprakash

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

EgonOlsen

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.