OBJ file not reacting to lighting when using it’s own material

Software: Away3D 4.x

Surgery, Newbie
Posted: 04 March 2014 07:34 PM   Total Posts: 3

So, I have an OBJ file I’m loading in, and when I use a ColorMaterial made in code, it has shading and all that good stuff, but when I just let it use the material in it’s MTL file, there is no shading, only flat color. If it makes a difference, there is no bitmap file associated with this material, just a color. Also, the obj file was exported from 3DS max, and the material is a Blinn material. I’m trying to apply the lighting just with this:

tMesh.material.lightPicker _lightPicker 

_lightPicker is good, it’s the same LightPicker I use when applying the ColorMaterial made in code. Is there a special setting I should be using when exporting? Or when importing? Thanks.

   

Avatar
theMightyAtom, Sr. Member
Posted: 04 March 2014 07:55 PM   Total Posts: 669   [ # 1 ]

Are you using the OBJ exporter that ships with MAX?
You may be missing normals…

   

Surgery, Newbie
Posted: 04 March 2014 08:27 PM   Total Posts: 3   [ # 2 ]

I am. Did some more testing and it appears to work fine if you have a bitmap attached to the material. So our solution for now is to just use solid color texture bitmaps, but it would be great if we didn’t have to do that, since it adds another (albeit small) step to the workflow.

   

Avatar
theMightyAtom, Sr. Member
Posted: 05 March 2014 06:34 AM   Total Posts: 669   [ # 3 ]

Get the obj exporter from Guruware. It will export normals even without a map applied. http://www.guruware.at/main/objio/

Good Luck!

   

Surgery, Newbie
Posted: 05 March 2014 03:21 PM   Total Posts: 3   [ # 4 ]

Thanks, I’ll give it a shot.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X