Procedural Model Editor

Started by
3 comments, last by RobTheBloke 18 years ago
Hey all, I'm about to get into making a building-editor system in my engine project, and I wanted to avoid storing lists of vertexes, polygons, texture names and coordinates so that my game worlds are very small in filesize. My original idea was to have a state machine type setup, where the geometry is modelled like the running of a program. have a POLY register which represents the polygon number we are operating with, and then have a bunch of opcodes that can be done to the current POLY. TEXTURE register would contain the name of the texture/material to be applied to all the polygons which are created. TEXTURE [filename, shadername, whatever] SPAWNPOLY [# of points] //POLY is now set to zero, our first polygon SCALE [x][y] //resizes polygon POLY MOVE [x][y][z] //offsets location of POLY ROTATE [x][y][z] //etc... EXTRUDE [distance] //polygons formed by extrusion naturally have TEXTURE set to them. //POLY assumes the # of the polygon formed at the end of the extrusion //now you can do more scaling/moving/rotating here if desired.. POLY 1 //set active polygon to one of the sides of our extrusion EXTRUDE [0] SCALE [0.5][0.5] EXTRUDE [-10] //start sculpting the inside of our shape The operations themselves, stored as opcodes followed by their parameters, I figure would allow one to design much geometry using less data than if the actual geometrical data were stored. For example, a cylinder with 5 sides. That's 7 polygons, 10 vertices, 30 texture coordinates. On the conservative side, this cylinder would be about 296 bytes. That's a lot of stupid data that can be entirely assumed. Ok, I realize I probably sound stupid for just describing what procedural geometry generation is. My question being does anyone have any ideas, or has anyone seen anything before that I could learn from to design my building editor. Mind you this is an editor meant to be an intuitive method for making interesting building architectures. The best idea I've come up with so far is to base the editor solely on polygon extrusion, combined with boolean functions (specifically subtraction)... Ideas? Comments? Anything in particular someone is waiting to see in a map editor for once? Thanks -radioteeth
Advertisement
Moved as per request...

Cheers,
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>



Ok, I came across this pdf.

I'm aiming for a simpler version of the same thing, as well as some input from people who have a good sense of intuition about modeling in general.
I just read the introduction of this pdf you posted above.
This procedural modelling approach is mainly used to create complex surfaces with a minimum effort.
imagine you had to design a modern car with a hand modelling tool. that would take ages to finish it and you certainly won t compete with the quality offered by procedural modelling.

From my understanding procedural modelling a more a mathematical description of models instead of the nowadays common triangle/polygon base description/approach


The big!!! advantage of this mathematical approach is the ease of implementation of LOD systems.

You need to convert these models to a triangle based description( at least on user hardware) in order to render them anyways(at least at the moment).

http://www.8ung.at/basiror/theironcross.html
I'd suggest taking a look at the learning edition of side effect's "Houdini". For procedural modelling and animation, nothing else comes close. It would be entirely reasonable to use a similar simplified Dependency Graph system for runtime usage.

This topic is closed to new replies.

Advertisement