Jump to content

SL adding shadows to top. Why?


Imagin Illyar
 Share

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

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

Recommended Posts

This pic shows my mirrored cliffs in SL.  Note the strange grey shadows on the top.

0fd13614193cf4ac38db7037fb1bb527.jpg

This is one of the cliffs on its side, no more shadow:

66dd303a76b3868614647dd48a0f4deb.jpg

There is nothing above.  Why is SL putting a shadow on the top of my models?  I'm using materials, textures are created in Substance Painter (Open GL).  If I remove the normal map the shadow goes away, but so do my details.  I'm really stumped.  Anyone have any ideas?  I'm just looking for a point in the right direction here.

 

Link to comment
Share on other sites

Unphysically behaving/corrupted shadows are suggestive of a normal map problem, especially since you said removing the texture fixes it.

I have no idea how Substance Painter works, but are you sure you're actually saving a tangent space normal map and not an object space normal map or a bump map? Bump maps are grayscale and easy to notice. This article has some example pictures which show the visual difference between tangent and object space normal maps, they're also easy to tell apart in general.

Link to comment
Share on other sites

4 minutes ago, Frionil Fang said:

Unphysically behaving/corrupted shadows are suggestive of a normal map problem, especially since you said removing the texture fixes it.

I have no idea how Substance Painter works, but are you sure you're actually saving a tangent space normal map and not an object space normal map or a bump map? Bump maps are grayscale and easy to notice. This article has some example pictures which show the visual difference between tangent and object space normal maps, they're also easy to tell apart in general.

This is the normal map, definitely not a bump map.  In Substance Painter I have it set for tangent:

db80fd40c6071ce884d1662b360ae203.jpg

Link to comment
Share on other sites

On a glance that looks like it should. The only other thing I could think to suggest is doublechecking it's saving them in OpenGL style, and that the textures inworld aren't rotated or flipped -- SL can't compensate for that, so the normal map's directions get twisted in an unphysical manner.

Outside that, don't think I have other ideas, sorry.

Link to comment
Share on other sites

Your normal map doesn't look quite right.

Perhaps recheck your Normal map options in options in SP.

From the SL Wiki https://wiki.secondlife.com/wiki/Material_Data

 

Normal Map

An image whose color data encodes changes to the "normal" for each pixel on the surface. The normal is the direction that the pixel "faces" for the purpose of determining how it is illuminated by and reflects light sources (imagine that each pixel is turned on tiny pivots). The alpha channel of the Normal Map may contain a specular exponent value that is mutilplied by the "Glossiness" parameter. A higher alpha value will result in specular highlights that are brighter and tighter. Keep in mind these are OpenGL style normal maps, where bright green is up and bright red is right. (or to put in Industry terms, the normal maps are X+, Y+, Z+ normal maps)

 

or just try this one which has its Green channel inverted to see if it makes any difference to your "shadowing "problem.

1301459523_greenswapped.thumb.png.85fb6688c045572e352204f0f03b167a.png

 

 

Edited by Aquila Kytori
Link to comment
Share on other sites

Settings in SP are correct, checked, double-checked, and triple-checked :) This is what happens with an inverted normal map:

c4440344301576931cca43baf077d43a.jpg

 

It changed things, but now all the shadows are wrong and don't go away when I turn the model on it's side.  I don't think that is the problem.  It's odd to me that the orignal normal map doesn't cause shadows when the model is turn on its side, only when upright. 

Link to comment
Share on other sites

2 hours ago, Imagin Illyar said:

This is the normal map, definitely not a bump map.  In Substance Painter I have it set for tangent:

db80fd40c6071ce884d1662b360ae203.jpg

If I am reading this correctly, it looks like the there's a dark blue-red streak where you're seeing the shadow, which should be green instead (as confirmed by the flipped UV).

Link to comment
Share on other sites

3 minutes ago, Wulfie Reanimator said:

If I am reading this correctly, it looks like the there's a dark blue-red streak where you're seeing the shadow, which should be green instead (as confirmed by the flipped UV).

I agree but inverting the normal map didn't fix the problem, it just made shadows everywhere.  I posted a pic of the cliffs with the inverted normal map above. 

Link to comment
Share on other sites

11 minutes ago, Imagin Illyar said:

I agree but inverting the normal map didn't fix the problem, it just made shadows everywhere.  I posted a pic of the cliffs with the inverted normal map above. 

