Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Philip's Request for CSG Information

Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
04-07-2006 15:14
Originally this was an email to Philip Linden, but I seem to have forgotten his email address from the second last town hall meeting and got two "mail undeliverable" messages. >/
As such, the following is written more directly as a letter between myself and Philip.



Morning, Feynt Mistral typing. If I recall from the first (and last due to system lag) town hall I attended "in person" this was the right email address. Anyhow, on with the reason for the email.

Yesterday during the broadcast you briefly answered the question about CSG (constructive solid geometry) and asked for more information about it. I sadly couldn't seem to get Skype working on my computer, and it didn't matter anyhow because I lack a proper microphone (I've just got a karaoke mic). However I did want to explain the request in more detail.

But first, a URL to a compliation of CSG requests or requests for things that CSG could solve that are in the forum or found in the votes:
/13/7e/88591/1.html

As a basic run down in case you aren't aware of the process, CSG is essentially boolean math with primitive objects. It comes in three flavours: Union, subtraction, and intersection. Objects are produced by the combination of two primitives (or a primitive with a previously CSG operated object), which produces a new wire mesh for the object based entirely on procedural information.
Union works much like linking does at present in world, however at the places where the two prims meet their meshes join together, and any parts which would still be visible within the prims are removed so it's just one big empty space. Contrary to current linking, in which you can place your camera within a linked object and see very clearly the other prims of the object, whole. Eliminating the inside portions that aren't seen by the viewer under normal circumstances would eliminate a lot of polygons and boost frame rates a decent amount (depending on the prim population of the sim, anywhere from 1 to 6 fps, maybe more in REALLY packed areas).

Subtraction is pretty straight forward. You subtract one prim from another. Hollowing a prim, which we can currently do, is one example of this. Other more esoteric options are adding divits to a cube's face (making indented dice), dents to cushions (a 1 prim square with four dents with buttons in each one), and carving out parts of heads (for instance adding eye sockets in furry heads, or much more dramatically sculpting the inward curve of a cat's cheek structure). Subtraction is a great way to make more organic looking objects with fewer visible primitives. Overall less polygons are used because only the portions of the prims used in the subtraction operation are added to the object on the whole.

Intersection is the opposite of Union. Only the places that the two prims intersect remain, the extraneous parts being removed. Intersecting a sphere with the corner of a cube for instance could give you 1/8th of a sphere. Intersection makes precision building easier and thus makes it ideal for technical designs.



I would love the gamut that CSG provides, simply for the optimizations to the renderer that the whole set would provide, but subtraction is the biggest thing for me personally. I've been saying for a while my cougar avatar would look much better if I could sculpt away the parts necessary to give it the "topography" it needs. For more information, I suggest Wikipedia:

http://en.wikipedia.org/wiki/Constructive_solid_geometry

I sent you that link a minute after you asked for more info in the broadcast but I suppose you had your IMs turned off, receieved so many that it was but a single drop compared to the storm, or the time delay between the broadcast and my sending was longer than the minute it seemed and by then you had well worked on to another question.

Further links:
http://www.melax.com/csg/
http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/model/csg.html
http://www.alsprogrammingresource.com/csg.html - A tutorial for implementing it! >D


And maybe after this gets working we can talk about metaballs ^.^;
http://en.wikipedia.org/wiki/Metaballs
_____________________
I dream of a better tomorrow in SL!
You should too. Visit, vote, voice opinions.
Support CSG! Tell LL how much it would mean to subtract one prim from another!
Prim Animation! Stop by and say something about it, show your support!
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
04-07-2006 15:16
[email]philip@lindenlab.com[/email] should work.

If you want I'll forward this to him too. :)
_____________________
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
04-07-2006 15:45
Well forwarding should be enough. I don't see a reason to further clutter his inbox.

And that'd be the reason I got the address wrong, I was sending to "philiplinden" rather than just "philip"
_____________________
I dream of a better tomorrow in SL!
You should too. Visit, vote, voice opinions.
Support CSG! Tell LL how much it would mean to subtract one prim from another!
Prim Animation! Stop by and say something about it, show your support!