3 ms·
That’s the beauty of CSG though... it’s volumetric, not surface based
by TylerE 7y ago
That’s the beauty of CSG though... it’s volumetric, not surface based
- BubRoss 7y agoI'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.
- TylerE 7y agoThere is no need to "subdivide" because the exact volume of the object can be calculated exactly to any arbitrary detail.
- BubRoss 7y agoAnd 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?
- TylerE 7y agoYou don't subdivide. It's a mathematical intersection.
- BubRoss 7y agoRight, 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.
- TylerE 7y agoPOV-Ray disagrees. It renders CSG. It never converts to polygons. So stop saying what a 30 year old program does is "impossible".
- BubRoss 7y agoI didn't say it was impossible, I'm talking about why these other geometry types aren't typically used instead of polygons. I asked 'how do you trace rays against it' because to do it directly is not fast, yet you are left with all the problems I stated that you skipped over. Think about what it would take to directly trace lots of overlapping primitives. What you gain from tracing it directly is minimal and what you give up is substantial.
- TylerE 7y agoLook at the POV-Ray source code. It does it. Again, I am literally telling you how the software under discussion works. and you keep insisting it is not so. It's open source!
- BubRoss 7y agoI'm guessing at this point you are purposely ignoring what I'm saying, but again, I'm explaining why it isn't used in production 3D very often. I know how to collide rays with csg, I'm trying to get you to think about how that needs to happen so you understand why it is slow. If you have a surface made up of lots of overlapping primitive shapes, what do you think the performance will be like when you need to intersect thousands of rays and figure out shading information for them? Beyond that, again, you have to confront textures, motion blur, visualization and of course the elephant in the room, the fact that csg is not a good tool for arbitrary modeling to say the least. Think about these things before you reply "it's literally possible" again. Technically possible and useful for production animation are two very different things.
- kragen 7y agoPOV-Ray is not yet open source, although the remaining authors hope to be able to solve that problem soon. (Its license contains a field-of-use restriction.) Also, I don't think BubRoss was claiming that rendering CSG directly was impossible, just that it's a bad tradeoff.
- CyberDildonics 7y agoHow would that make it easier to work with?
- TylerE 7y agoYou can do things like take shape A and then subtract shape B from it and all works, no matter how complex the intersection.
- CyberDildonics 7y agoThat 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?
- TylerE 7y agoOne 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.
- CyberDildonics 7y agoThat 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.