Strange shadows using NormalGenerator from java3d

Hi guys, i am working in the translation of an application done in looking glass and java3d to jME. the whole thing its ok, a lot of work but its ok. However im spending a lot of time trying to solve a problem which is driving me crazy. i will tell you a little about it. im creating 3d geometric shapes from a strange “.sur” file which contains the geometric information  saved as QUAD (quad of java3d not jME), using indexs and vertexs. i passed that information to triangles “on the fly” in that way: the points of the quad are for example 0,1,2,3 then i make a triangle with the points 0,1,2 and other with the points 0,2,3. this work fine but when im trying to put normals to the figures something strange happens: appears shadows and bands. im using a normalgenerator taken from java3d. so i will post the screenshots so if someone have an idea of what its happening here or had a similar problem, tell me please! :slight_smile:

the first image is with a creaseAngle of 0 and the second too but changing the order of the cross product (note the change in the bands order)

the last image has a creaseAngle of 0.7f.


Hmm, not sure…  Is the generator similar to the one in com.jme.util.geom?  We do support Quads as well so I suppose you could try just keeping it in QuadMesh form.

ohh i didnt see the class QuadMesh, because im working with jme 1.0. may be the real problem here is that i started this project when jME 2.0 didn't exist, a few weeks ago i tried to use jme 2.0 but i got some errors so i continued with jme 1.0. so i think it would be better to jump to jme 2.0 isnt it ?


Might make sense…  Let us know the errors too if you still get them.  Things should be pretty solid though.

Thanks renanse for the help, yesterday i prove with jme2 again, i only  had to change few things related with alphastate and batchs, i thought it would be harder but not. Then i proved with quad, however the normalgenerator  i found only supports TriMesh, so i returned to the idea of splitting the quad into two triangules and it works ok with the normalgenerator of jme!

If i had posted in the forum before i would have saved a lot of time!  :D.

thanks people and long life to the forum and jme !  :mrgreen:

Glad it all ended up ok.  :slight_smile: