Author Topic: Rally stage (WIP) and info  (Read 1030 times)

TheFatController

  • Full Member
  • ***
  • Posts: 224
    • View Profile
    • MXB-Central
Rally stage (WIP) and info
« on: December 30, 2016, 11:27:29 AM »
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.  :)
« Last Edit: December 30, 2016, 11:52:55 AM by TheFatController »

TheFatController

  • Full Member
  • ***
  • Posts: 224
    • View Profile
    • MXB-Central
Re: Rally stage (WIP) and info
« Reply #1 on: December 30, 2016, 11:49:46 AM »
Textures are placeholders currently, and road widths are trial and error!




h106frp

  • Hero Member
  • *****
  • Posts: 1648
    • View Profile
Re: Rally stage (WIP) and info
« Reply #2 on: December 30, 2016, 01:50:17 PM »
Looks incredible - whats the total road length you achieved and will you be able to use it in MXB?

TheFatController

  • Full Member
  • ***
  • Posts: 224
    • View Profile
    • MXB-Central
Re: Rally stage (WIP) and info
« Reply #3 on: December 30, 2016, 01:56:01 PM »
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.

Mace-x

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Re: Rally stage (WIP) and info
« Reply #4 on: December 30, 2016, 03:30:01 PM »
Looks nice Fats!, gotta get a license for wrs, hopefuly soon hahaha

janaucarre

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 922
    • View Profile
Re: Rally stage (WIP) and info
« Reply #5 on: December 30, 2016, 03:30:49 PM »
Looks nice thx

TheFatController

  • Full Member
  • ***
  • Posts: 224
    • View Profile
    • MXB-Central
Re: Rally stage (WIP) and info
« Reply #6 on: December 31, 2016, 12:22:15 AM »
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.


Alby46

  • Hero Member
  • *****
  • Posts: 954
  • GP Bikes Italia Co-Founder
    • View Profile
Re: Rally stage (WIP) and info
« Reply #7 on: December 31, 2016, 12:33:33 PM »
Really cool, it's nice to see that someone cares about wrs
Still riding a 50cc, but enjoying it :)

Stout Johnson

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
Re: Rally stage (WIP) and info
« Reply #8 on: January 01, 2017, 04:31:23 PM »
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

  • Hero Member
  • *****
  • Posts: 658
    • View Profile
Re: Rally stage (WIP) and info
« Reply #9 on: January 01, 2017, 08:14:02 PM »
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.

TheFatController

  • Full Member
  • ***
  • Posts: 224
    • View Profile
    • MXB-Central
Re: Rally stage (WIP) and info
« Reply #10 on: January 01, 2017, 08:44:11 PM »
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

  • Hero Member
  • *****
  • Posts: 658
    • View Profile
Re: Rally stage (WIP) and info
« Reply #11 on: January 01, 2017, 09:04:21 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.