Getting lighting to ignore normals

Godot Version

4.7.1

Question

I’ve been trying to make an old looking game and I’m struggling to get this last thing right. It started with this:
I wanted straight down vertical lighting, kind of like DOOM. When i tried this though, I realised that the light tapered off based on the normal of the faces.

So to fix this, i made a flag in my shader called “outdoor” that shifted the NORMAL up by (0,1,0).

wrote it into my import script so anything with “out_” in its name gets it.

Now this then made me try another thing, which is having meshes lit not at all by normal, but by plain distance. Can’t figure it quite out.

To explain the issue as plainly as possible, I want to remove the darker part of this sphere thats being lit by a directional light.

I understand that ambient light basically does this, but thats adding light. I don’t want to add/remove light in doing this, just the way its interpreted.

And replace it with what?

not sure what you mean. with light? like if the light just passed right through it and showed on the other side as well. im as confused as you probably are

What amount of light? What happens with the light gradient on the lit side which typically goes from light to dark?

Can you make a visual mockup?

this pretty much? its like if you had ambient/background lighting, but you dont

Use EMISSION or IRRADIANCE in the shader. Note that this will add to the lit side as well so you’d want to scale the light source intensity down to compensate.

both would make stuff glow in the dark though, no?

Well isn’t that what you want? The unlit side of the object is “in the dark”. The local illumination model doesn’t know what represents “dark” to you. The only information it operates on is directional/positional light source and the mesh normal.

You can try using global illumination in the world environment node but have in mind that it requires some setting up and may not behave exactly how you want it to.

i cant explain it any other way than light going through the mesh. it doesnt really add or remove light from nowhere, it just gets the light that it recieves and doesnt fade it out with its normal.

You can make a mockup in Blender.

Isn’t ambient lighting exactly what you’re looking for though? Why don’t you want to use ambient lighting to achieve the effect?

it makes indoor areas brighter, and i want those to be entirely lit by omnilights/spotlights not the ambient light

Hmm… I think you need to implement your own lighting model through a .gdshader’s light() function then.

yeah, been tinkering with that for a while now and the normal manipulation is the best thing ive got so far. issue is though, it tends to cause some weird artifacts at certain angles, which makes sense.

Try enabling backlight and refraction in the standard material. That should keep the object dark inside cast shadows.

tried backlight, currently trying some subsurface scattering shaders and it kind of works. issue is, it still has these bands of dark that get near the edge of the light.

i think i’ll try adding the light from an inverted normal ontop of the normal light and see how that looks

Did you enable refraction as well?

Subsurface scattering is hard to control and is kinda overkill for this art style.

refraction didnt really do much. yeah ik, just trying out different shaders to see how they do it. im not using godot’s built in material thing

You can always convert material to a shader and look at the shader code.

The problem here is that your description is contradictory. You seem to be wanting things that cancel each other. That’s why it’s best to make a mockup in Blender, to visually articulate what you want and see if it even makes sense from the lighting perspective.

i just dont know how else i can explain it. the light is going through instead of stopping inside of it and not lighting the bottom too