• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

TUTORIAL ROAD - How-to ? (physical and visual layer)

luchian

Administrator
Staff member
Courtesy of @LilSKi
*******************​
Another topic that can be discussed a lot. But before that, it is always best to have a good start point. So Lilski laid down some steps of his best practice on how to go about building actually the most important part of your track: THE ROAD [insert holy music]​
Well here is another best practice post. In this we will discuss the difference between the visual road and the physical. There has been some confusion and misinformation going around I would like to clear up and set the record straight.
First off years ago there was no difference between the visual and physical road. What you saw is what you were driving on. This was fine but with the advancement of the physics engines we needed more road detail to feel all the little bumps that every track has. The problem was if you added too much detail to the visual road the framerate suffered. So what developers came up with was to separate the physical road from the visual. This allowed a very high detail, and invisible, physical road to hide under the visual.
Just to show the difference this is what they look like.
Visual. The key here is the poly count needs to be just high enough so your turns looks smooth and not a bunch of straight lines. Notice the turn is of a higher detail than the straight.
1.png
Physical
2.png
Be reasonable with your numbers. For example Kunos Monza is exactly 400k triangles and the Nordschleife is around 730k triangles. The key is to make sure you set the renderable setting in the editor to false. Also obviously the the physical model should be called 01ROAD and the visual can be anything else like VISROAD
The reason this is important is if the physical layer is low count like the visual you get this "notchy" feel to your track. If you have a hill instead of driving smoothly over it you are essentially driving over one flat plane after another.
You want this
3.png
Not this. This is exaggerated for show.
4.png
There are many different ways to accomplish this so I will simply show you a few things not to do.
First is a simple subdivide. You start off with something like this.
5.png
A simple subdivide looks like this. All you did was add to the poly count but didn't change the shape.
6.png
Then there is the Catmull-Clark subdivide. Notice it smoothed it out as well as adding to the poly count. This obviously also changes the shape somewhat and there are different ways around it. This is meant to show the basic concept.
7.png
One other thing to watch out for is the spline you build the track from. You have to make sure the spline resolution is properly set. Here are some examples.
By default the resolution for the spline in blender is 10 or 12. Shown here it is set to 2 to better show what is happening.
8.png
You can see no matter how many sections you add to the road it will always follow the resolution of the spline. And remember it isn't just doing this on a turn. It is also doing this up and down hills causing the constant bumps we all know and hate from many conversions from older sims. What you want is this. Here the spline resolution is set to 64 and the road is now smooth with the same poly count as before.
9.png
The next part will show how to apply different displacement modifiers assigned to different vertex groups to create bump details in your now higher poly road surface. After that we will apply decimate and subdivide modifiers to get the triangles shown above in the second shot. If I have time later I will post it but not likely until Monday or Tuesday.
PART 2, in next post.​
 
Last edited:

luchian

Administrator
Staff member
Courtesy of @LilSKi
*******************


