Free procedural building generator: Building Generator v.01


#401

Hey Andrew,

Thanks for the bug report. I came across that bug myself about a week ago and fixed it…so when v0.6 comes out this weekend it will not cause that error :slight_smile:


#402

Great stuff!

One other thing I was wondering is perhaps an area where we can share presets would be good. I know it would require server space but it might be a useful feature for the future.

I’m wanting to create a generic “English” type house, rather than an apartment or skyscraper building. I’m going to have a fiddle and see what I can come up with, I’m sure it must be possible, but I just have to get used to what each spinner or tick box does. Whilst I want to do that I was wondering if it was possible to have a feature like terracing, where you can create a row of houses or buildings that are all quite similar, that are terraced or placed directly next to each other?

Would this be doable? Living in England we have a lot of this type of housing, rather than apartment blocks.

Cheers.


#403

Hey,

A preset sharing area could be neat, but I have no knowledge whatsoever regarding webdesign so I don’t know how to setup that kind of thing (since it would require things like submit forms and upload procedures, etc).

As for conjoined buildings, your best bet right now would be to just generate 1 building type along a spline using the path generation system

By the way…don’t get too gung-ho about saving presets yet…I ran into some problems with the preset files of version .52, namely…that all the settings of the file were exported in a linear fashion (one setting after another), and were loaded back in the same way…this works fine and all, but if I add any new features to building generator, all of the settings get re-numbered (for example, if a new value is added between values 1 and 2, value 2 becomes value 3). This means that no preset files would be backwards compatible, because each time I add a new feature to building generator the order of all the settings in the preset file changes. Obviously having no backwards compatibility with presets is a problem considering how often I add features to the script.

However, for v0.6 I re-wrote how the preset files work. Now each time a setting is saved, an index for each value is also placed in the preset file, and each time a preset is loaded…instead of just linearly running through the values, the values are only loaded once their corresponding index is found. This means that all preset files made in v0.6 and above will be backwards compatible, but it also means that preset files in v.52 and below will not work in v0.6 or above.

So…it’s probably a good idea to hold off on making a lot of presets until the next version is released this weekend :slight_smile:


#404

I’m glad I’ve only just started with this script in that case. I’ve made a couple of presets but if they won’t work in the new release I’m glad I don’t have many!

Some people might have made a lots though which will become obsolete if i understand you correctly. Would there be any way of running through these presets and it loading the settings in the latest version? Just so everyone’s current presets can be re-used.

Cheers.


#405

Thanks for sharing your work!

Are you thinking in INCHES as system units?
I know that your script use the system units settings, but the minimum value for L in Main Structure is 20 and the minimum W# is 2. So, a building with 40 meters width could be too big sometimes.
Best


#406

Looking for the smallest building in meters I’ve disabled a lot of parameters.
After editing the Roof tab and pressing the Generate! button I got this error message:
– Unknown property: “name” in undefined
And I can see some overlapping faces.

MAX 2009 SP1
Windows XP64


#407

As mentioned above, when another user reported the same problem, the error that you’re seeing happens when roof walls are disabled and roof type 2 is chosen. This has been fixed in the latest version which is being released this weekend.

As for overlapping faces, you see those because the script crashed and wasn’t able to finish setting up the building. There’s a specific function that the Building Generator runs to delete overlapping faces, that is called after the roof is created. Since the script crashed for you during roof creation, Building Generator did not yet reach that function.

As for units, buildings are made in no particular unit scale (just generic units). If a building is too big or small after creation, you can always scale it up or down. In the case of path generation (or surface generation, which will be in the upcoming release), building size can be tailored to fit the size of a spline/face when using those methods.


#408

