## Procedural Geometry

vhpgomes
Gnoblar
Posts: 8
Joined: Fri Jun 04, 2004 12:27 am
Location: São Paulo / Brazil
Contact:

### Procedural Geometry

Hello,

I'm currently working on a project that shows a surface given its parametric equations.

Here are two examples:

Sea Shell:
x(u,v) = a*(1-v/(2*pi))*cos(n*v)*(1+cos(u))+c*cos(n*v)
y(u,v) = a*(1-v/(2*pi))*sin(n*v)*(1+cos(u))+c*sin(n*v)
z(u,v) = b*v/(2*pi)+a*(1-v/(2*pi))*sin(u)
with, u = [0,2*pi] ; v = [0,2*pi]
n = 4;
a = 20;
b = 100;
c = 5

Klein's Bottle:
x(u,v) =
S*(A*cos(u)*(1+sin(u))+(4*(1-cos(u)/2))*cos(u)*cos(v)), if u < pi,
S*(A*cos(u)*(1+sin(u))+(4*(1-cos(u)/2))*cos(v+pi))), if u >= pi

y(u,v) =
S*(B*sin(u)+(4*(1-cos(u)/2))*sin(u)*cos(v)), if u < pi,
S*B*sin(u)), if u >= pi

z(u,v) = S*(4*(1-cos(u)/2))*sin(v)

with, u = [0,2*pi] ; v = [0,2*pi]
A = 6;
B = 16;
S = 5;

I was wondering if I could apply for the Summer of Code with this... I mean, I could add some functionalities, and make an addon or something...

Thanks for any feedback,

Victor

Kencho
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:
Seems interesting, though I think you should offer maybe a little more general kinds of geometry. I might be wrong, but the idea I have of procedural meshes is not only that, but also terrain generation, or even "cities" (at a very large scale).
Procedural textures would be a great plus in my opinion as well.

vhpgomes
Gnoblar
Posts: 8
Joined: Fri Jun 04, 2004 12:27 am
Location: São Paulo / Brazil
Contact:
I agree that I should offer more, and that's one of the main reasons I posted the previous message, to get ideas.

I also have doubts of what procedural geometries, meshes, or textures are. Only used the "procedural" term due to the "Procedural Media" task in the HelpWanted page (http://www.ogre3d.org/wiki/index.php/He ... ural_Media)

Another feature that I think I should be able to add is Constructive Solid Geometry (CSG) http://en.wikipedia.org/wiki/Constructi ... d_geometry

QuantumG
Kobold
Posts: 36
Joined: Wed Jun 15, 2005 1:57 am
Very cool stuff. As you are obviously experienced in this sort of thing, do you think you could make something mundate with this system? I mean, like a coffee cup or a door handle.

The great hope of procedural content like this is that you can have a model of the world which is richer than that actually displayed. So you can describe exactly what it is you want and then have an algorithm (even an offline algorithm) take that information and make a mesh that is practical for the current application. For example, a game may require very low poly meshes, whereas a animated film requires as high poly meshes as you can practically render (or even raytracing).

Of course, if all you can generate is exotic shapes, that's not particularly useful for this application.

Kencho
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:
vhpgomes wrote:I agree that I should offer more, and that's one of the main reasons I posted the previous message, to get ideas.

I also have doubts of what procedural geometries, meshes, or textures are. Only used the "procedural" term due to the "Procedural Media" task in the HelpWanted page (http://www.ogre3d.org/wiki/index.php/He ... ural_Media)

Another feature that I think I should be able to add is Constructive Solid Geometry (CSG) http://en.wikipedia.org/wiki/Constructi ... d_geometry
CSG is in my opinion far from procedural generated meshes. A procedural mesh or texture is one that can be generated completely using an algorithm and tweaking variables. A typical example of procedural geometry is creating a box on the fly instead of having it stored in a file. Obviously, procedural cubes are pointless, but some people has managed to even create cities (not intensively detailed!) this way.
I've recently read a feature article on Gamasutra from the guys of Darwinia, a game that has a lot of procedural media (indeed, I think they only hand-made a small part of it). Worth reading it if you plan on taking this project

QuantumG
Kobold
Posts: 36
Joined: Wed Jun 15, 2005 1:57 am
Doesn't really matter if the object is "stored in a file", the point is that an algorithm created it, not someone sitting at a 3d modelling program placing vertexes.

syedhs
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 47
Procedural terrain along with lakes and roads would be very nice.

mirlix
Goblin
Posts: 225
Joined: Mon May 01, 2006 12:03 am
Location: Germany
x 5
Intel has a great paper how to great a procedural landscape with trees , lakes and clouds. Maybe this can help

http://www.intel.com/cd/ids/developer/a ... /20247.htm

I think procedural content is a the next step for gamedev to cut down the development time/cost for games and it would be great to have ogre support it.

OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 65
Contact:
Yes, rather than just shapes, I personally was thinking about 'procedural content' - so that might be terrain, foliage, cities, cave systems. Clearly that's not just geometry but also textures (although if time were short pre-authored textures could be used, but UVs would have to be generated).

Individual shapes are useful, but to be a significant project I think you'd have to pick some kind of more holistic environment you were trying to make. The ultimate goal of this kind of thing would be to be able to generate a large amount of content which stands on its own merits, not just abstract mathematical shapes. There wouldn't be time to make a completely generic system but I think you could pick one of those types of environments and tackle it in a summer.

Professor420
Greenskin
Posts: 116
Joined: Fri Jul 28, 2006 9:35 am
Contact:
I am pretty sure the Darwinia team used procedural content creation quite extensively... I know there is a tool they wrote to procedurally generate cities for one of their games (not sure which one, before or after Darwinia). I'm sure you can find the article somewh... wait, here it is.