Part 2. I am going to go into how to actually make the second physical layer out of the visual. First off I built my track from a Bezier curve and I wanted to mention one key thing that somewhat ruined my week a while back. Under the curve options make sure "Twisting" is set to "Z-Up". by default it is set to minimum which if you mess with the camber in one section it can slightly twist the whole track.
OK so step one in track making is getting your layout. I'm not going to go into any detail on that as there is TONS of info about that. So we are going to start off that you already have a spline made and an array of planes applied to the curve like this.
10.png
The array modifier must be applied but do not apply the curve modifier.
As you can see this is fairly low poly. I am going to exaggerate a bit on this so things are easier to see. This is the point at witch you can add some polys to make the turns smooth. What I do is select just the edges of the section that needs some more detail and then subdivide it. A simple subdivide works here since it will take the shape of the spline and smooth it out. Without the spline it will simply add polys without changing the shape. This is why it is important to always keep the curve modifier intact.
11.png
Do this as many times as needed to get the curves to be smooth. The straights are less important but they can be fairly detailed. If you go too low you will see the straight lines going over a hill if there is an elevation change.
Now remember you can drive on this for testing by simply calling it 01ROAD. In the beginning it is easier to keep things simple and make sure everything is as you want it. Once you are happy with it or have it pretty darn close you simply duplicate it. I moved it up on this for show but when dealing with things like this it is best to send it off into another layer with the M key.
Now I simply subdivided 3 or 4 times. You can use the tool for this or the modifier it is up to you. The tool is somewhat of a one way street where using the modifier can simply be deleted at any time. Also remember if you do need to make changes BOTH still have the curve modifier active. So simply change the curve and both will be identical.
12.png
Now comes the fun and tricky part. Adding bumps to your surface. Bumps are only applied to the physical layer. When you are done you shrinkwrap the visual over the physical and it matched the bumps as close as it can.
If you don't know how to use vertex groups then read up on it. I'm not going to go into detail on how to do it since it is fairly simple to learn on your own. But basically you create a vertex group and select the verticies you want assigned to the group.
I made two groups in this. One will be a rough bump and one more of a wave. Go ahead and assign a displacement modifier to your physical mesh. You will see a section for texture and vertex group. First select the group you want it assigned to. Then click "new" under the texture section. It would be a good thing to name this texture at this time. Next you want to click the little icon that is circled in red below. It sends you off into the texture section automatically. Below that is the texture section. It is the red and white checker board icon.
13.png
Play with these settings all you want. I like clouds as it is very versatile. Here are the two sections both done with the cloud texture. These are both set to extremes for show. My largest bumps on Bridgehampton are .065.
14.png
Also they do not have to be fully separated like this either. If you want a small amount of noise throughout the whole track you can have a vertex group with the whole track as well as the separate sections. A vertex can be applied to multiple groups.
So now we want to make that irregular surface as shown in my shot int he first part of this. This is as simple as applying a decimate modifier and then a subdivide modifier.
15.png
Play with the numbers as you see fit and subdivide as much as you need.
And there you have it. As always I hope this helps someone in their track making ventures. And if anyone has anything to add please do.
 
Last edited:

luchian

