|
|
> "Kene"<nomail@nomail> wrote:
>> I am creating a tool for modeling architecture/building information in
>> POV-Ray SDL. I am implementing the ability for the walls to clean up (form a
>> clean connection regardless of angle) with each other.
>>
>> I am currently using planes and although it is still too early to notice memory
>> problems I was wondering if this is the right direction. The building walls are
>> mainly made of boxes while the floors (most parts) are made of prisms. As you
>> can imagine there will potentially be a lot of instances for this use (i.e.
>> clean up).
>>
>> I have not tried triangles (I have read so much about it being efficient) but I
>> have read so much too about it not being so stable for CSG operations.
>>
>> Any insight on this from anyone?
>
> I have realized that a merge does this work well enough with some recalculation
> to get the new intersections. This seems to make more sense at this point.
>
>
Unless you are working with transparent walls that have
intersecting/overlaping parts and you need to remove the internal faces,
use union instead of merge. It's much faster. With an union, you only
test for the components that occupy a given, limited, area. With a
merge, you always have to test for every components.
If you create all your walls with a corner aligned to a reference plane
(one edge with a zero coordinate) and you rotate them to the desired
orientation then translate to the desired location, it's easy to have
them join cleanly.
If you use triangle, they don't have an interior. You can't use them to
remove something from something else. You can chop bits from it. You can
definetly union them with anything.
You can combine many triangles into a mesh, and it can have a definite
interior, you just need to add an "inside" vector. That way, it can be
used in CSG without any problem. If you have many walls all defined
using the same mesh, the mesh will reside in memory only once and will
be referenced as needed with some transformations. Meshes also render
fast, but a box is one of the most effecient primitive regarding
rendering speed.
When you mention "a lot of instances", you think of what order of
magnitude? POV-Ray can easily handle 100000's, or even millions,
individualy textured boxes in a single scene, plus 100's of different
prisms.
Alain
Post a reply to this message
|
|