Getting lighting artifacts on my Procedural Mesh Component planets, the light is a moveable Direct Light and the planets are created at runtime with math and are 20 million units across. Its as if there are two direct lights pointed at each other, lighting both sides of the planet at one time. Ive played with 2 sided shadows on the meshes and two sided material on the meshes… in addition to every setting on the Direct Light and the Sky Light. The Pink light on the left of the screen is the star, the white circle on the right side of the planet shouldn’t be there. Thank you in advance and good luck, i hope you can figure it out, i dont feel like i can proceed till this gets fixed. Plenty of space games are out there and their planets look great, gotta be something simple im missing.
Go to buffer visualization and upload an image of the world normal buffer. Lighting artifacts are usually a result of bad normals. The black splotched are usually a result of ray tracing or shadow casting geometry that doesn’t align well enough with the rendered mesh (most commonly seen with Nanite meshes + RT shadows, due to RT using fallback mesh quality).
hmmm, ok, thats a start. Now to figure out how to get it the way i want it
I selected one of the Procedural Mesh panels to show ones size at this distance. Half of it is in the good and half of it is in the bad. Would that mean its some kind of light map problem/ are lightmaps calculated off of UV’s? Im not sure what to adjust next. I calculate the UV’s for each panel when its created. I wonder if theres something i can do inside the material that can help.
Anyway, thank you so much for the help!
Haha yikes, yup well there’s your problem.
The good news is that you can indeed just procedurally generate spherical normals. The surface normal of a sphere is equal to the normalized vector between its origin and any point on the surface.
Meaning you can just take the difference between the world positions and the actor position, normalize that, and use it as your normals instead of whatever that nonsense is.
Most likely there’s something wrong with how you generated the normals of the procedural mesh itself, so if you want to formally fix it, then you’ll want to investigate there.
It’s unlikely to have anything to do with UVs. But UVs can cause issues with baked lights (which I assume you aren’t using) and in rare cases normal maps too, if you’re doing something weird.
Got it fixed thanks to you. You got me onto the Normals trail and turs out i was just feeding in the normalized verts in with noise but there is a node for calculating tangents and it calculates proper normals in as well. Lighting is working as intended, i can continue with this game now, you are amazing and i love you
before
after
fixed
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.