CHAI3DCHAI3D

normal rendering two voxel objects

More
23 Feb 2017 13:27 #1

I have created two voxel objects out of seperate imageStacks. So each Voxel object has its own image and texture data. These objects are rendered with renderingModeIsosurfaceMaterial.

object1 is in the background and is created at first.
object2 is in the foreground and is created next.

When i rotate the camera around my objects the background object1 should move in the front and the object2 in the back. But im my case object1 stays in the background and object2 in the foreground. The boundary boxes of both objects are at the desired position! When i create cMeshObjects cubes this problem do not appear.

Is there any simple solution i can#t see right now?

Update:
I think the problem is due to the texture of the cVoxelobject. The texture and rendered object do not lie on top of each other when i use the function setLocalPos for the object. But how can i fix this?

Please Log in or Create an account to join the conversation.

More
02 Mar 2017 17:14 #2

Please disable transparency for both objects by calling:

object1->setUseTransparency(false);
object2->setUseTransparency(false);

Please Log in or Create an account to join the conversation.

More
06 Mar 2017 09:24 #3

perfectly solved my problem. thanks!

Please Log in or Create an account to join the conversation.