Jump to content

Visible seam when connecting two smooth shaded pieces.


You are about to reply to a thread that has been inactive for 2222 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

When I connect two of my quarter turn walkway corners to make a halve circle I get this visible edge when light hits it at certain angles. I have the sides smooth shaded with an edge split on the upper and lower corners. Is this something I can prevent or is this just SL and I have to live with it? I already tried an edgesplit on the ends of the smooth shaded side.

Snapshot_012.jpg

Link to post
Share on other sites
  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

You are in luck! I was just making you a picture. Here it is. At the top is the road section with the extra bits on. These are just additional segments of the curve. That makes the normals at those po

Christhiana wrote: Since I'm also baking a (hi to low poly) normal map with rounded edges, am I correct to assume that if I unwrap the "added parts" to an empty place on (or even outside) the UVma

i can confirm that Avastar calculates the welding wrong in certain situations (however, it works for welding head/upper/lower body of the SL Avatar). Your solution perfectly matches to what i found in

What you see is only natural because the cylinder is not circular but divided into polygons

You could make a mesh cylinder with more polygons, but that will cost on the LI side

You could also create a normal map for the cylinder
That would disguise the seam, but only when using advanced lighting

:smileysurprised::):smileyvery-happy:

Link to post
Share on other sites

It's not a cylinder but 2 quarter cylinder shapes (the same object rotated) put next to eachother in SL to make a halve cylinder shape. The seam is where the two objects meet. The sides are already smoothshaded which masks the effect you mentioned. A normal map baked from a high poly model gives the same result.

*edited to add image*

Maybe the next image show more clearly what I mean:

Snapshot_013.jpg

Link to post
Share on other sites

This is totally fixable indeed. You need to unify the vertex normals where the 2 meshes meet each other. We discussed this recently in another thread. https://community.secondlife.com/t5/Mesh/Mesh-vs-Sculpt-LI-64x64-Mesh-Terrain/td-p/2919208/page/2

The only "problem" here is Blender, because it's vertex normal editing tools are kind of not there yet. In the major 3D programs it's just a click of a button to fix these shading seams.

However, in the thread I linked to, are some workarounds for Blender as well.

AFAIK Avastar has the abillity to fix these shading seams on export also.

Link to post
Share on other sites

Yes, Avastar has a "weld normals" function which fixes this issue upon export.

But we also plan to add "export of custom normals" directly into the Blender Collada exporter. However i can not yet tell if this will be ready for Blender 2.75 or later.

Link to post
Share on other sites

Thank you for the reply!

I read the other thread and to be honest have no clue about vertex normal editing. I will update my blender to 2.74 (still on 2.73) and have a look at the new modifier tool. Hopefully it makes a little sense to me :)

I do have the Avastar plugin and once I figure out the vertex normal editing I will give its exporter a try.

Link to post
Share on other sites

Thank you Gaia!

I read the howto in the advanced section but I still cannot get it to work...

These are the models in blender, all three of them have open edges. I export the middle section using the avastar collada exporter.

blender01.png

 

I set it as in the image below:

blender02.png

But the result is still a visible edge when lining them up in SL:

Snapshot_008.png

I also tried exporting all three of the objects at the same time with the option weld edge normals but with the same result...

I don't know what I'm missing here....

Link to post
Share on other sites

ah, i see. Avastar only takes boundary edges (open edges) into account. Actually it first determines for all involved objects which of their edges are boundary edges, then for each vertex that belongs to a boundary edge avastar tries to find a matching boundary vertex on other objects. When it has found a match, the vertex normals of both vertices are averaged.

I believe that as soon as the custom normal export is supported we can drop the Avastar welding feature anyways. So i rather not try to support welding of solid meshes at this time :smileysad:

Link to post
Share on other sites

I see! It just occured to me with the road blocks. I would rather build those with closed geometry probably, to avoid visible holes if they aren't perfectly aligned. Or to prevent making end pieces. :matte-motes-bashful-cute-2:

Thanks for explaining it in detail!

Link to post
Share on other sites

You are in luck! I was just making you a picture. Here it is. At the top is the road section with the extra bits on. These are just additional segments of the curve. That makes the normals at those points the same as they are for a straight edge at that point. Then the extra bits are assigned to a metarial called "deleteme", which is red here. Export as usual. Now edit the collada file (I use the free notepad++ with wordwrap off): search for '<polylist material="deleteme', then select from this to the following '</polylist>, as shown, and delete it. Now upload the file. At the bottom is the result, viewed at sunset when the seam is most evident, with the edited file on the left, and with a corner which never had the extra bits on the right. The joins are good for curve-to-curve joints too.

roadcurvedge.jpg

  • Like 2
Link to post
Share on other sites

Drongle, that's a genius workaround! Thank you for the effort!

You know, I never even knew you could edit a collada file like that...

It'll be a bit of work, but well worth the trouble!

 

Since I'm also baking a (hi to low poly) normal map with rounded edges, am I correct to assume that if I unwrap the "added parts" to an empty place on (or even outside) the UVmap, that seam won't be visible as well?

Link to post
Share on other sites

OK, next challenge... :P

I tried editing the collada file and it works.....almost. The normals are perfect now but the problem is the bounding box now has the size of the original with added parts. I made the pieces all in steps of 2m so they can easily be aligned to a grid, this now doesn't work anymore. Also the Li got raised slightly because of it. Can I manually adjust the boundingbox in the collada file?

Link to post
Share on other sites

ok, so i looked closer at what avastar does. The caveat is with flat/smooth shading. Below you see 4 setups (from top to bottom). The 2 lower pieces are made of 2 adjacent sheared cubes. The 2 upper pieces are joined sheared cubes with duplicate vertices removed. All pieces have been imported to SL with welded normals enabled:

Image9.jpg

What you can see is:

 

  1. The Welding normals option does not work on single objects. Because of that 1 Object flat and 1 Object smooth both are not affected by the welding normals option. However they import to SL as they look in Blender.
  2. The Welding normals option only works on smooth faces! So 2 Objects flat is als not affected by welding normals.

 

When you look at 2 Objects smooth, then you see a difference between what is displayed in Blender and what is shown in SL:

 

  • In Blender you see how the objects would look without any normals trickery, so you see a hard edge
  • Due to the welded vertex normals, the edge between the 2 adjacent sheared cubes now disappears. hence in SL the 2 Objects smooth looks exactly the same as the 1 object smooth. So Avastar indeed welded the normals as expected.

And here is how you would solve your issue in your case: The 2 faces at the front side (marked with "s") have assigned smooth shading, while all other faces have assigned flat shading:

Image10.jpg

Now Avastar welds the smoth faces of the 2 sheared cubes et voila, your seam is gone.

Link to post
Share on other sites

Thank you so much Gaia,

 

I could reproduce your examples with the same effect. I now understand how the weld function in the avastar exporter works and why it only works on smooth shading (there's no point for it to work on flat shading).

Your solution for my problem will not give me the desired result though. I want the smoothing on the edge to be in only the horizontal direction. That's why I did an edgesplit on some of the edges (see image below, where I marked seams, I did an edgesplit). I now understand why this will not work with the welding function of the avastar exporter. I find it a usefull function though and I will have uses for it in the future.

Untitled.png

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 2222 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...