Why it would be useful to have more procedural modeling of objects and content dist.

I was thinking, what if the people who knew python created a whole suite of advanced procedural mesh generators and placers that people could use in their Blender scenes, sure there’s tree generators and terrain generators but what if we could generate them inside of Blender using python, since trees have been done before it could be done easily, but then there’s placing the trees on the terrain procedurally.

When it comes to landscape generators I know of the A.N.T script, the problem is I haven’t seen any examples of python terrain generators that can simulate rough cliffs, overhangs, arches and so on. A good method here would be to have the script subdivide the mesh only where it’s needed, so flat terrains wouldn’t be a big waste of polygons.

Also, what about procedural street layouts, using some input on the users’ side on the boundaries of the layout, papers exist on the internet that shows how to do this.

And what’s streets without buildings, using a method similar to what’s described in this .pdf
and along with the terrain and street generator we could create a lot of content in little time. Then there’s generators for other complex objects that need differentiation and, while the topic doesn’t specifically say it, procedural placement of objects with the generators. Also useful would be user defined foundation shapes and the ability for the generator to work with any shape.

The advantages are many
-Mass modeling would save a lot of time for large scenes, games, productions, just about anything.
-The ability to procedurally set your material indexes would be useful, so you can still define the shaders yourself, with it also UV mapped this would be useful in conjunction with the in development tiles procedural. Allowing for mass texturing without taking weeks to do so.

I know of the old cityblock generator script, but it’s not that advanced, it’s time to bring sophisticated scripts that can procedurally generate a lot of content, it’ll save countless hours whether it’s an artist putting together a cityscape or a movie producer using Blender.

Finally there’s procedural placement, it we could have a python equivalent of procedural tree, rock, lampost ect… placement we could save everyone a lot of tedious work.

I don’t expect this to be done in a day, but I’ll be happy if this was at least thought about.

what if the people who knew python created a whole suite of advanced procedural mesh generators and placers

I don’t expect this to be done in a day,

Here’s your sign…


I don’t expect this to be done in a day, but I’ll be happy if this was at least thought about.
That’s good, because these sorts of things take smarts and lots of free time. There is lots of R&D that must go into these things.

On the subject of papers across the internet: These are good resources, but the majority of them paraphrase the actual work that went into creating them. For instance, the paper you linked has five authors noted. I’m guessing that there were 20+ grad/undergrad CS students working in sweatshops for pizza, beer, and a free t-shirt when it was all over for helping them out. This ultimately means that when reading these things, a coder has to read between the lines and figure out what exactly is going on from relatively little presented. On top of that, many of these things build on existing code bases that have some of the features in them. Designing these things in python would mean designing the code base to base them on.

Now for some of the bad in these things(I’m glossing over a lot):
-Taking a look at that paper that you linked (that I have read several times now), you can see in some of their captions: generated with 190 manually written… I don’t know about you, but I don’t have the patience to manually code 190 different buildings. The best way would be to create a script that uses a generic grammar and allows access via xml like data. But then there’s still lots to do implementing that grammar access. At that rate, I could probably model 190 buildings faster than I could code them even with a grammar.

-UIs would be absolute hell with things like this. The blender python draw module just doesn’t have the right widgets to make massive scripts like this, meaning that many of them must be custom coded. On top of that, for massive projects there would have to be a way of saving data out so that sessions could be resumed, meaning writing a file format for import/export (xml like stuff could come in handy here again). Don’t get me wrong, there is a lot that can be done with what python has now for UI options, but for interactivities/usefulness sake, some stuff would inevitably have to be custom coded.

-Speed: python is good and if you code well its fast (some tests indicate in certain applications it can be faster than C), but these are rare cases. Python is an interpreted language and therefore is slightly slower and gets slower as the files start to get bigger and the scripts more complex.

-Time: like I mentioned above, the overhead for time on large scripts is a lot. Once a script has been written it has to go through many debug iterations. Past the initial concepts, for a very motivated person with lots and lots of free time, this could take months.

