• Welcome to PiBoSo Official Forum. Please login or sign up.

Rally stage (WIP) and info

Started by TFC, December 30, 2016, 11:27:29 AM

Previous topic - Next topic


December 30, 2016, 11:27:29 AM Last Edit: December 30, 2016, 11:52:55 AM by TheFatController
I'll use this thread to update the status of the rally stage I'm working on. I'll also add some basic information / tips for anyone else who might want to try my method. This wont be a tutorial, so anyone wanting to use this method will need a basic understanding of Blender, or the ability to take these methods and use them with another 3d program.

The theme for this first stage is going to be English countryside with both tarmac and dirt roads, junctions and small jumps, with a couple of small woodland areas. So far I have a basic layout with a couple of tarmac loops with junctions, and a dirt track around / in between. This will allow me to make multiple layouts, perhaps 5 - 6 different stages within the same map. Although I know this doesn't look like a typical point A to B rally stage, it's the best way of getting as much road as possible squeezed into the space of the heightmap square.

An idea of how the layout will look:

First step was to generate a landscape using blenders 'Add Mesh > Landscape' tool. This was made at the exact size I wanted to use in my HMF and THT files, in this case 1500 x 1500 (scale z and scale x), and the height / plateau in Blender set to 35. The height was initially set to 35 in my HMF and THT files to match but has since changed due to adding roads to the landscape so the height of the landscape is the last thing I check before running map.bat so I can adjust my HMF and THT's scale accordingly.

Next, using Bezier curves and the Array modifier I was able to roughly lay out my roads. Each road consists of a tile, with enough geometry to give a nice curve and allow for some deviation in the surface to give the road a nice rough feel while driving.

Such as:

The green area around the road is another tile that uses the same Bezier curve and Array modifier as the road, but this time used as more of a holder for the road object to ensure the road has enough ground either side of it, and doesn't have any terrain sticking up through the surface. As this will be used in conjunction with the terrain to carve away / add to it, I've named them 'deform' sections.

The other beautiful thing about these deform sections, as they're only going to be used to shape the heightmap, they don't have to conform to 3d standards.. Ngons everywhere!

Such as:

The junctions have all had to be hand made, including the green deform pieces for each junction, as you can't join Bezier curves in that sense. But the neat thing is once the junctions are in place you can lock the ends of the Bezier curve using 'Bounds Clamp' and 'Stretch' in the curve properties and then shape the in between sections how you want, leaving the connecting junctions connected and in tact.

The basics of the method are that you use the Shrinkwrap modifier to lay the Bezier curves on the terrain below, you then move the green deform parts to another layer, and you then use the Shrinkwrap modifier on the terrain targeting the green deform parts, leaving you with a nice road and nice ground mesh that has cutouts to make room for the road pieces.

It will eventually look something like:

That's all for now, once I reach the stage where I am ready to export I will cover the basics of rendering out the heightmap, and the road objects.  :)


Textures are placeholders currently, and road widths are trial and error!


Looks incredible - whats the total road length you achieved and will you be able to use it in MXB?


Yes the track can be used in MXB for supermoto, but unfortunately GPB doesn't seem to like heightmaps..

Total road length, not really sure how to calculate it. I'll know more when it comes to making a centerline as I can give you the length of that, but as far as I can work out Blender doesn't give you the length along a curve, but instead the dimensions of the overall object. As WRS doesn't seem to have any form of reset a full centerline is kind of pointless while still constructing.


Looks nice Fats!, gotta get a license for wrs, hopefuly soon hahaha



The landscape is going to want a new material with the 'Shadeless' option checked.

Then a new texture needs to be created using type 'Blend'. Firstly the 'Ramp' checkbox needs to be ticked, then the black colour needs to have the alpha ramped up to 100%, the interpolation needs to be 'Linear', the progression also needs to be 'Linear' and the gradient must be set to vertical. Coordinates need to be set to 'Generated', and that's all you need to do in the texture tab.

The most important step for getting the heightmap to occupy the correct space so the objects line up perfectly in game, is within the 'Scene' tab, the 'Display Device' MUST be set to 'None. It comes as default set to sRGB, which will make the dark grey lighter and the light grey darker, causing the linear gradient to take on more of a curved progression.

Next the camera must be positioned above the landscape, in orthographic mode, and must have the same orthographic scale as the landscape so in this case 1500. The clipping on the camera must also be increased to make sure the landscape shows up in the render, and that's it.

One final point, unfortunately the modifiers for the landscape must be applied, in this case Subdivision Surface and Shrinkwrap.

Click the render button and you should see a nice heightmap appear including the cutouts for the road objects.


Really cool, it's nice to see that someone cares about wrs
Still riding a 50cc, but enjoying it :)

Stout Johnson

Wow TFC, looks really advanced already! Very nice to see this. Also a nice idea to share your experiences here and keep us posted about the progress. Keep it up mate!  ;)
    -----------   WarStout Kawasaki Team   -----------

Urban Chaos 2.0

Very nice. How long do you think it'll take you? Also, are you planning to add any landmarks? Like houses, poles, road signs, etc.


It's great to see people are interested.

Not sure how long it will take. I've pretty much finished the tarmac layout, the dirt still needs some work.

Next the heightmap will need tweaking to include better terrain around the parts of the track that are too low / raised. This shouldn't take long. Plan is to texture the fields and ditches and shape the terrain around that.

Then I will start on objects. It's going to be English countryside so fields, hedgerows, ditches and woodland. Nothing too special. Maybe a few farm buildings but nothing too demanding.

Exporting the road system and heightmap currently takes about 1 hour give or take so progress is slow, but this is the longest part. Once that is done I can work on heightmap with no objects to get that right, and work on off track scenery separately to the road system and once all is done the whole lot together. Different layouts can use different objects so again pretty quick.

It's probably going to take a while ;)

Urban Chaos 2.0

Quote from: TheFatController on January 01, 2017, 08:44:11 PM

It's probably going to take a while ;)

This is always such a bitter-sweet thing to read, haha. But I'm sure it'll turn out awesome.


i will buy this game when you will get this stage finished :D