Jump to content
  • 0

Lighting-mismatch of mesh, when "advanced lighting model" is enabled.


Noel Loordes
 Share

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

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

Question

I have previously created some custom mesh hands for a puppet-like avatar, based on the SL default avatar. Before I enabled advanced lighting model, I was able to match the color of the hands to the skin, such that when lower arm and beginning of the mesh overlap, the difference wasn't visible – this I achieved by making the skin compatible with base-avatar upper-body textures, and applying the same texture to body and hand.

Then I enabled advanced lighting model, and now a PART of it is mismatched (see attached screenshot).

Any idea, what may be causing this? It shouldn't be the normals, as those should cause issues even before advanced lighting model is enabled.

 

alm.png

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 1

I don’t understand what you mean by using materials in Blender but no spec or norm in SL. IF I take that as written, my response would be that explains the color mis-match.

Materials in Blender and SL accomplish the same thing, but are different. In Blender we use the ‘material’ concept as being a composite set of settings applied to selected polygons. It is the same in SL, but we use the term to mean the addition of the ability to add spec and norm maps. In SL a material is a different arrangement of settings.

In Blender we can be using spec and norm settings to bake a material. But, if only the diffuse map is used as a texture in SL then the render of spec and norm values is missing and is going to be drastically different in appearance. This my confusion about your reply.

If one brings in the Blender made spec and norm maps the result in SL is different. So, all parts have to have the same set of settings to even get close to a color match.

If you research the SL Forum for information on color matching (site:community.secondlife.com/forums/ color matching) you’ll find this discussion has been on going since before mesh was introduced.

If you add Drongle McMahon’s name to the search, you’ll get the more technical answers from a knowledgeable modeler. Drongle did considerable testing to figure out what is happening in the render engine and how to compensate for the various oddities. In various posts he provides extensive math and examples. Expect to dig through a lot of posts to find your specific answers and their explanation.

If you change and use Gaia Clary’s name you’ll get a less technical set of answers from an also very knowledgeable modeler and the developer of AvaStar. Gaia has had to do a load of testing to get Blender to provide results as similar as possible in Blender-AvaStar as one sees in SL. Gaia has a video that I was looking for that explains the vertix nomrals issue in great detail and the SL work-arounds. I can't  find it on YouTube (Gaia Clary) or Vimeo (Machinimatrix).

Attend the Content Creator’s user group meetings. Meet some of the modelers in SL. They are usually willing to help with technical issues.

Link to comment
Share on other sites

  • 0

I finally had time to check, and the normals look fine. Furthermore, the lighting matches the base avatar, unless 

  • local lights are nearby and
  • advanced lighting is enabled.

Is there maybe some way, how mesh handles local lights differently from what the default avatar can do?

Link to comment
Share on other sites

  • 0
10 hours ago, Lindal Kidd said:

That has always been the case, although I could not tell you WHY objects and avatars handle light differently.

That's unfortunate then, but at least it saves me the effort of trying to fix it.

I'd be quite interested though to find a technical explanation, what causes the difference. There are more obvious differences (such as the inability to use reflections) with more tangible reasons, but the difference in handling local lights baffles me.

Link to comment
Share on other sites

  • 0

@Noel Loordes The basic difference is that the render engine for things and avatars is different. The System Avatar render does NOT handle materials. 'Things' render through a channel that does handle materials. Both channels tend to handle shading in a way that reveals seams.

These may help you understand. https://www.youtube.com/watch?v=E9APc-AVp0g
https://www.youtube.com/watch?v=owKVrnTAn3M

 

Link to comment
Share on other sites

  • 0
10 hours ago, Nalates Urriah said:

@Noel Loordes The basic difference is that the render engine for things and avatars is different. The System Avatar render does NOT handle materials. 'Things' render through a channel that does handle materials. Both channels tend to handle shading in a way that reveals seams.

These may help you understand. https://www.youtube.com/watch?v=E9APc-AVp0g
https://www.youtube.com/watch?v=owKVrnTAn3M

 

Sadly, the video doesn't really clarify the issue with my mesh here. I was well aware of how smooth shading acts, but the difference is way too big in the presence of local lights (and only in the presence of local lights). Also, issues with normals/smooth lighting should also be visible without local lights or advanced-lighting model. And indeed there IS a slight mismatch, since it isn't really feasible to perfectly match the base avatar, but given matching textures these differences are barely visible.

But can you elaborate on the materials comment? I am applying several materials in blender and export them to Second Life in order to allow selectively hiding parts of the mesh, when it conflicts with an outfit (e.g. long sleeves), since having different materials translates to different "faces" in the SL object "edit" dialog. I did so exactly, because creating disjunct meshes would create sharp seems, where smooth lighting doesn't work as discussed in the video. I do not however use specularity or bump maps.

I'm just surprised, that doing so would result in such a massively different handling of local lights compared to the standard avatar.

Link to comment
Share on other sites

  • 0
On 9/1/2018 at 12:13 PM, Love Zhaoying said:

Are you certain it’s not a form of texture thrashing, trying to show you both mesh and covered avatar arm at the same time?

Seems unlikely. For one, I would expect the brightness to flicker in some manner, if it were a thrashing issue of some sort, though I may misunderstand the term. Also while the base avatar and the attachment DO overlap, I am able to make this unnoticable by making sure that the textures match, as long advanced lighting model is disabled, or in the absence of local lights. And the part that stands out in terms of brightness is only partly overlapping visible parts of the base avatar (see screenshot). 

Link to comment
Share on other sites

  • 0

Solution: Change the "Alpha mode" from "Alpha Blending" to "Alpha Masking". Then the color of default avatar skin and mesh match regardless of light.

I have yet to see undesirable side effects.

Took only 20 months to come across this ;)

Edited by Noel Loordes
  • Thanks 1
Link to comment
Share on other sites

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