Rob Posted June 27, 2012 Posted June 27, 2012 Is it possible to only project the normal map of a decal on the terrain? I want to do this to create some kind car tracks on the terrain
carl.sutton Posted June 27, 2012 Posted June 27, 2012 Can you not use a 16x16 diffuse texture with zero alpha values (i.e. a blank texture)?
Rob Posted June 27, 2012 Author Posted June 27, 2012 Can you not use a 16x16 diffuse texture with zero alpha values (i.e. a blank texture)? Ye that was my first guess too but it makes the entire decal invisible
carl.sutton Posted June 27, 2012 Posted June 27, 2012 In the decal samples the material only uses the ambient render state and skips other lighting states so no normals are taken into account. It could be the case that you need to skip ambient and turn Light world/proj/omni/spot states to default.
Rob Posted June 27, 2012 Author Posted June 27, 2012 In the decal samples the material only uses the ambient render state and skips other lighting states so no normals are taken into account. It could be the case that you need to skip ambient and turn Light world/proj/omni/spot states to default. Getting closer but still no go, I got the light world/proj/omni/spot set to default and deferred and ambient set to skip, as soon as I set deferred to skip the terrain was visible again + the normal of the decal was applied to it But now I still get a large lit up square around it as its not using any alpha, I could most likely fix it by using an alpha channel but then the track would still have a much lighter color exactly as the square
manguste Posted June 27, 2012 Posted June 27, 2012 If you do not want a light square, you need to prepare such normal map that does not reflect light around the edges. Black color is for negative normals.
Rob Posted June 28, 2012 Author Posted June 28, 2012 If you do not want a light square, you need to prepare such normal map that does not reflect light around the edges. Black color is for negative normals. Nice this seems to work! But isnt there a better solution for this? as I just want tracks in the sand and no specular tbh would be nice if the specular was seperated somehow...
Rob Posted June 29, 2012 Author Posted June 29, 2012 No solution to seperate the specular from the actual normal map itself? I just dont seem to get the tracks to look right when painting over the normal map as it blocks out details of the normal map
carl.sutton Posted June 29, 2012 Posted June 29, 2012 The decal material has a specular multiplier parameter which when set to zero will remove all speucular highlighting. Equally the specular colour multiplier can be set to black for the same effect. But somehow I feel that this isn't what your after. Your still going to get something like in manguste's post which just looks like a colour halo of the normal light reflections. A decal is an overlaid texture, it does not modulate the texture of the terrain uderneath so you cannot merge normals to create indented tracks in the ground texture with this approach. Changing the terrains normal map to feature these tracks could be an option. The other option is to use a decal as its intended, as an overlay and giving it a respective diffuse texture. like so;
Rob Posted July 2, 2012 Author Posted July 2, 2012 The decal material has a specular multiplier parameter which when set to zero will remove all speucular highlighting. Equally the specular colour multiplier can be set to black for the same effect. But somehow I feel that this isn't what your after. Your still going to get something like in manguste's post which just looks like a colour halo of the normal light reflections. A decal is an overlaid texture, it does not modulate the texture of the terrain uderneath so you cannot merge normals to create indented tracks in the ground texture with this approach. Changing the terrains normal map to feature these tracks could be an option. The other option is to use a decal as its intended, as an overlay and giving it a respective diffuse texture. like so; Problem is we have floating vehicles so they dont leave real tracks instead just blow away sand and leave such a track, already drawing it on the normal of the terrain but this is quite a lot of work and gives me less control as I would have in the editor
Recommended Posts