Building creator script (update: v0.1 available)

I notice that everyone is using Fiber and the Beast to generate city blocks. But the buildings themselves still end up being replicas of each other. So here’s something that should (eventually) generate complete and unique random buildings based on a layout definition and a library of detail meshes.

Here’s a sample render of the output so far:
http://blender.isoserv.com/uploads/builder-1.jpg

Source .blend here:
http://blender.isoserv.com/uploads/builder-050811.blend

The script and the layout library are pretty far from being done; so far, only one wall is generated at a time. There is no GUI, and the documentation is scattered around the code. Also, material information is not set up right now. So technically the script is not ready for general use yet, but if you’re interested, play around with it. As you can see, even now the library is sort of usable for far-away shots; it doesn’t have enough detail for closeups.

The script uses a textual ruleset description (describing the spatial structure of the wall, for example), stored in a separate blender text block. Library meshes are regular mesh objects.

The plan is to first make a sample building set (the style is 20s-30s (or so) commercial buildings as you can see), so that the script is useful even in its current form. Along the way I want to make some enhancements such as using vertex groups to markup template meshes. Then I’d like to add a GUI, and maybe even a visual ruleset editor. Oh, and I do want to make some sort of a “promotional” render or animation with this, so I hope noone minds me posting here instead of the Python forum.

Anyway, let me know what ya think. Also, if you’re interested in the script, I’d appreciate some help in making the mesh library - I’m not much of an artist myself, so the actual mesh creation takes way too much time, heh.

[NOTE - this is not the same script as what appeared in the Python forum - I restarted basically from scratch]

This look realy intresting! Gimmie more :smiley:

if a script does all that by itself…means I just lost my god damned job…

oh well…your model look nice…

MyIS, this script is amazing and perfect for my style of design work. I hope that projects like “Make Human” add features like this. It would be nice to be able to generate mass amounts of realistic 3d objects. Then later you could pick from these objects, tweak them, add to them and arrange these object elements as you see fit.

It will be great to see more of your work.

I can think of thousands of applications right now for your script. Golden stuff!!

What type of mesh models do you need? Link us up to some google image searches so that we can see images that fit your ideas. I do 3d architecture designs all off the time. Link us to some reference images that fit your goals for the mesh designs of this script.

This way we can help you out with your meshes. I did a google image search for “architectural facades” and came up with a lot of good reference images. I could model a few on the weekend. I’m up for a project like this.

Blend on!

Thanks for the comments, everyone, I really appreciate the interest.

Here’s what I mainly used as reference for models (the site shows lots of other great architecture types):
http://www.nyc-architecture.com/walks-Soho.htm

To JA-forreal, and others who may want to contribute:
The script still lacks some essential features and I’m still mainly focusing on feature development. The current mesh library, besides being a showcase sample, is a testbed for any new additions; that means that I end up changing things around quite a bit sometimes. With that in mind, solid work can still be done, and then simply adapted later to script changes. So. If you want, download the .blend file and start poking around and looking at meshes. Then, as questions arise, post them here or PM me and I’ll try to respond with more info.

If you like what you see, simply expand on the current data, or start from scratch. The current mesh setup is obviously not the only library that could be made. First of all, various levels of detail and variety could be made; different architecture styles, of course. Finally, it doesn’t even have to be buildings. The system is fairly flexible and versatile in principle.

Thanks again folks.

do you want us to contribute by makeing meshes for you i would be more than happy to do so

Yeah, basically, although I don’t have any specific requests. Just do what you feel like and what you would need for yourself. Then, if you want to share, simply post the results.

I have to warn though, adding content to this script is not as simple as creating a single mesh; it also involves defining the structure for the wall, which is very tedious and confusing at times (oddly enough, it’s similar to programming HTML tables). Also, it’s pretty hard to split up that work, so one person has to do both things.

Anyway, here’s a slightly different render, now with materials:
http://blender.isoserv.com/uploads/builder-2.jpg

Some more render spam:
http://blender.isoserv.com/uploads/builder-3.jpg

Now it’s not just a disembodied wall :).

looks great man. nice work. seems like some kind of auto uv mapping function would be useful here.

will this help?

http://i3.photobucket.com/albums/y59/volkofsky/balcony.jpg

this looks really interesting. i’ll keep an eye on this one

Here’s another render:
http://blender.isoserv.com/uploads/builder-city-1.jpg

And the model view for it:
http://blender.isoserv.com/uploads/builder-city-dev1.jpg

The script was completely rewritten (again), and now should be much more streamlined and modular. Parameters are now read from object properties on placeholder meshes. This way the script’s processing can be deferred till whatever time (e.g. only on render). Also, other scripts can integrate more easily, since all they have to do is place special objects in the scene (for example, discombobulator/greeble, or the street map maker as seen above). An artist can set the placeholders up manually too, of course, and for that I am planning a visual tool (that red outline on the model view).

Some other usability enhancements have been made. Also, another mode was added for output - lathe-like spinning around one axis. This way objects with arbitrary rotational symmetry can be done ;).

Of course, many things are missing, such as UV-map generation (it worked for a bit but then had to be turned off again). Also, I want to add an output mode that lays out content along a spline path. The script can already place things on a polygon outline (that’s what was used in the picture), but adding spline segments would make it even more versatile.

Anyway, hopefully this looks interesting. A .blend file is not ready though - I feel like I should at least tack on a basic GUI.

That is simply amazing

im a little confused by it… course im not that good at python yet…

i only know c++ now…

can i have an honest opinion on this idea…

have it use empties for shape declaration and use y axis for up… x,z for corner… corner angles specified for each empty… designate a mesh as the construct piece…then input how many units tall building is… have it build… then finish with a cap piece that is built using same values…

im not very good at python and its just a gui idea…

hope it proves insiteful

otherwise… i like what youve accomplished… more than ive done before…

This thread is REALLY interesting! :slight_smile:

gokuui: you’ve pretty much hit the nail on the head there ;). Only instead of a set of empties, the shape info is stored directly in the destination construct mesh object. Gameblender properties are used for this; this way it’s actually possible to edit the shape without any extra GUI whatsoever. Also, it’s an easy modification for Beast or any greeble plugin to output placeholders like that. Technically, it is possible to even animate the shape through a small Python addon that converts Ipo values into the property string.

I’m hoping to have something ready for basic consumption very soon - I already got a simple “Run!” button going as a GUI. And thanks for the comments folks! Attention is partly what keeps me going ;). That and lack of a job, heh.

EDIT:
Here’s the .blend file: http://blender.isoserv.com/uploads/builder-050818a.blend. Just follow the instructions in the text window. If something doesn’t seem to work, check the console window for error messages - it’s still pretty buggy. You can see the source model and template ruleset by switching screens (Ctrl-left i think). You should also see a red outline when the placeholder is selected - that’s drawn by a vestigial preview script.

Works in 2.37+ only.

I really need to find some time to play around with this, it sure looks amazing!

guess i did understand it afterall!

ill try to help in the code whenever i have spare time dude…
even though im not too good…

when I hit remove doubles it removed thousands of vertices. my point is that it creates a lot of extra vertices which increases render time. I don’t know if you can fix that or not.

Clayton

would you mind if we used this in our OPEN movie project? This may work for our needs. we have a whole city to build.