Page 1 of 1

Wrong node rotation when using addOctreeSceneNode

Posted: Mon Aug 28, 2017 4:42 pm
by mant
I have a box with a missing face.
The right rotation is that the missing face points to the camera (like the second image in link)
But when using octree scene node it seems that the missing face points up

How can I investigate the problem further?
http://imgur.com/a/aOOMt

Re: Wrong node rotation when using addOctreeSceneNode

Posted: Mon Aug 28, 2017 4:54 pm
by CuteAlien
You could disable culling for a test. I'd be surprised if the reason for this really has to do anything with the octree.

Re: Wrong node rotation when using addOctreeSceneNode

Posted: Mon Aug 28, 2017 6:13 pm
by mant
With setAutomaticCulling(EAC_OFF); it still affects the rotation of the node that I call addOctreeSceneNode for.

Re: Wrong node rotation when using addOctreeSceneNode

Posted: Mon Aug 28, 2017 10:54 pm
by CuteAlien
Ah sorry, I was just reading about "missing face". Wrong rotation - uhm, no clue. Do you have some short code we can compile to reproduce this?

Re: Wrong node rotation when using addOctreeSceneNode

Posted: Tue Aug 29, 2017 3:42 am
by mant
Code and model: https://drive.google.com/open?id=0BxGL1 ... EIxRDF1Szg

You have to move the camera a little bit to detect the correct missing face of the original mesh
http://imgur.com/a/LHT1s

Re: Wrong node rotation when using addOctreeSceneNode

Posted: Tue Aug 29, 2017 7:45 pm
by CuteAlien
Normals of box.x point in the wrong direction. Normals have to go towards the outside if you want to look at the box from the outside. Alternatively you could disable backface culling (not recommended, always better to fix the model).

Re: Wrong node rotation when using addOctreeSceneNode

Posted: Wed Aug 30, 2017 9:24 pm
by mant
Yeah I flipped the normals since I wanted to look from the inside, like a room. Still wondering why the octree rotated my node though ...
It indeed rotates my node around x axis 90 degrees, on every octree node I create, even with the small cube with correct normals.
Have any chances that something's off with .x format specially?
Right now I have to check if a node is octree and subtract it's rotation, like rot.x-90

Re: Wrong node rotation when using addOctreeSceneNode

Posted: Wed Aug 30, 2017 10:21 pm
by CuteAlien
Hm, didn't notice that, guess I'd have to check again. Did you compare octree to using node with just meshnode?

Re: Wrong node rotation when using addOctreeSceneNode

Posted: Wed Aug 30, 2017 11:39 pm
by mant
My scene has multiple nodes, only the octree ones are rotated somehow. Other nodes with different type are OK.
But really, if this has problem, someone must have reported before,... I'm doubting my meshes now, will check the Blender export plugin.