I’m sure I’ve glossed over more than I intended to. These scripts for distribution and procedural modeling are good, don’t get me wrong, but are complex. Look at things like BlenderPeople for these magnitudes of scripts.

Raising awareness is good, but some things just take time, time, time, smarts, research, and motivation (probably the most important key since everything else will fall into place if this is high enough).

I agree with forTe,
Also, there are in other programs, python scripts that can do what CD suggests.
Vue comes to mind where you can run a python script to generate a fully tree’d landscape, with all the trimmings, various trees, textures, complex landscape.
This particular script has no variables to set, so what you end up with is a generic scene that is no different than anyone else’s generic scene. Also looking at the Script itself it appears in a ‘Closed/Encrypted Format’ as no doubt Eon Software paid a pretty penny for the code to be written.
So is that what your looking for? Generic models can be found, royalty free, all over the web to populate your scenes, they look like everyone else’s generic models. The Populate Scene with ‘x’ objects script has always required, personalization, customizing, re-modeling (select the verts for the flat areas in ant landscape to reduce size, get out the sculpt tool for your overhangs) to make the mesh non generic.
Sounds like you want a Press Button to make fully populated scene with all objects UV mapped, optimized, ready to go in the Game Engine, hey why not have the script pre-define logic bricks too. Ahh then I could truly do nothing…
Scripts are largely tools to help create geometry, either defined mathematical functions to create geometry (geodesic domes, spirals, recent fractals challenge) or to modify your mesh (solidify wire, bevel, tessellate) or to create generic models (city block, make human, gen3) to save (debatable) some time. These are all tools to help with the unavoidable fact that if want to create a original work of art you must model it yourself or remodel created geometry/ imported models to make your work stand out from the rest.

There is merit to what you suggest CD, however a scene with pre-fabricated models, will nearly always be just that.
*note, I am so lazy that I would rather press 20 buttons to create something than to move vertices’s, but what have I created that someone can press the same 20 buttons to achieve the same result.

I’m not entirely talking about making scenes with pre-fabricated models, I’m mainly talking about procedural meshes generated by the script, meshes you don’t download and import.

Imagine having 100’s of buildings in a scene for example, and each one is unique, to model each by hand could take weeks, a script could drastically shorten the time needed,

Sounds like you want a Press Button to make fully populated scene with all objects UV mapped, optimized, ready to go in the Game Engine

No, I’m talking about procedural generation and placement of objects, there can still be a lot of room left for the user. This may need a good number of scripts, and it’ll still require the user to make customizations of where and how these objects are generated and placed. Like if you need a tree placement script to generate a forest, it’s not like the script can decide for itself where to place it, you’ll likely need to input where you want it and in what shape. And a single button cannot do all what I suggest, you’ll need a lot of settings (probably sliders) so you can customize what the script does and user input on where it goes and what shape it’s in.

or to create generic models (city block, make human, gen3)

City block can’t make complex buildings and detail, gen3 is powerful, but the person who coded it moved it to it’s own software for farther development.

A possibility would be the generators having their own software with a seamless way to get the models in and out of Blender.

Vue comes to mind where you can run a python script to generate a fully tree’d landscape, with all the trimmings, various trees, textures, complex landscape

But Vue is expensive, we’re talking a free solution.

This particular script has no variables to set, so what you end up with is a generic scene that is no different than anyone else’s generic scene

Did I say it won’t have any variables, you’re going to need variables for it to be useful, and I didn’t say it’ll all be in one script either, but many scripts with many variables and options to set.

If your “procedural” meshes are going to have large, complex panels in which you can set parameters for dozens of options to make each building unique, you are going to wind up spending weeks setting sliders instead of modeling to get that fully populated city scene.

I’d suggest a much simpler solution is to model your architecture in pieces, set it up in a library blend file with a well thought out naming convention, then use append, scale, the array modifier or dupilverts to quickly build your unique buildings.

For example, you have several floor plans: rectangle, L, T, courtyard. Append and scale to the appropriate size (depends on whether you’re doing a bedroom community subdivision or a university campus, say).

