Slipt edges as smooth transition between objects

Hello,

I’m currently trying to do the inverse of the edge splitting with 2 or more objects in order to get a smooth visible transition while using light.

this is the problem so far:

this is what I want it to look like:

I think I need to change the normals but don’t know to what, but I wanted to know if this is possible with shaders or if there is any other possibility.

Regards,
Jamiro

You need to force the vertices along the shared edge to have the same normal in both objects. Typically, you’d just average the two normals, normalise (if needed), and assign the result to both vertices.

You probably can’t do this with shaders, as the shader invocation for one vertex won’t have the other vertex’ normal available to it.

So, could I just point those vertices normals up (like [0, 1, 0])? Because I can’t access the vertices from one object while processing another object.

[QUOTE=GClements;1290159]
You probably can’t do this with shaders, as the shader invocation for one vertex won’t have the other vertex’ normal available to it.[/QUOTE]

Sure, but what I really meant was if discarding the normal lighing system and using a shader-based lighing would this still be an issue? Because I never used one, I don’t know if I can calculate normals on the fragment base.

thanks for time.

That would avoid the discontinuity. But it would look wrong in other ways.

[QUOTE=Jamiro;1290164]Because I can’t access the vertices from one object while processing another object.[/QUOTE]Then you need to change that. The normals along the edge of one object need to take the other object into account in their calculation.

You still need vertex normals when using shaders.

Thanks

PS: just need to type more, it was too short to post.