Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
when i load obj file without mtl definition
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: when i load obj file without mtl definition (Read 2047 times)
penprakash
byte
Posts: 26
when i load obj file without mtl definition
«
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
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: when i load obj file without mtl definition
«
Reply #1 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.
Logged
penprakash
byte
Posts: 26
Re: when i load obj file without mtl definition
«
Reply #2 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
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: when i load obj file without mtl definition
«
Reply #3 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.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
when i load obj file without mtl definition