Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Jayman2000 |
I’m trying to make a game that’s like Wolfenstein 3D. In Wolf 3D, all of the walls that are facing north/south are darker than the ones that are facing east/west. I would like to add a similar effect to my game.
Wolf 3D accomplishes this effect by storing two separate textures for each tile. I would like to only store one texture for each tile. In order to apply one texture to every face of a cube, I’ve created a SpatialMaterial who’s uv1_scale is Vector3(3, 2, 1). To create the darkening effect, I used a detail texture who’s Blend Mode is set to Mul.
Here’s the issue: uv1_scale is being applied to the detail texture. Setting detail_uv_layer to UV2 doesn’t seem to change anything. What is detail_uv_layer supposed to do?
Here’s a minimum reproduction project. scenes/six_faces.tscn shows off the effect that I’m looking for, but it stores the face six times. scenes/one_face.tscn shows off what I’m trying to do to achieve the effect while only storing the texture once.