Real-time CSG

Started by
13 comments, last by Hybrid 20 years, 3 months ago
I wonder if it could be sped up by somehow optimizing the process for pure CSG subtraction? It''s not often that we''re constructing things in our games

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Advertisement
Yeah, there are some simple but effective optimisations for pure subtraction, particularly the classification of the polygons during the splitting.

Technically, if you know the object being subtracted is made up of one connected mesh (floating geometry has been dealt with) then you can get rid of the ray classification part of things, since you know, that if a rocket hit an object, then it must have hit geometry, so if no intersections occur during the CSG, then you know the mesh is ''inside'' the explosion mesh, so completely delete the object.

Thats just one of a number of small things I''ve spotted.
Yeah, but obviously with that it requires that you''ve split the world mesh up into non-exploded/exploded pieces beforehand (see your other thread ).

I''m just wondering if the format of the data, specifically, could be optimized for deletion.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Yeah, my world is made up of two main types of objects - deformable and non-deformable. It isn''t made out of one large world mesh, but separate objects e.g. a house or pillar.

I know you mean optimise the data for CSG deletion, however, I believe that the data must have the same sort of flexibility and structure as any other CSG type - union etc. Because not only do you have to delete geometry, but you must also insert new geometry when splitting triangles - and this is the same in all CSG cases. It''s only the classification of triangles that determines what you keep and delete.

I haven''t found any really good data optimisations for deletion so far anyway
Theres this doc on Red Faction''s GeoMod engine. I''m sure I read a much more detailed one a while back but don''t know where it is (possibly Gamasutra?).

[S-Type] [V-Script]

This topic is closed to new replies.

Advertisement