Administrator
Staff member
In order to test each of the versions, one has to apply all modifiers and split the road into <65k sections, right ? But since you always seem to have some ace up the sleeve @LilSKi did you use any trick to avoid applying the modifiers ? (I can't think at any).

Also, when referring to defining different vertex groups, you'd do that arbitrary (like, knowing one section is bumpier - make one group only there) or are you using some randomizer thingy ?

(In my case, since I do not know of any bumpier sector, I've just applied it to the entire track).
 

LilSKi

Well-Known Member
make a single piece road that you put your noise onto. Then you shrink the road that is already split into pieces down onto the single high res road with the noise. So all you have to do is tweak the single piece road and the pieces should follow and you only export those.

As for vertex groups I would study video and note which sections look rough and assign the groups manually.
 

Prototype

Well-Known Member
Thanks for sharing this guys. Makes a lot of sense.
Will be implementing this technique for sure.
Basically the collision mesh concept translated to roads. + 1
 

onearmedkiwi

New Member
Say I already have a visual/physical road (I created a road for GP Bikes that I'm now converting to AC) can I still easily create a physical only road mesh?
 

onearmedkiwi

New Member
I guess they'd have to be, my road is just shy of 13km and is a hill climb/descent, in real life there are lots of lightly to slightly heavier rutted corners. I started experimenting by cloning a section of road, subdividing it further, applying a displacement modifier to it and then shrinkwrapping the visual road to it. This seems to work but obviously adds a lot of vertices to the map. It could be too much eventually for the editor to handle, plus keeping under the 65k limit per mesh.

Trying and learning but if anyone has any advice I'm all ears. Well, eyes.
 

onearmedkiwi

New Member
Yup I had to cut my original road into 4 sections to get past the vert limit, if I was to make a physical road for the entire length (subdivided to allow for greater fidelity) then I'll be cutting that into lots of sections! The other option is just to provide physical sections for only certain corners/straights rather than the whole length.
 

BangingGears

New Member
not sure if this is a good place or the right place to ask for help... if not I apologize...

I hope someone can help here!
I am making a massive track for my first one...yes yes yes, I bite off way more then I can chew, go big or go home they would say when I was a young lad...I started and now I have to finish it.

so I have 6 different layouts and have been able to create some AI Fastlane on all the "Rally" type tracks, but the circuit layouts wont save... I have double and triple checked the AC objects they are correct...and the naming convention is correct.

the road is separated into the physical meshes and visual meshes...

when I try to save the Fastlane or the pitlane it just doesn't save...doesn't crash or anything...just wont save...

I was reading that any "hole" in the road meshes cause issues,
so i have a couple questions... does the actual physical road have to be physically touching any "Pit"...as this is a real world road there are many Stops to view the area so many "pit stops"... the physical road is broken up into 70 road sections.
Can they have a small space where they meet up or should I attach it with a Shrinkwrap?
anyone have any idea what could be wrong?

I don't understand as a couple of the Rally tracks layouts use the roads that make up the circuit type tracks. they save just fine.
 

fughettaboutit

aka leBluem
You have to "record" the AI Line. As far as i know you dont have to save it on your own.
Drive 2 laps or more and when you exit the game (Exit in pause menu), it should save the ai line.

First hit the "start recording" button in the AI-app.
(you can close the app now, but then you dont see if you get a nice connection on the second lap)
Then drive at least 2 laps!
8836
 
Last edited:

BangingGears

New Member
You have to "record" the AI Line. As far as i know you dont have to save it on your own.
Drive 2 laps or more and when you exit the game (Exit in pause menu), it should save the ai line.

First hit the "start recording" button in the AI-app.
(you can close the app now, but then you dont see if you get a nice connection on the second lap)
Then drive at least 2 laps!
View attachment 8836
as I tried to explain in my post, maybe I explained it wrong...I'm not great with words, I know you have to record the Fastlane, I have recorded all the fastlane and pitlanes for the Rally layouts, its when I do the circuit type layout it wont save...it shows As I am recording...the recording button goes red... but when I exit out, there is no save fastlane.Canidate.
 

luchian

Administrator
Staff member
I think I had this issue as well on a private testing project.
And, iirc, I had to disable CSP completely to get it to work.

Another scenario to explore might be the axis orientation of the track/road mesh itself. 3D software Z should be up, iirc.

I'm sorry I can't be more precise, I am speaking from memories - it's been a while since I tried this.
 

BangingGears

New Member
I think I had this issue as well on a private testing project.
And, iirc, I had to disable CSP completely to get it to work.

Another scenario to explore might be the axis orientation of the track/road mesh itself. 3D software Z should be up, iirc.

I'm sorry I can't be more precise, I am speaking from memories - it's been a while since I tried this.
Thanx, any and all help/ideas are greatly appreciated.
 

BangingGears

New Member
Is the time taken correctly after you finished that lap?
If it is then maybe its the thing with the hole in the road..

hey

It doesn't post a time. just closes like normal.

I went late night last night going through all the physical road sections and they are all connected and any hole was plugged.... I did find a couple where the road was a little above the next...but they are all tight now...I shrink wrapped them to make sure... ran through it and it still wouldn't save... very weird... it cant be that the road is too long? there are other very long tracks out there.
 
Last edited:

BangingGears

New Member
8838


so I went and changed the AC objects, just brought them lower to the ground... ran it and it crashed this time..but it did show a time done.....so I am guessing that means I didn't find all the holes...
 

Rob Pawn

Active Member
i still run through this issue as well... might be worth to try what luchian said. Disable the whole CSP thing.
I do even made the road as one mesh to avoid any holes.
Another thing i saw strange behavior with boarderlines. Might be worth a test without any surroundings.

Road length i was worried as well. For TrafficAI Lanes they recommanded not recording more then 10km Splines - cause it would have exobitant loading/saving time. Maybe its an computer hardware issue then, that RAM or whatever crashes. At least in my case... I have a Asus Board with AMD and damn this system is very unstable in a certain Bios configuration.

Pls share your solution when you have success.
 
Top