WorldAlignedTexture causing issues with flashlight

For my PS1 style game project I decided to utilize a world aligned texture for parts of the maps to simplify the process of texturing but I have ran into an issue that did not exist untill now as far as I know. Bascially what happens is that when I shine my flashlight down a completely dark corridor it doesn’t apply the light the way its supposed to, how do I know this? Well here’s the really weird part: when I turn 180 degrees and shine the light the other way the walls light up exactly the way they’re supposed to. Im gonna include an example pic and also a glimpse into how everything is set up:

As you can see it is significantly darker than it should be and does not look right whereas looking to the other side everything lights up perfectly. I’m using a simple spot light parented to my character camera (with some additional controls for turning on and off) and the world geometry is a mesh made in a grid formation in blender (sort of like the silent hill 1 maps, divided into even squares)

as for the texture itself I simply use some texture objects linked to a worldalignedtexture node and so I can’t for the life of me figure out what is causing the issue except maybe some lightmap issue or issue with how the the worldalignedtexture interacts with light? I also want to inform everyone that I have tried using a regular texture and it works fine so I doubt its an issue with my mesh.

Can you show the material? Did you use the world aligned normal also?

I did not, the material is just 3 texture objects (albedo, normal map + roughness) connecting to texture T2d on a worldaligned texture node then xyz output into the result node. The only change I’ve made to the worldalignedtexture material function is changing sampler source on the texture sample nodes to “from texture asset” which doesn’t change anything regarding this issue.

Ok, but it’s the light that’s wrong, and that’s why you need this node for the normal :slight_smile:

image

am I supposed to use the XT texture output? Because it caused some very unslightly stretching, XYZ doesn’t dix anything either.

Imgur: The magic of the Internet here is what it looks like, like I said I tried XY and XYZ and XYZFlatTop

The picture is correct.

Well it doesnt fix the issue, it looks the same as when I posted the thread

1 Like

Well, it works better than doing the normal with a texture node :wink:

To be honest I can’t see anything in that first picture…

imgur XNZcenE the environment does not look better, the end result is the exact same.

I cant paste links cause of spam flagging but thats the specific part of the imgur link

I get a 404 with that link.

I don’t know what the problem is. I have very little to go on.

I’m assuming the normal map is the correct one for the texture?

Probably editing the function isn’t helping.

Maybe you can’t post rn…

I’d change the function back to normal, and work with the WA normal node.

It should work…

I was just gonna make a post saying Im confident the normal map is fine, then I had the idea to try the exact same texture without the worldaligned node and it had the same issue, I then removed the normal map and it works… Might have to look into this cause it hasn’t happened before

1 Like

Could also be related to tinkering with the function. The normal node is assuming you’re using the standard texture node.

Nah it was a problem with my normal map not being the right colours I think, I used a software to colorlimit my textures and crunch them down to look more retro and I think I used it on my normal map causing it to be incorrectly coloured and it didnt show up as an issue until now. Anyway I redid the texture using the base texture and imported than new normal map and its all working fine.

1 Like

:+1:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.