I know, but what I'm hinting at is that you'll be able to fix the issue by tweaking something in Substance Painter, which has for some reason decided that up is down near the middle-seam of your model.

I haven't used SP myself so unfortunately I can't give specific advice.

Link to comment
Share on other sites

4 minutes ago, Wulfie Reanimator said:

I know, but what I'm hinting at is that you'll be able to fix the issue by tweaking something in Substance Painter, which has for some reason decided that up is down near the middle-seam of your model.

I haven't used SP myself so unfortunately I can't give specific advice.

The thing is though - it's just that strip around the edge of the model.  The rest of the normal map is fine.  When I invert the map to make red green the problem on the top and sides (edge of the model) goes away but the rest of the model is all wrong, shadows where highlights should be.  It really doesn't make much sense. 

Link to comment
Share on other sites

The vector data in this normal map looks bad. Just poking around at a few pixels and turning them into X/Y/Z data, I don't get vectors of length 1.00 like I should. There are also pixels with a blue value below 128. I don't know that that can ever happen with tangent normals -- that represents a point where the surface is so sloped that it's flipped itself over. Non-normalized normal maps can absolutely produce incorrect shading.

Also, see that prominent green diamond? That's the kind of slope you'd get if you generated your map from the point of view of a single eye looking down at the entire object. That is NOT the slope you'd generate if you create the map from the point of view of an eye looking directly at each individual face from that face's own "outward" direction. In other words, this isn't a tangent space normal map. (Or, possibly, it's a tangent space map to a lower-poly version of the mountain but it's being applied to the higher-poly one.)

Edited by Quarrel Kukulcan
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

43 minutes ago, Quarrel Kukulcan said:

The vector data in this normal map looks bad. Just poking around at a few pixels and turning them into X/Y/Z data, I don't get vectors of length 1.00 like I should. There are also pixels with a blue value below 128. I don't know that that can ever happen with tangent normals -- that represents a point where the surface is so sloped that it's flipped itself over. Non-normalized normal maps can absolutely produce incorrect shading.

Also, see that prominent green diamond? That's the kind of slope you'd get if you generated your map from the point of view of a single eye looking down at the entire object. That is NOT the slope you'd generate if you create the map from the point of view of an eye looking directly at each individual face from that face's own "outward" direction. In other words, this isn't a tangent space normal map. (Or, possibly, it's a tangent space map to a lower-poly version of the mountain but it's being applied to the higher-poly one.)

I really thought you were wrong but as a test I exported a guaranteed tangent space normal map from the modelling program and used that instead of the Substance Painter one and it solved the problem.  All shadows are where they should be!  I was so sure my Substance Painter normal map was tangent space but somehow it isn't.  At least I now know where the problem is coming from.  Thank you sooooo much for posting this!

  • Like 1
Link to comment
Share on other sites

Good to hear someone could figure it out, guess tangent vs. object space normals weren't always so easy to tell apart on a glance as I thought (tbh I've never actually worked with object space ones, just seen them when things are wrong). I learned something too!

Link to comment
Share on other sites

Just now, Frionil Fang said:

Good to hear someone could figure it out, guess tangent vs. object space normals weren't always so easy to tell apart on a glance as I thought (tbh I've never actually worked with object space ones, just seen them when things are wrong). I learned something too!

I'm not new to Substance Painter but I haven't used it in years.  I'm getting back into it because SL will be supporting PBR materials soon(TM).  I guess I still have more learning to do but just knowing where the problem is coming from is everything. 

  • Like 1
Link to comment
Share on other sites

Thanks again to all who helped me figure this out.  After some serious testing over the weekend I determined that the problem was coming from the fbx files I was exporting from the modelling program and importing into Substance Painter.  I had to change some settings and now the normal map from Substance Painter looks substantially different and works perfectly.  This is how the normal map looked before fixing the fbx export settings:

 

db80fd40c6071ce884d1662b360ae203.jpg

 

This is how it looks with proper fbx export settings:

a8bd005d9c4e4d4cf032bc9577329ac1.jpg

I'm glad I pushed myself to figure this out because now I have the height data from Substance Painter included.  I could have just used the normal map from my modelling program but that wouldn't have the Substance Painter data.

Edited by Imagin Illyar
grammar
  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 640 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...