Spatial Light Shading

Hello



First i wanted to say that i just started with jME but i really like the way things are handled. Finally an object oriented way of doing 3d with style!



Now as impressed i am i already have a problem :slight_smile: In the case someone else might already have answered that and i just didn't find it - sorry i'm a 3d noob and have really no clue what is wrong (also i searched already).



My Problem is that light that falls onto a spatial (i loaded from a blender exporeted .obj. also tried .3ds - no dif) seems to have way too much contrast. Its either really bright or dark. When it rotates it switches from dark to bright without gray scale. While the other object (a Sphere created with jme sphere) is rendered completly normal including texture mapping. I set the material (setRenderState) to both objects exactly the same. They are on the same node which is rotating.



I really could need some help here.

Thanks in advance!



regards,

s42



PS:

I work on Mac OSX Snowleopard JME 2 from CVS checked out today.

Please tell me if my question is really stupid or for what i should search for if this is a already answered question. I already read all the docs about light i could find, but still i might not really get how jme does shading. I guessed that it is something simple because i just tried to load a basic model into an empty space with one light. If it is too difficult to tell without code please let me know. I would also appreciate a link to a simple example of loading a blender object into jme with one light or some sort of realistic shading at least. It's kinda urgent for me  :smiley:

Looks like the model exported is missing both correct normals and UV (if the blue thing is a texture).

Check the model in Blender to make sure those things are fine.

That would make a lot of sense i guess but as i 3d noob i don't really understand how i define uv and normals in blender - or at least i don't get any changes to the better :frowning: Could you maybe send me an .obj or .3ds with correct normals and uvs? I managed that the texture is placed more like i want it but the light is still over contrasted. Is that a problem with normals? The only thing i can do in blender is recalculate normals, right?



Thanks for your help!

or can i let jme do normals? i would prefere if the triangles would get smoothed rather than edgy style.

Ok i just exported it to OBJ and it looks much better!!  :-o but the the different triangles are still not smoothed (one brightness level per triangle - no gradient).



Any ideas?



I guess 3ds is not well supported. What format would you choose? (Blender is my 3d editor)

Go to Editing (F9) and then click on the button that says "Set Smooth".

When exporting to OBJ, check these settings: Triangulate, Materials, UVs, Normals, HQ

THANK YOU!



To state obvious; it works now! Still got some flickering around the blender sphere but i guess i can fix that in blender somehow. Is there some tutorial or book you would suggest? It seems i just don't understand all the details of 3d good enough to make a cool solution yet. (Thanks for not rtfm ing me :slight_smile:

s42 said:

THANK YOU!

To state obvious; it works now! Still got some flickering around the blender sphere but i guess i can fix that in blender somehow. Is there some tutorial or book you would suggest? It seems i just don't understand all the details of 3d good enough to make a cool solution yet. (Thanks for not rtfm ing me :)

I would recommend getting a book or reading a wiki about Blender. That's all there's to it really.
And don't forget that a model might look fine in Blender but look wrong in a real-time engine like jME, there are some "nuances" that need to be considered when making models for game engines.
Momoko_Fan said:
Go to Editing (F9) and then click on the button that says "Set Smooth".
When exporting to OBJ, check these settings: Triangulate, Materials, UVs, Normals, HQ

I had the same problem and forgot to export some settings. Now it works.