I see that there is a GLIsoSurface unit in GLScene now. I would like to try this out but there are no demos for it. Does anyone have an example / demo of how it can be used?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi DaveW,
Look at IsosurfaceCube example in branches. Read notes in project source file. Compile, open SampleCube.vol file and select one of two algorithms for visualizing isosurface like marching tetrahedra or marching cubes.
PW
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the demo, however it did not really help me - all it shows a cube and as the VOL only has values of 128 or 225 there did not seem to be any way to really show a change in the IsoSurface.
So I have had a go at modifying the demo to make it a bit more interesting. I changed the code to generate a sphere at the center of the volume. The sphere is densest at the center and 'thins out' towards the edges. So as you change the Isovalue, the size of the sphere changes as well.
This works except that I see the inside of the sphere - presumably it is being drawn 'inside-out'. If I change the code to generate zero at the center and increasing outwards then I see the outside of a sphere but it's surrounded by the inside of a box.
Do you have any suggestions on how I can get just the sphere to be solid?
The sphere is densest at the center and 'thins out' towards the edges. So as you change the Isovalue, the size of the sphere changes as well
...............
Well done, but there is a message "Cannot create file ff.glsm". Wrong path.
And use filling polygons in material of the freeform.
PW
Last edit: Pavel Vassiliev 2015-10-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oops! The wrong path was some testing I was doing....
I have made some changes to make it a bit more interesting:
- I got the 'outside'of the sphere to show by adding the vertices in reverse order.
- Added the option of having multiple, randomly placed, spheres.
- Cleaned the code up and changed the edit boxes to trackbars to limit ranges and make it easier to use.
I must say that the marching tetrahedra method seems to produce much poorer results than the marching cubes.
I would like to find out how to color the isosurface - or even better the triangles/vertices that make up the surface - but that is a different subject for another day!
I see that there is a GLIsoSurface unit in GLScene now. I would like to try this out but there are no demos for it. Does anyone have an example / demo of how it can be used?
As far as I know Sergio has made a demo for that, look for Sergio's post in that discussion group.
Hi DaveW,
Look at IsosurfaceCube example in branches. Read notes in project source file. Compile, open SampleCube.vol file and select one of two algorithms for visualizing isosurface like marching tetrahedra or marching cubes.
PW
Hi Pavel,
Thank you for the demo, however it did not really help me - all it shows a cube and as the VOL only has values of 128 or 225 there did not seem to be any way to really show a change in the IsoSurface.
So I have had a go at modifying the demo to make it a bit more interesting. I changed the code to generate a sphere at the center of the volume. The sphere is densest at the center and 'thins out' towards the edges. So as you change the Isovalue, the size of the sphere changes as well.
This works except that I see the inside of the sphere - presumably it is being drawn 'inside-out'. If I change the code to generate zero at the center and increasing outwards then I see the outside of a sphere but it's surrounded by the inside of a box.
Do you have any suggestions on how I can get just the sphere to be solid?
I have attached the project code.
DaveW
DaveW,
The sphere is densest at the center and 'thins out' towards the edges. So as you change the Isovalue, the size of the sphere changes as well
...............
Well done, but there is a message "Cannot create file ff.glsm". Wrong path.
And use filling polygons in material of the freeform.
PW
Last edit: Pavel Vassiliev 2015-10-30
Hi Pavel,
Oops! The wrong path was some testing I was doing....
I have made some changes to make it a bit more interesting:
- I got the 'outside'of the sphere to show by adding the vertices in reverse order.
- Added the option of having multiple, randomly placed, spheres.
- Cleaned the code up and changed the edit boxes to trackbars to limit ranges and make it easier to use.
I must say that the marching tetrahedra method seems to produce much poorer results than the marching cubes.
I would like to find out how to color the isosurface - or even better the triangles/vertices that make up the surface - but that is a different subject for another day!
DaveW
Last edit: DaveW 2015-10-30