Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 25th March 2004, 03:05 PM   #1
wsimike
Junior Member
Member
 
Join Date: Mar 2004
Posts: 22
Default CSG Editing...

Hello all,

I'd posted this question in another thread, but it was a bit off-topic, so I though it'd be better to ask it in its own.

Basically, when ever I hear or see "Constructive Solid Geometry" editing, or CSG-based editing.. I think of the Unreal Editor which, to me, is the most efficient and logical game level editor I've ever used - from Unreal 1 all the way up through UT2004. The thing is, UEd was the first editor of its kind (that I'm aware of) to ever take the approach they did to level editing.. using CSG to allow people to quickly carve out rooms, hallways, windows, doorways, etc from a "solid mass", and then just as quickly lay in things like pillars, stairs, etc. The whole approach used by most Quake editors, starting from an "empty space" and having to build everything "brick-by-brick" so to speak has never made sense to me and always felt like way too much work.

In any case, that said, I'm wondering how the CSG plug-in works for AC3D? I don't imagine it has the same "carving" method of working, necessarily, as UEd, where you "subtract" a mesh to create the room, which is basically a contiguous mesh with all its normals facing in. But, if it's even half as intuitive as I find editing in UEd to be, then I'd most definitely be willing to pull out my wallet right now and buy a full license.

Can anyone provide some insight to how the CSG functionality works in AC3D?

Thanks!
Mike
wsimike is offline   Reply With Quote
Old 25th March 2004, 03:21 PM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: CSG Editing...

Hi Mike,

have a look at this:

Boolean ops

That illustrates what you can do.

Using boolean operations is not always the best way to make shapes in 3D e.g. to make a door shaped hole in a wall, it may be more efficient to create a 2D wall and then extrude it into 3D. This keeps the number of polygons down. However there are some shapes that you must use the boolean ops to create and the pictures on the page above show some.

For Boolean ops to work well in AC3D, the normals in AC3D should be pointing outwards (press 'n' to check), and a 3D object should be 'closed' i.e. no holes in it.


Andy
Andy is offline   Reply With Quote
Old 25th March 2004, 04:39 PM   #3
wsimike
Junior Member
Member
 
Join Date: Mar 2004
Posts: 22
Default Re: CSG Editing...

Thanks for the reply!

Okay, so basically, you're limited to Intersect or Subtract operations, then? No Add? Hmm.. that's a bit of a concern.

Question..
In this screenshot:
http://ac3d.org/images/screens/quake3.jpg

What methods would likely have been used to create that level? I was under the impression that some amount of Add or Subtract booleans could have been used to create more of the intricate portions...

Also, I realize that all the normals/faces are facing out, which I imagine would have to be flipped inwards to make it a playable level...

Thanks again :-)
wsimike is offline   Reply With Quote
Old 25th March 2004, 07:06 PM   #4
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default Re: CSG Editing...

Quote:
Originally Posted by wsimike
No Add?
Actually there is a Union operator as well.
Dennis is offline   Reply With Quote
Old 25th March 2004, 07:24 PM   #5
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default Re: CSG Editing...

Quote:
Also, I realize that all the normals/faces are facing out, which I imagine would have to be flipped inwards to make it a playable level...
That shouldn't be the case - the only reason for outward facing normals is the "solid geometry" (SG) part of the operation. If you were to create a "box", then carve out the inside of the box with a second box, the normals on the "inside" of the carved box would be inward-facing relative to the box itself, so should be perfectly visible when you're "inside" the box.

I believe "outward facing normals" here means that all normals must face away from the center of the object. For example, you may have a cube in AC3D with all normals facing inward - if the cube is rendered using one-sided faces, you'd get an "open room" look when you were outside the cube. This, however, is the kind of geometry you would not want to perform a CSG operation with (you'd end up with some artifacts).
Dennis is offline   Reply With Quote
Old 25th March 2004, 10:19 PM   #6
wsimike
Junior Member
Member
 
Join Date: Mar 2004
Posts: 22
Default Re: CSG Editing...

Hello again..

Ahh.. okay, thank you.

That makes more sense. So, you'd be doing the overall layout with the normals facing out, so that the CSG operations can perform properly.. but when it comes to actually prep'ing it for conversion or import into a 3D game editor, you would turn them in so that the walls are facing the player.

I would see the "one cube inside another" aspect useful if you're building a structure that would be seen on the outside and on the inside.

As for the Union CSG operation.. is that what would allow a hallway to be attached to a room simply by placing the hallway mesh flush up against the room mesh and then selecting "union"? Or.. as I've seen happen in other editors, would that leave a face "closing off" the hallway from the room?

Well.. I was going to try and show this in ascii models.. but it didn't work out in the actual posted message.. Hopefully I didn't confuse anyone with the verbal description alone. :-)

Thanks again!
Mike
wsimike is offline   Reply With Quote
Old 26th March 2004, 12:00 AM   #7
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default Re: CSG Editing...

Quote:
So, you'd be doing the overall layout with the normals facing out, so that the CSG operations can perform properly.. but when it comes to actually prep'ing it for conversion or import into a 3D game editor, you would turn them in so that the walls are facing the player.
Not usually. Unless you perform some editing operations that directly affect normals, they should transport from your finished AC3D model to most other 3D apps/games without problems.

