• Welcome to MX Bikes Official Forum. Please login or sign up.
 
October 16, 2021, 04:46:46 AM

News:

MX Bikes beta16b available! :)


Bike floating over ground + thickness question

Started by Rom, September 19, 2021, 06:50:29 PM

Previous topic - Next topic

Rom

September 19, 2021, 06:50:29 PM Last Edit: September 19, 2021, 07:46:17 PM by Rom
Hi there !

I have a bit of a problem. While testing my track I found out that the wheels do not touch the ground as you can see in the attached image. Did you encounter that problem ?

I guess it might be related to the thickness which I find confusing.
Why is there a thickness for both the textures and the materials ? What does it do if you have a total amount of textures thickness different than the total amount of materials ?

Here are my .hmf and .tht files for which I have removed unrelevant informations.
Track.hmf
samples_x = 2049
samples_z = 2049

data = bostwick creek.raw

size_x = 475
size_z = 475
scale = 9

num_layers = 5


layer0
{
}

layer1
{
thickness = 0.2
}

layer2
{
mask = Masks/soilTop.tga
thickness = 0.1
}

layer3
{
mask = Masks/mask_grass.tga
thickness = 0.01

}

layer4
{
mask = Masks/mask_grass_dry.tga  <- if you sum mask_grass and mask_grass_dry it does not go over 1 ( or 255 )
thickness = 0.01
}


track.tht
samples_x = 2049
samples_z = 2049

data = bostwick creek.raw

size_x = 475
size_z = 475
scale = 9

num_material_layers = 4

material_layer0
{
material = compact soil
}

material_layer1
{
material = soil
thickness = 0.2
}

material_layer2
{
material = soft soil
thickness = 0.1
mask = Masks/soilTop.tga
}

material_layer3
{
material = grass
thickness = 0.01
mask = Masks/maskGrass.tga
}

In my understanding I have .31m of thickness so should be good no ?
Any ideas ?

Thanks for your time :)

𝖙𝖋𝖈

You haven't included the most important part of either the hmf or the tht - the heightmap physical scale at the top.

The hmf deals with visuals and the tht deals with collisions. They need to match and my guess is either they don't match, or you have an old tht in your track folder.

Rom

September 19, 2021, 07:47:25 PM #2 Last Edit: September 19, 2021, 07:59:07 PM by Rom
Thanks again for answering my post TFC :), I have added edited my post to include those informations. But yeah I forgot to update the collision part.
I use Resolute Kraken tool. I forgot to click on Build TRH :p

You were right :) Thanks !

Concerning my questions on thickness, what is the benefit of having it on the texture side as well ? Seems like a headache if you have let say 10 textures layers for a lot a texture variations but only 2 materials. 

Resolute Kraken

Just use "Build All" then you don't have to remember.

Resolute Kraken

I'll also pretty sure that TFC explains the thickness in his videos - I do as well (it is even in the user manual for the builder tool (page 15).

Rom

September 20, 2021, 07:07:27 PM #5 Last Edit: September 20, 2021, 08:32:21 PM by Rom
Yeah, you are right "Build ALL" does not take much more time.
Thanks for your tool btw, helps a lot!

I saw the explanations both of you provided. My question regarding thickness was maybe more about good practice in the end. Because at my understanding level it seems there is 2 ways to achieve the same thing and maybe one is less error prone or more performance friendly than the other.


In my case I wanted to do per material variations. For example two types of grass: dry grass and normal grass (could be more variations). They basically occupy the same material layer but requires two different texture layers.

From my understanding you could go with 2 materials layers,  use the mask for the dry grass on one material layer and for the other layer the normal grass mask.
OR you could have 1 material layer for which the mask is the sum of both the dry and normal grass. The thing is that it uses one more texture for that material mask and you have to be sure that the sum of both textures' mask is equal to one( I guess that also relevant for the first option so you don't layer grass on top of grass).
So one way uses more textures for the combined masks but requires less material layers, require more memory but be more performant on the game engine ?

That s why I am a bit confused and would have liked a more in depth explanation :)

Thanks anyway for your time guys.