I pulled downeracoon’s landscape tile set from Blendswap. These are nice looking tile assets that can connect together to form various landscapes. The first thing that came to my mind was that these should be hooked up to some kind of procedural generator to make random tile based layouts.
I am working an AddOn that adds a TOP/BOTTOM/LEFT/RIGHT property to each of the tiles. The AddOn also has a Generate button to randomly create a grid based layout from the assets. I have extended the data type to include a few flags as well such asEnabled, Is 2x Asset, Filler andBuildable. Any tile can be removed from appearing in the scene by turning off it’s Enabled flag. All tiles are enabled by default. A 2x asset is a tile that takes up 2 spaces on the grid instead of 1 like all other tiles. When filler is turned on that tile can be used to patch holed in the grid. If buildable is turned on that tile can be used as a spot to build a 2x asset.
Here is a short overview of the new layers in Tile Proc-3.
I have cobbled together a bit more code under the Generate button. It basically creates a grid with tile IDs and then looks for matching neighbors. But there are still some connection problems as well as unmatched holes.
eRacoon also has a suburban house kit in the same exact tile size. I have integrated those objects into my master BLEND so they get considered for distribution as well.
What can I say except… WOW
Its the first time I see my work used in a procedural generator.
That is amazing work and this has a lot of potential.
I have some more assets planned but now I don’t know which one to do first since you gave me some ideas.
Some kind of waterfall high and low connectors would be nice. Maybe a triangle sand. Hmm…maybe that could be done simply re-texturing the hill pieces with the sand material…?
Another small tweak to the Generation.
After the entire map is generated the code places a single 2x size asset at a random hill or grass plain. This is the Luxurious Mansion house model in the suburban pack.
A few more tweaks to connection points and I have better lots now! I have cloned the green hills to make hybrid sand_hills_high and dirt_hills_high. These are basically flat dirt or sand on one half of the tile and then a green hill rising up on the other half.
I sent you a PM on Blendswap, check messages there.
I started to play around with alternate materials for the tiles. I wrote a small script that takes the single image mapped material and creates a matching material for the same face type. With all the tile materials remapped I can do things like make the windows of the houses emit light and have the water reflect.
The 9k generation took a while and quite frankly I walked away and when I came back it was done. So I don’t know the exact time but at least fifteen minutes or more of single threaded python generation. The viewport was very slow even in bounding box mode. It took a while to render as well.
That is looks fantastic, never knew my assets could look so beautiful.
Actually I was planning to do some realistic renderings myself… but didn’t came around it yet. too much work creating the assets and making them consistent.
I Like what you’ve done with the reflections and the lighting of the houses.
Maybe I should create interiors also
I’ll send you a PM with some ideas I wanted to discuss with you for this.
This is incredible work, Atom! I’m amazed at how quickly you’ve made progress. If you release this add-on, I’d love to use it in an upcoming short film and accompanying BTS.
Could the tiles have other geometry parented to them? So say if you had buildings and other models that weren’t low-poly, you could just arrange your tiles, and then when rendertime comes, the tiles are hidden and the higher resolution models only are rendered? Or some other technique, such as using instances?
@JamesCandy: Currently each tile is relayed from the source object as an instance without modifiers applied (raw mesh). Each tile does exist as an object in the scene, however. This means it is easy to create thousands of objects which slows Blender down. I have parented all generated tiles under an Empty so that helps the Outliner update speed a bit when the tree is closed. One generation created 16,535 tiles. I had to shut down Blender because it became un-responsive. As far as adding custom things to specific tiles that could be accomplished by creating a copy of the tile and modifying that copy by joining in any new mesh element you like. Then you would add the new tile to the tile list with connection tags that make sense for that tile. There are currently 26 different connection types for the set that you see displayed in the images so far (water low, water high, road, tunnel, grass etc…).
Also there is no reason you can’t just delete unwanted tiles after generation and put whatever mesh you like in it’s place.
The generator is purely random and offers no weighting of any elements over another. All layout is derived from connection types.
eRacoon has provided a watefall connector tile which I have integrated into the system. Here are a few preview shots.
I have added a random color generator to the AddOn. You pick a base color then all other diffuse colors are generated as nearby neighbors on the color wheel.