Jump to content
  • Advertisement
Sign in to follow this  
pammatt

CSG - Additive space vs. substractive

This topic is 4902 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, I'm preparing to work on some CSG code for a level editor in progress. I am not sure which route I want to go. Subtractive space (UnrealEd) or additive space. (Doom3, Quake3, etc.). I've been trying to determine the pros and cons for each approach but have been having trouble doing so. I was hoping to get some feedback from you guys as to the pros and cons of using each approach for buildings world geometry using the typical brush building techniques. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Subtractive CSG isn't vulnerable to leaks in the same way as positive CSG, but it tends to be harder for artists to visualise (building spaces instead of geometry).

Share this post


Link to post
Share on other sites
I've always found subtractive space to be more intuitive for myself. It's like carving a level out of stone, instead of building it in empty space.

Superpig lists the main advantage, in that it doesn't leak (as anything outside of the defined area is solid by definition).

I'd say go with Subtractive Space.

Share this post


Link to post
Share on other sites
Hey guys, thanks for the replies. The problem that one of my co-workers thinks that using subtractive space will not work will with the other parts of the level. For example, we can add terrain (DTED data for example) which can span for miles. We cannot enclose that sort of data in a big brush as you would when creating terrain in UnrealEd for instance. My thoughts are that you can seperate the CSG portion of the world from the other parts, implying that you wouldn't have to carve out a spot in the world for the terrain. Is this correct?

Share this post


Link to post
Share on other sites
That's probably correct, but it depends on your software. If you're going to do something like seperate indoor and outdoor areas using portals, then sure - hand-place the portals connecting to the outside world into the CSG-built section (maybe using a special texture or something), and on the outside, have a regular 'shell' mesh for the building with openings corresponding to where the portals are. As long as the portals match up (and they don't even have to be correct in relation to each other - tardis rooms are easy) you could build the two parts completely seperately.

Share this post


Link to post
Share on other sites
Quote:

hand-place the portals connecting to the outside world into the CSG-built section (maybe using a special texture or something), and on the outside, have a regular 'shell' mesh for the building with openings corresponding to where the portals are


Great! That is my planned approach in response to my co-workers concerns. That does however, bring up another quick question. Given the work that would be required, i.e. adding the static mesh shell, hand placing portals, etc. do you think it is still worth it?

Thanks again.

Share this post


Link to post
Share on other sites
What do you mean? I don't understand exactly why you say this.

Quake3 uses subtraction and in the map it than adds (unions) brushes togethor. I don't understand what you mean by subtractive and additive space. I never used UnrealEd but I can't see how you can make a level by union, it would be a pain in the neck to do this. Do you mean in Unreal add you add, and the compile thean subtracts? I can't visualize how that would work.

Maybe I don't get what you mean by these terms?

Share this post


Link to post
Share on other sites
By additive, I mean to create a room in quake3 you basically have to build each of the 6 sides of the room. (ok, you can use the hollow method but you still have to go back and fix the walls so you don't have Z-fighting. Now, when you are outside of the room you see the outter walls. They are there and there is actually solid walls.

With Unreal, to create a new room, merely position your builder brush, (a solid cube for all intents and purposes), hit subtract and you have your room. The room only consists of the 6 faces that make up the inside of the room.

In other words, subtractive space means that the world in essentially one big solid cube that you carve out to create your level. Additive space implies that you have nothingness that you add to in order to build your level.

Take a look at Unreal3d sometime. I personally like it alot.

Share this post


Link to post
Share on other sites
Quote:
Original post by pammatt
Great! That is my planned approach in response to my co-workers concerns. That does however, bring up another quick question. Given the work that would be required, i.e. adding the static mesh shell, hand placing portals, etc. do you think it is still worth it?
Sure. Seperating the shell from the internals will also make it easier to do things like LOD from a distance (probably turning the portals into polygons textured with images that look like the insides). It may be worth investing in some tools to keep the portals synchronised, but it's not even necessary - a simple XML file mapping portal IDs to polygon IDs will do the job.

Share this post


Link to post
Share on other sites
Ahh I see. I was confusing how you meant it with the actual implementation.

Hmm. I never did much level editing, I found GTK Radiant to be a royal pain in the ass and always used 3DS Max for my levels. I try to stay away from CSG because it is a pain to do it right (without fracturing the mesh severely with weird splits).

Since I don't use a BSP engine I don't have many problems this way and I solve my visibility manually :-)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!