Building Generator v0.6 is out!

 [b]Grab it here: [http://tysonibele.com/Main/BuildingGenerator/buildingGen_v06_100.mse](http://tysonibele.com/Main/BuildingGenerator/buildingGen_v06_100.mse)[/b]
 
 What's new?? Well, I'm glad you asked:
 
 [img]http://tysonibele.com/Main/BuildingGenerator/buildingGen_12_01.jpg[/img]
 
 [b]New Features:[/b]
 
 -[b]A new floor layer manager has been added.[/b] The floor layer manager replaces several of the old systems that controlled building bevel, taper, ledges, etc. It allows for per-floor control of all of those things, exactly the same way that the door/window layer managers allow for per floor control of doors and windows.
 
 So, now you can control exactly which floors get a ledge, what the ledge contour will be, which floors get tapered, and by how much, which floors have their corners beveled/inverted, etc. 
 
 Also...the bevel control system available in the floor layer manager has a handy graphic interface that allows you to see exactly how your changes will influence the perimeter of the floor.
 
 [img]http://tysonibele.com/Main/BuildingGenerator/buildingGen_12_02.jpg[/img]
 
 -[b]Building Generator can now create basic interiors for your buildings![/b] Yep, that's right...now you can tell building generator to create walls and doorways inside your buildings, visible through the windows. The settings to setup your interiors are available in the floor layer manager, and thus, interiors can be enabled/disabled for any floors of your choice. Even though they're composed of very simple geometry, they can really bring your buildings to life due to the extra detail you'll see through through the windows during parallax shifts.
 
 A set of new material ID slots have also been created for the interiors, allowing you to randomly assign various wall, floor and ceiling maps to the interior geometry. The Building Generator texture pack has also been updated, with a few sample wall/ceiling/floor textures to give you a good base to start with. As with all of the texture settings, you can always add your own as well.
 
 Also, a setting has been added allowing you to control interior illumination with randomized vertex color values. Once that setting is enabled, each room will be assigned a random grayscale vertex color value. This can later be used as a mask/map for self-illumination within the standard material settings, or a mask/map for anything within the custom material settings.
 
 Grab the latest texture pack here: [b][http://tysonibele.com/Main/BuildingGenerator/BG_texture_pack.rar](http://tysonibele.com/Main/BuildingGenerator/BG_texture_pack.rar)[/b]

 [img]http://tysonibele.com/Main/BuildingGenerator/buildingGen_12_03.jpg[/img]
 
 -[b]Building Generator can now generate buildings over surfaces![/b] I showed you guys the development of this feature earlier in the thread....but now you can try it out for yourselves! Surface generation has many controllable parameters, and you can scatter buildings over any surface using a distribution map, and control the scale of the building using a distribution map as well. If you scan through the thread, you can see lot of demonstration images of this feature already posted in here.
 
 -[b]Building Generator can now assign custom materials to building objects! [/b][size=2]Many people request MR Arch&Design material support, so I decided to just go one step further and allow for any type of material to be used by Building Generator. The setup goes like this: you can setup any type of material however you want, and once it's ready you can bring it into building generator and then override the map slots of your choice with randomized texture maps (similar to the way you assign texture maps to standard/Vray materials in previous versions of building generator). The method is straightforward, and you'll see [/size]the options once you change any of the matID material types to "custom" in the material settings rollout.
 
 [img]http://tysonibele.com/Main/BuildingGenerator/buildingGen_11_03.jpg[/img]
 
 -[b]The Preset Manager now displays building previews![/b] Whenever you save a preset, you can now choose to also save a preview image with the preset file, for easy browsing later. What'll happen, when you choose to save the preview image, is building generator will generator the active building, take a render snapshot of it, then save that data to the preset file. Now, whenver you load that preset file, you'll be able to see a little thumbnail of what the building looks like in the preset manager, before loading it. This feature is not mandatory, and Building Generator will ask you first if you want to save a preview image with the file...since it will take a little extra time to render the still frame out.
 
 [img]http://tysonibele.com/Main/BuildingGenerator/buildingGen_11_02.jpg[/img]
 [b]
 -Preset Files have been re-designed to allow for full backwards compatibility. [/b]The problem with preset files in previous versions of Building Generator, is that as soon as I add a new feature to Building Generator, compatibility issues will arise. This is a pretty critical issue, so I re-wrote the way they're saved and loaded, allowing full backwards compatibility. This means that from version 0.6 and onwards, preset files will be interchangeable between versions. Unfortunately, preset files created in any version under 0.6 will not work in 0.6 or above.
 
 [b]-Custom pillar contour controls have been added to the pillar settings of the door and window layer managers! [/b]As requested, you can now design wall pillars by drawing their contour, similar to the way you can draw ledge contours. Options for setting the number of sides on the pillar are available as well. 
 
 [img]http://tysonibele.com/Main/BuildingGenerator/buildingGen_12_04.jpg[/img]
 
 [b]-You can now generate blinds behind windows![/b] 3 blinds types have been added, "venetian", "fabric" (curtain), and "flat". Settings controlling their open min/max amount, and various other parameters, are also available.
 
 [img]http://tysonibele.com/Main/BuildingGenerator/buildingGen_12_05.jpg[/img]
 
 -[b]You can now specify balcony placement. [/b]Two new options allow you to change balcony frequency per-building-side, as well as position offset.
 
 [b]-You can now have balconies that are parallel to each other transformed into New-York-style fire escapes! [/b]Stairs and railings can be created to connect nearby balconies with each other. This is controllable on a per-floor/per-wall basis.
 
 [img]http://tysonibele.com/Main/BuildingGenerator/buildingGen_12_06.jpg[/img]
 
 [b]Other changes:[/b]
 
 -I'm using the new maxscript encyption algorithm now, [b]meaning the script will only work in ***Max 9 SP 1*** and above[/b]. If you need a max 8 compatible version, please contact me directly.
 
 -Shutters can now be opened/closed based on a max/min angle (previous versions just had a binary open/close option)
 
 -Extra options have been added allowing you to exclude ledges, roofs and walls from UV normalization/randomization
 
 -"Sliding" door type has been added
 
 -Option to assign textures by flag to currently selected ID only has been added
 
 -Height offset for windows can be negative now
 
 -Windows in previews are now transparent, allowing you to see things like blinds behind them
 
 [color=PaleTurquoise]-A new "X" button has been added, beside the main "Generate" button, allowing you to delete the most recent previously generated building(s). This makes it easy to generate-analyze-delete-repeat without having to tediously select+delete the buildings you generate each time.[/color]
 
 -Every time you overwrite a preset file, the original is duplicated to a ".bak" file in the same directory. I noticed while testing the script that I often hastily saved over preset files and then wished I hadn't moments later....this will help to avoid those types of problems, by preserving the original file. Only one ".bak" file is kept for each preset file though, so you won't fill up a folder with tons of ".bak" files simply by overwriting old preset files.
 
 -Fixed many bugs reported by users in this thread and through email. 
 
 As always,[b][color=Yellow] [color=Yellow]please EMAIL ME or post a message in this thread if you have found a bug! [/color][/color][/b]There's a ton of new features in this version, meaning it's hard for me to test out every possible combination of settings in order to make sure the script is bug free....getting bug reports from people really helps tremendously in ironing out the kinds.
 
 Also, many people have requested tutorials.....I'm holding off on them for now because I keep having to tweak the UI of Building Generator, to fit in new features and re-organize old ones....so I fear that if I do any tutorials now they might become obsolete too soon. So, I'm going to wait until I get a few more of the features I'd like to add in before doing any tutorials. 
 
 [b]Features I'm still planning on adding in the future:[/b]
 
 -Custom object type support
 -Basic road generator to augment surface generation system
 -A few other surprises :)
 
 I'm always open to suggestions as well.

#409

:bowdown: Wow. Stunned.


#410

OMG! Incredible updates!


#411

Fantastic work. :applause:


#412

Haha impressive, so where is the “Buy Me a Burger and a Beer” Paypal button on your website, you should at least get fed for all that hard work :slight_smile:


#413

I was stunned when I saw the beginning of this project!
But this time I’m to amazed for words!
This is simply awesome!


#414

Thank you Tyson, impressive work, sincerely impressive.


#415

hi tyson,

i can only say it in my motherlanguage…

Das ist Spitze! :beer:

mfg
hot chip


#416

Amazing - the fire escapes and interiors are outstanding in particular.


#417

Important note: I discovered that I was accidentally using some functions in the latest version of the script that are only available in max 2008+.

I’ve updated the script with replacement functions that will now work in max 9. As mentioned in my last post, you can also contact me directly for a max 8 version.

Also: I’ve now learned that the new encryption method I’m using requires Service Pack 1, if you’re using Max 9.


#418

Awesome… great… fantastic. It has all the features i was asking plus more.
You are making a excellent script.
Some ideas: maybe you could add sidewalks and some items for arround the building like fences or some things for the roof like for example a heliport.

I don’t know if it is my Max but the buildings are really heavy, and create huge file size.

EDIT: A problem that i found is that the walls are to thick and intersect the windows when you dont use bevel for the corners.


#419
Well, they do create a lot of geometry :) The resolution of each individual piece of geometry is low, it's just the sheer amount of it required when you have hundreds of facades on a building that makes the file size large. Here are some tips for optimizing buildings:

