i want to do an interactive “scanning tool” for 3D models. there fore i try to do two things:
1) Already solved: https://discourse.vvvv.org/t/8352 (comparable to Cinema4D’s boole object).
2) ToDo: Highlighting the intersection’s shape and outline, as shown in the illustration.
I already built some stuff, resulting in this:
But there are several problems:
The cross-section’s/intersection’s shape will never be exact as it depends on the amount of intersection lines (approximation). In the Screenshot there are used 11 lines resulting in 22 points, which is too little.
the intersection-node crashes from time to time, while transforming the lines.
Generating the shape only works if there is only one graphical intersection. Otherwise i wouldn’t know how to assign the points to the different shapes.
Isn’t there any pre-built shader doing that?
This patch belongs to the added screenshot. (30.2 kB)
I now combined both two patches, so that you can image what i intend to do better.
The problems are the same, it’s just for better explaining…
i would like to promote this site here:
look for GoochShadingCutThrough.fx.
i’m already using this shader for the boole-object and it works fine (please have a look at the link i posted at the beginning of the thread).
Can i also use it for the inersection’s shape?
The boole object still works fine. The task is still to generate the shape of the cross-section/intersection between the 3D model and the plane.
I dont believe the Intersect (EX9.Geometry Mesh)-node will work for this task, because:
- the intersect-node causes vvvv to crash once i use a big amount of rays/lines and a complex 3D model.
- it’s very hard to generate the “correct” intersection’s shape out of the point cloud (screenshots above). I would need some kind of 3D point cloud processing algorithm, like http://pointclouds.org/, which seems to be overdone for this task.
The only way i can think of to perform this task well is to write a shader or a new intersect-node using a plane instead of a ray.
What do you think?