Then append your walls, which come in several styles, scale them, and rotate to place them on the floor plan. Or set up the floor plans so there are strategically places quads with appropriately named vertex groups you can select and extrude to form walls.

Append a particular style of window from the library, then use the array modifier to place all the windows in the wall. Same thing for the doors, the gutters, downspouts, roof materials, and so on. The larger the library you are pulling from, the more choices you have, the more unique buildings you will be able to create.

source> http://en.wikibooks.org/wiki/Blender_3D:_Blending_Into_Python/OrphanScripts
This script is a simple L system that allows you to use pre-defined meshes. It DOES work in 2.43 and could possibly be a building generator (with some work).

But Vue is expensive, we’re talking a free solution.

well your answer may be above, & the point was that an expensive software has a closed source code to do similar to what you suggest, paid someone $$$$$ to code it & there is no interface. Probably because it would have cost them $$$$$+ to get it done.

Soon make human will have better support, gen3 could still be reworked with permissions and the orphaned l-system script paves a path for buildings & other objects.

One thing to remember is the new api,
source: Blender wiki>

  • This API is for Blender-2.5 or later, It will not be used in a 2.4x release.
  • This API may undergo big changes - that can happen at any time.
  • This API will not work with most existing scripts. (porting should not be that hard)For CD’s idea,
    Possibly large xml library’s could work. If you had 250 models in xml format it may be possible to script the import by choosing from a list, scale/randomize scale within parameters, array/duplivert, location, drop to ground/align to face/scatter, & textures, one model at a time. Most of these functions exist one way or another in several different scripts already.
    still it would be a chore. or would it? certainly no small scripting task.

Interesting you bring up the L-system, this paper mentions such a system for procedural modeling of cities.
Not only does it cover buildings it covers streets as well. It’s worth taking a look it.

You ever see this?

Right now, I personally as a coder am reluctant to embark on any major projects concerning Blender because of the projected API changes. Generally, by the time I would finish a script of something of this magnitude either the API would change right after I finish it, right before I finish it, or in the middle of working on it. All of those cases mean that ultimately I would wind up having to rewrite a lot of code to do those ports, which ultimately would probably frustrate the process a lot.

So I don’t think you will see anything like these types of scripts until 2.5 comes out and the API is relatively more stable to changes and deprecations. I think in the long run, though, you will see more of these scripts come up, but it will take a while for them to do so because of the API changes and aformentioned factors. Things like this are possible in Blender, but as Orinoco pointed out, its not really practical as a “script”, but would be practical as a dedicated program that could perhaps export .obj that could be imported to blender (i.e. the path the MakeHuman took).

Well if you want a dedicated program you may want to have intergration into Blender as seamless as possible, I think the game engine Unity uses such a system where when you make changes in the .blend file and it changes in the engine automatically. One route would be to create your buildings in the program and have an option for them to appear in your .blend file right when you export it if possible. Something like an option to export the object directly into a .blend file or as .obj if you want to store it for multiple .blends or other programs.

The API changes coming up may make this worth waiting for, but it doesn’t mean we can’t brainstorm how we can make such huge projects like terrain generators and what’s described in that last paper to work in script form

The usefulness of procedural meshes is the same as that of procedural textures.

By the way, why people write so long missages? have you anything important to say, then say it in a few lines.

I found some very impressive system in internet, inspirated in L-system, developed to provide City procedural models:

The paper: http://www.vision.ee.ethz.ch/~pmueller/documents/mueller.procedural_modeling_of_buildings.SG2006.web-version.pdf

Looks nice.

EDIT: Oh wow, I did not realize how ancient this was. Who resurrected this?

This thread is old. Why bringing up the crap CD posts?

The idea, it seems of repositorys, and free procedural scripts is to make the modelling/creation of commonly used object easyer. Thus, instead of spending a year creating a complex city scene, for some big lizard to run around in, you can do the city in less time, and spend more time on modelling the more specifc things in your project, such* as the giant lizard.
Honestly, does every modeller in the world need to make their own identicall cell phone modell?

it would be great to have a dynamic geometry system like amapi.
that system is amazing.