-Generate Vray/MR proxies. This will keep your scene file size extremely low, because all geometry data is stored to a separate file. Also, because proxies are instanced during surface/path generation, the number of proxy files generated will only be equal to the value of your surface/path quick-build spinner. This means if you set your surface/path quick-build value to "10", 10 unique buildings will be generated, and any others that are being scattered will be instanced. So you could have a city with 10,000 buildings, but only require the disk space for the geometry of 10 of them. (The drawback to this method is that MR proxies are only available in max 2009+, and Vray proxies are only available if you have Vray)
-Turn "combine meshes" on. Max runs a lot faster when building meshes are collapsed, because it's only having to worry about the properties of one object, rather than the properties of thousands of little parts.

-Run “gc()” every once in a while. Although Building Generator creates buildings with the undo buffer off by default, if you’re creating a lot of buildings, deleting them, then creating others, etc…max can eat up a lot of RAM because it’s having to store those buildings in memory in case you press “undo” after deleting them. By going into the maxscript listener and typing “gc()”, max will clear out the undo buffer and clean up other memory holes. This will improve performance by freeing up RAM.
-In the door/wall layer manager, set each layer to only generate details on visible wall sides. Right under the listbox showing your layers at the top, there are checkboxes allowing you to specify which faces geometry will be generated on (front, back, left, right, bevel-front and bevel-back). You can drastically decrease the number of poly required for a building, by only generating details on faces that will be visible.
-Turn “delete backfaces” on in the door/wall layer managers.
-Use textures where necessary, instead of turning on geometry detail settings. Textures could be used to make windows, siding, doors, etc…instead of turning the geometry settings on for those object types. If you’re using textures on walls/doors…it’s probably a good idea to turn on the randomize/normalize exclusion settings for those objects in the UV parameters, so that the UV maps will be scaled to the exact size of the object, allow you to better fit your custom textures.


#420

If you’re getting intersections like that, be sure to adjust the thickness settings for your windows. I’ve circled the place where you can find them. Here’s an example of a building with full-size windows, a bevel balue of 0, and no intersections (because the thickness for the windows was turned down).