MX Bikes Official Forum

Mods => Track Editing => Topic started by: Niko Mouk on March 18, 2016, 12:42:12 AM

Title: Textures not respecting layers
Post by: Niko Mouk on March 18, 2016, 12:42:12 AM
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
}

Title: Re: Textures not respecting layers
Post by: Niko Mouk on March 18, 2016, 01:09:58 AM
IN GAME :

(http://labo.elaia.ch/cortex/user-file/fylk3e6voz3wzzmi2g3y)


MAPVIEW :
(http://labo.elaia.ch/cortex/user-file/7uqc27furgtknpocdikp)
Title: Re: Textures not respecting layers
Post by: 𝖙𝖋𝖈 on March 18, 2016, 01:19:37 AM
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!
Title: Re: Textures not respecting layers
Post by: Niko Mouk on March 18, 2016, 01:34:39 AM
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.
Title: Re: Textures not respecting layers
Post by: 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!
Title: Re: Textures not respecting layers
Post by: Niko Mouk on March 18, 2016, 09:25:04 AM
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 :)
Title: Re: Textures not respecting layers
Post by: 𝖙𝖋𝖈 on March 18, 2016, 09:31:03 AM
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.
Title: Re: Textures not respecting layers
Post by: Niko Mouk on March 18, 2016, 09:43:01 AM
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 ?
Title: Re: Textures not respecting layers
Post by: Snappe on March 18, 2016, 12:51:48 PM
frame 1 simply defines an alternate texture to use in wet conditions.
Title: Re: Textures not respecting layers
Post by: 𝖙𝖋𝖈 on March 18, 2016, 01:09:36 PM
Don't forget, pretty much everything you need to know is here:

http://docs.piboso.com/wiki/index.php/MXB_Track_Creation_Guide

http://docs.piboso.com/wiki/index.php/Track_Creation_Rules

:)
Title: Re: Textures not respecting layers
Post by: Niko Mouk on March 18, 2016, 03:08:30 PM
Quote from: TheFatController on March 18, 2016, 01:09:36 PM
http://docs.piboso.com/wiki/index.php/Track_Creation_Rules

Yessss I didn't get this one ! More things are clear now, thank you for quick answers guys.