Getting lighting to ignore normals

Yes but you need a full scene mockup that shows what happens with cast shadows and how the object looks when inside cast shadow of another object. Are all objects in the scene to behave this way or only some etc…

If light passes through the object then it cannot cast a shadow. So those two things are “incompatible” with each other.

Once you have clearly defined how the scene visually behaves, then we can see if this is doable via built in lighting, or you need to write a custom light function in the shader.

left is what im trying to do, right is what it normally looks like. left goes through and lights the back side as it passes through. this is as good as its gunna get

I’m making an example for you right now. Give me around 30 minutes.

You still haven’t shown what happens with the cast shadow. Your mockup should at least include a ground plane and light coming from above.

well if this was an effect triggered by a slider in a shader for a single object, it would only effect that object. not the light or anything else around it

Just make the mockup because talking about those things can be unclear.

Have in mind that Godot’s real time renderer doesn’t to light raytracing, so you cannot really calculate the light “passing through” an object. You can possibly fake it but without the exact mockup we can’t know what are we faking.

Should this support multiple light sources? We’ll need a mockup for that as well.

Btw this mockup you posted can be fully reproduced using backlight:

idk i never really considered backlighting cause it still had a dark patch when i tried it on a pill shape. recreated here

Well that’s because you didn’t disable shadow casting for the object.

i mean like on the pill, not the floor

It casts shadow onto itself.

i think its sorted, im not sure what i had that was messing stuff up and i apologize

I’m running into some limitations in terms of what’s available in Godot’s shader built-ins for a shader’s light() function.

ATTENUATION takes shadows into account so I can’t easily retrieve the distance to a light source and produce the uniform shading that @Wodge wants. My hope was that you could simply compute the distance to a light source and then add this to DIFFUSE_LIGHT to avoid the shading (shadows) that appears on the side of the mesh facing away from the light. The problem with this approach is that it removes any occluders from the equation. The shadow from a house will, then, not affect the mesh as well – it becomes emissive, essentially.

The lighting that I think you have in mind is one where the shading is based on the position of the object; not per-fragment or per-vertex. Moreover, shadows maps should not be applied to the mesh. Instead, a simple modulated color is desired. Am I correct about this?

If you want to create this, I would go with creating a custom node that does this for you. By gathering all lights in the scene into a list, you can compute the attenuated lighting on the object based on its position and use that value in a shader to primitively shade the object as you intend.


As for BACKLIGHT being an option, I didn’t find that it produced the desired effect. As @Wodge points out, there is still shading happening on the mesh.


@Wodge can you confirm that my previous description of what you want is correct? Then I can create the example for you.

EDIT: Lol. I guess it works. Nevermind ’ : D

It’s not shading, it’s a cast shadow from the object onto itself.

oh man.. this was the rough idea i had at first though! light purely by distance. didnt think about the shadow of the house not working on it though

Oh, I see! So disabling shadows will make it work, yes. My bad.

Isn’t this the same as being unshaded though? Now I’m confused about what the problem was.

so in my main shader, which is basically just this, in the light() void it uses standard lighting to posturize the lights to give a limited color palette look. something about standard lighting just gave me these unavoidable extremely stark shadows that i just had assumed was default to godot. my bad for that

Alright. Well, you got there in the end.

oh my god. quadruple apology i just figured it out. with standard lighting you can define what diffuse lighting you can use and i had it on diffuse_lambert instead of diffuse_lambert_wrap.

image

check out the texel lighting thing if you havent its pretty sick