Jump to content

Ambient occclusion by viewer - ignores smooth shading?


Drongle McMahon
 Share

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

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

Recommended Posts

Oh dear. I haven't generally had ambient occlusion turned on in the viewer. Since I got a new computer that can handle it, I turned it on. Alas, I see that the inside of a smooth-shaded cylinder now has ribbed shading, which should only happen if the corners were not smooth. This happens whether I upload a model with the normals set for smooth shading in Blender, or whether I generate them in the uploader. Either way, they viewer ao appears to ignore the normals. Is there a setting I need to make to make it work properly, or is this a bug/limitatiuon? It pretty much ruins the appearance of internal smooth cylinders.

Baking the ao in Blender, just to compare, I noticed a strange effect. With all set to flat shading, the inside ao has ribs, and the outside is completely smooth, as I expected. When I set it to all smooth* shading, the inside becomes completely smooth, respecting the smooth shading, but now the outside has very faint ribs! Surely that's not supposedv to happen?

*eta - corrected "solid" to "smooth"!!

Also "solid" changed to "flat", as Blender has changed that.

Link to comment
Share on other sites


Drongle McMahon wrote:

Either way, they viewer ao appears to ignore the normals.

I haven't tested this, but for occlusion there are different rules than the shading where the normals are important. Did you upload a model with very few sides? The less sides, the sharper the corner between two adjacent faces (I suspect this angle is the main factor in occlusion) I'd expect to see some occlusion then. If it also happens on a cylinder with "many" sides, who knows how many "many" might be, I would call it a bug.


With all set to solid shading, the inside ao has ribs, and the outside is completely smooth, as I expected. When I set it to all
solid
shading, the inside becomes completely smooth, respecting the smooth shading, but now the outside has very faint ribs! Surely that's not supposedv to happen?

 

I suspect you mean "smooth" where I made your "solid" bold.

What you describe doesn't make any sense to me, the second part that is, it might be a Blender bug.

 

EDIT

occlusion_baked.PNG

This is in 3ds max, it's the viewport so the quality isn't perfect.

The two left cylinders (or tubes really) are set to smooth on inside and outside, the one on the right had no smoothing groups (same as "solid" in Blender I guess) when I baked the occlusion. The far left one looks like one would like it. the one in the middle has the effect you noticed on the inside, but not very noticable. On the right it's very clear, there's even a light line across the face where the quad is triangulated. (the black zigzag is not on the map, that's a viewport shadow effect). On the outside all look like one would expect though.

I suspect the bake is bugged in Blender. For SL, I think it's what one can expect in a realtime environment. Even the maps here which took a good couple of seconds on a high end computer aren't perfect.

For baked maps you can do "the usual", add a subdivision modifier when baking your textures to get a better effect.

MORE EDIT

There are some AO settings in the debug list, called "RenderSSAO". Maybe you can play with those a bit.

Link to comment
Share on other sites

Depends what you meanj by "very few". It is a 32 segment cylinder with a gap to walk in. Actually I was making a tower, but made this to look at the problem. Here is a picture of various versions. The one with the asterisk is the problem one. The cylinder model is smooth shaded, but the SL AO is as if it were flat shaded. The cylinders in the ight column are all a flat shaded model. All except the second row are with SL AO turned off. At the top, as in the second row, no texture applied. The bottom two rows have baked cAO from Blender, baked on the flat-shaded model in the third row (looks like SL AO with no texture), and baked from the smoooth shaded model in the bottom row.

aotstcyl.jpg

bl = texture: no = none; fl = baked ao on flat-shaded model; sm = baked ao on smooth-shaded model. sl = Ambient occlusion on/off in SL

So the problem is that the SL AO on the smooth shaded model has the corner effect and it should not (asterisk).

This effect is size dependent (presumably because of AO falloff parameters). It becomes imperceptible with the cylinder less than about 4m diameter. So it's a problem for big stuff like buildings.

I agree that the appearance of ao on the outer surface is a Blender artefact - so I won't address it further here.

Link to comment
Share on other sites

Played with the RenderSSAO settings a bit. Apart from settings that effectively turned it off completely, only RenderSSAOScale had a potentially useful effect. It's 500 by default. Setting it to 100 reduced the artefact so that it was only visible at small viewing anges (Uh?), while leaving some AO effect on the flat shaded version. Of course, most people will be using the default. So it's a bit like RenderVlumeLODFactor for bad sculpties- you can solve the problem for yourself, but then others all se the horrors you have hidden.

Link to comment
Share on other sites

Yes. I guess that's it. If it does any normal testing at all, then it's not enought to deal with the effects I described. I guess it would need a normal gradient (derivative) really. That also explains why the effect is dependent on the angle of view. I tried a whole lot of cylinders with different segment numbers. All about 10m diameter. The picture is without any post-prcessing except a resize. Blank texture throughout.

aoartefact.jpg

Iy looks like you can see the artefact clearly at 30 segments, but it's gone at 60 segments. That makes it very expensive in LI to avoid. More worrying is that below 15 segments, the artefact is clearly visible on the outsides! I guess it must be sampling the nearby inside faces even though they aren't relevant.  It also affects the insides of standard hollowed spheres and cylinders, as shown here...

aoartefact_stdprims.jpg

This could be a problem with a lot of existing stuff.

Link to comment
Share on other sites

Lots of photos there. You guys have been busy.

 

Just wanted to say that I have always run with ambient occlusion on and most often have shadows on also. I do not see the issues you see, so it may be something in your viewer settings. When I make something with a circular interior I rarely use more than 16 sides. I use Firestorm. If you do to, you might want to ask in the group support. If you are using the Linden viewer I am not sure there is support. So don't discount that there is something I have turned on or off they you don't and that THAT is the issue.

Sorry, but I really don't know what it might be.

 

OK. I logged in and did some testing. If I turn "aniscopic filtering" off I can see faint lines like you see, not as pronounced and that might be partly differences in graphics cards. So that doesn't solve the issue, but it is something to know about :D.

Link to comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...