Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Skinned renderer and a separate LOW QUALITY shadow mesh?

Discussion in 'General Graphics' started by Asset-Ninja, Jul 1, 2016.

  1. Asset-Ninja

    Asset-Ninja

    Joined:
    May 9, 2015
    Posts:
    13
    Hi!

    I was doing some research regarding the import pipeline. There is one weird thing I came across.
    I am more than certain, that the Skinned mesh renderer uses the same mesh for shadowing.
    Why do I bother? I you use a high quality mesh (say 50K triangles and more) this means that
    the same amount of rendering power will be used for each and every LIGHT that is affected
    by the shadow. If you have 3 lights this means:

    - 50K triangles for mesh + textures
    - 50K x 3 lights = 150K triangles for shadows

    Total: 200K triangles (insane waste!)

    Is there a way to say OK, draw the mesh in 50K but use a 5K or less mesh for the shadow?
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    This is just an untested idea:

    Try it with the full-quality model as one submesh and the shadow caster model as another submesh. Set the quality MeshRenderer's "Cast Shadows" setting to "Off", and the shadow caster to "Shadows only"
     
    theANMATOR2b and Martin_H like this.
  3. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    For skinned meshes you can have multiple Skinned Mesh Renderers under a single parent Animator and it'll control all of them. Useful for doing character customization, but also for what you want via the example @Gambit MSplitz gave.
     
    hippocoder, theANMATOR2b and Martin_H like this.