CHAI3DCHAI3D

normal IsoSurfaceValue

More
21 Feb 2017 08:55 #1

Hi there,

i created out of a stack of images a cVoxelModel, where i use my image data for the texture.
In my image i can find two objects with a different grey level. Now i want to create two objects, which have both the same texture, but in rendering with IsoSurfaceMaterial i want seperated objects.

for example Object1 is rendered with the isoValue of 0.7 (object1->setIsosurfaceValue(0.7);)
and the object2 with isoValue= 0.2. Here in the object2 i will get not one object rendered. Because all over the isovalue of 0.2 also is rendered.

So is there a possibility to set an threshold for the Isovalue? Thanks

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

More
21 Feb 2017 14:19 #2

The easiest way would be to modify the shader directly.
In the following files:

resources/CShaderIsosurface-L8.h
resources/CShaderIsosurface-RGBA8.h
resources/CShaderIsosurfaceColor-L8.h
resources/CShaderIsosurfaceColor-RGBA8.h
simply modify the following line:
if (intensity > uIsosurface)
with:
if (intensity > uIsosurface)
You could also extend the framework to include lower and upper threshold values.

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

More
22 Feb 2017 08:52 #3

Helped me a lot! Thx

But the second line has to be

if (intensity == uIsosurface)

for me.

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