Hacker News new | ask | show | jobs
by TylerE 2244 days ago
That’s the beauty of CSG though... it’s volumetric, not surface based
2 comments

How would that make it easier to work with?
You can do things like take shape A and then subtract shape B from it and all works, no matter how complex the intersection.
That is what it is, but how does it make any of the other parts of 3D easier? How would deforming it be easier than surface geometry for instance?
One major problem with surfaces is calculating which side is facing out. This is actually much harder than it sounds. CSG doesn't have this problem because it knows inside vs outside.
That is almost never a problem. It has to do with winding order and the only time you need to pay attention to it is when creating polygons from some sort of other data like lidar. Even then any groups of connected polygons can be made to have consistent normals.

Why do you think that is difficult? I think your attachment to csg might be wishful thinking, you still have to get arbitrary shapes out of primitives, work with deformations, figure out textures etc.

I'm not sure what you are trying to say here, constructive solid geometry does not solve any of the problems I mentioned and would have to be treated specially to be raytraced (while being likely being much slower).

Converting it to polygons at a modeling or effects stage is workable but rendering it directly is unlikely to be widely valuable any more.

There is no need to "subdivide" because the exact volume of the object can be calculated exactly to any arbitrary detail.
And what do you subdivide it to? How do you trace rays against it? How do you map textures on to it? How do you visualize it in real time? How do you work with it in a different program?
You don't subdivide. It's a mathematical intersection.
Right, but the rest of the questions remain, along with the usefulness of CSG in real scenarios. CSG can be interesting, but it does end up being very impractical for anything except for some specific effects that are then turned into polygons. It is technically possible to create sdfs and trace against those I'm sure, but csg is rarely used and baking it to sdf instead of polygons even more so.
POV-Ray disagrees. It renders CSG. It never converts to polygons. So stop saying what a 30 year old program does is "impossible".