Any/all surfaces in AC3D can be designated as 1 or 2 sided. Two sided faces can be seen from either side, but 1 sided faces can only be seen if the normal is not facing away from the camera. If you make sure all of your objects/faces are 1 sided, then if your model/level looks good in AC3D, it should look good in your export.

I doubt you'll ever have to mess with normals for game map editing.

As for the stress on normals here: AC3D offers model types that would be illegal in a pure CSG editor (standalone faces, lines, open ngons, etc), so the "outward facing normals" rule is necessary so the makers don't get questions like "why doesn't my mobius strip model Union properly with my cube". Essentially, if you stick with primitive types like boxes, pyramids, cylinders, etc (convex objects), CSG should never give you any problems.

Quote:
As for the Union CSG operation.. is that what would allow a hallway to be attached to a room simply by placing the hallway mesh flush up against the room mesh and then selecting "union"? Or.. as I've seen happen in other editors, would that leave a face "closing off" the hallway from the room?
I'm assuming you mean to "cut" a hallway opening into the room? You could definitely do that using your suggested method - and yes, you would have a face blocking the hallway, but that could be easily removed or subtracted out.

The boolean plugin in AC3D has a neat feature that allows you to keep or discard either object from the original geometry from any operation. So, in this example, you may find it easier to subtract a hole for the hall without deleting the original hallway.

Also, I'm assuming that the room in your example is composed of walls with thickness. i.e., the room is composed of boxes/blocks rather than flat rectangles. If it's composed of flat (non-convex) rectangles, the CSG operations may not work properly. I'm not aware of any 3D editors that guarantee proper handling of CSG operations on non-convex objects (although I'm not familiar with Unreal's editor).

Hope that helps
Dennis is offline   Reply With Quote
Old 26th March 2004, 10:10 AM   #8
Thaellin
Senior Member
Professional user
 
Join Date: Jun 2003
Location: British Columbia, Canada
Posts: 255
Default Re: CSG Editing...

The plugin *should* handle situations with convex objects. It has in all the scenarios I tested.

It tries its best to handle all situations, but sometimes the 'right' result is not the one you were going for... For instance, it is legal to use a non-enclosed object in an operation, but the result is not always what you might have wanted.

If I remember correctly, the only models that are refused outright are ones with inconsistent normal facing (imagine a cube with all sides but one pointing 'out').

I'm not sure I followed about the union operation there, but all internal surfaces should be removed as part of the operation. If they are not, then it's either a model error or a bug (and the model errors are probably more common.. I hope 8-/).

If you place the hallway flush against the room, there is no intersection between the objects, so you probably would not see what you want. If you push the hallway so it overlaps the wall of the room a little, then you get the union. If your hallway was already hollow, and your room was already hollow, then the space where the hallway would have opened into the room will be blocked (the inside of an open-ended tube is not considered 'interior' for a CSG operation) - use the same object you used to hollow out the hallway in order to punch the hole in the wall.

Hopefully helpful,
-- Jeff
Thaellin is offline   Reply With Quote
Old 26th March 2004, 05:31 PM   #9
wsimike
Junior Member
Member
 
Join Date: Mar 2004
Posts: 22
Default Re: CSG Editing...

I see..

Well, the thing that I'd hope to avoid, if using AC3D, is an after-effect I've seen in other 3D programs (including LW)...

First let me make sure I'm explaining the setup. There are two meshes, just a large cube for a room, and a smaller one for a hallway. Both with their normals facing out, single-sided polys on each.

Now.. Since as they have to be intersecting for the Union to take place and he correct result to occur (a hole between the hall and room, resulting in a contiguous mesh), this is where the annoying part comes in with other programs.

If the floor of the hall and floor are on the same plane and, thus, overlapping and sharing the same space when the Union occurs, you end up with this extra "outline" of where the hall "floor" was overlapping the room "floor", causing extra polys, etc.. And it's a pain to have to go back and clean up.

Does the CSG in AC3D have similar results, or does it "understand" that the hall mesh is supposed to be an extension of the room mesh, not adding any unneeded geometry to the larger mesh's "floor" surface?

Again.. this is wierd to explain, and I wish I had a screenshot handy... but maybe you can figure out from the explanation.. or if someone has the ability to try it... if it happens similarly to LW, you'll know what I'm talking about immediately. If not.. that's a good thing :-).
wsimike is offline   Reply With Quote
Old 27th March 2004, 09:38 AM   #10
Thaellin
Senior Member
Professional user
 
Join Date: Jun 2003
Location: British Columbia, Canada
Posts: 255
Default Re: CSG Editing...

I believe I understand. I'm pretty sure the CSG operations currently produce more geometry than you would be happy with. There are other ways to accomplish what you're talking about with low-poly results. When there aren't other ways, or when polycount is not a primary concern, the CSG ops come in handy.

That said, reducing the polycount of a csg result is the next major goal for the csg plugin. I'm a few months off from that, though.

Probably not what you were hoping to hear. Sorry.
-- Jeff
Thaellin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 12:04 PM.


AC3D Forum
(C) Inivis Limited 2020