• Welcome to MX Bikes Official Forum. Please login or sign up.
 
April 20, 2024, 05:50:40 PM

News:

MX Bikes beta18j available! :)


Textures not respecting layers

Started by Niko Mouk, March 18, 2016, 12:42:12 AM

Previous topic - Next topic

Niko Mouk

March 18, 2016, 12:42:12 AM Last Edit: March 18, 2016, 01:11:30 AM by Niko Mouk
Hey again, sorry first track so many issues :)

I follow the video tuts and I'm having something strange with the textures : my grass, which is 0 layer, is sometimes going over the dirt (layer 1) and most of time after falling on the track.

Any idea ? It's not happening in mapview, only in game

num_layers = 7
layer0
{
map = maps/grass.tga
repetitions = 50

grass
{
max_density = 25
height = 0.3
height_diff = 0.1
width = 0.25
width_diff = 0.1
texture = maps/grassfx.tga
densitymap = maps/grass_mask.tga
}
}
layer1
{
map = maps/dirt.tga
repetitions = 50
mask = maps/dirt_mask.tga
}
layer2
{
map = maps/dirt_wet.tga
repetitions = 50
mask = maps/dirt_wet_mask.tga
}
layer3
{
map = maps/mud.tga
repetitions = 50
mask = maps/mud_mask.tga
}
layer4
{
map = maps/mud_wet.tga
repetitions = 50
mask = maps/mud_wet_mask.tga
}
layer5
{
map = maps/mud_treads.tga
repetitions = 50
mask = maps/mud_treads_mask.tga
}
layer6
{
map = maps/mud_treads_wet.tga
repetitions = 50
mask = maps/mud_treads_wet_mask.tga
}

Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

Niko Mouk

March 18, 2016, 01:09:58 AM #1 Last Edit: March 18, 2016, 01:33:37 AM by Niko Mouk
IN GAME :




MAPVIEW :
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

𝖙𝖋𝖈

This is probably because your layers don't have a thickness defined in the tht file..

Also it's worth saying that grass shouldn't be later 0. Layer 0 should always be dirt, as when you tear up grass you get dirt, but when you tear up dirt you don't get grass!

Niko Mouk

March 18, 2016, 01:34:39 AM #3 Last Edit: March 18, 2016, 02:21:27 AM by Niko Mouk
uhm... You are logically right.
I update the previous post with mapview render, strange no ?

In tht I only have :

samples_x = 2049
samples_z = 2049

data = heightmap.raw

size_x = 562
size_z = 562
scale = 13.64742

num_material_layers = 1

material_layer0
{
material = soil
}


I've put dirt as layer0 without any mask and I still have the bug but not with the same layers now... I'll play with the thickness tomorrow.
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

BadStar

Sorry a bit off topic..but your track looks nice and I must say I am excited about the pre existing ruts in the turns!! Can't wait!
Most Active In-Game        PM me and I may be able to race!
Mon-Fri
East Coast: 4p-10p 
Forum Time: 9pm-3am (-5)
Sat/Sun Anytime

Niko Mouk

Quote from: BadStar on March 18, 2016, 04:31:17 AM
Sorry a bit off topic..but your track looks nice and I must say I am excited about the pre existing ruts in the turns!! Can't wait!
As soon as I fixed this textures issue I'll send it to stonerider and conceptgraff for beta testing while adding objects, then you can expect a release :)
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

𝖙𝖋𝖈

Quote from: Niko Mouk on March 18, 2016, 01:34:39 AM
strange no ?

Not really strange no. If there is no thickness the texture will disappear as soon as you touch a square of it.

Niko Mouk

March 18, 2016, 09:43:01 AM #7 Last Edit: March 18, 2016, 12:24:45 PM by Niko Mouk
Right  :D

Another question, I saw the frame parameter in the tuto file, how it works ? Do you define somewhere that's frame1 used when it's rainy or cloudy ?
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

Snappe

frame 1 simply defines an alternate texture to use in wet conditions.


Niko Mouk

Hey ! If you like my work, you can 💰 donate on Paypal, thank you !