Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by Nomad5oul · Sep 26, 2012 at 09:12 PM · characterskinnedmeshrendererlodanimatedlodgroup

Creating LOD Group for character

Hi

I have a character which I created a LOD version of so I have _LOD0 and _LOD1 for high poly and low poly.

I followed the Unity manual for creating a LOD Group which works perfectly for objects like rocks and buildings that dont move but when I do this for a character it has some issues transitioning between LOD versions.

It seems to transition between 2 versions of the character rather than just switching between the high poly and low poly mesh on the same character but I can't figure out how to set this up properly in the LOD Group.

I tried adding only LOD0 and then adding just the skinned mesh renderer object in the LOD1 slot which makes the LOD versions appear in the same place but only the LOD0 one is animating.

Please can someone explain how to setup a LOD Group for a character properly?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by OllyNicholson · Oct 01, 2012 at 03:44 PM

The workflow for setting up a character for LOD support is as follows:

  • Create and name an empty game object in your scene - e.g. characterName

  • Drag both LOD0 and LOD1 models from your project pane onto this node in the hierarchy

  • Add Component > Rendering > LODGroup to the characterName node

  • Select the LOD: 0 group and Add the LOD:0 Renderer

  • Select the LOD: 1 group and Add the LOD:1 Renderer (repeat for other LODs)

  • Make relevant adjustments to the Distance by dragging

The character controller scripts will then determine which animations to use etc.

Note LOD does not understand the concept 'same character' so yes in a sense it is simply switching between two models, but they share the animation. Here is a link to our 3.5 pro features demo with the soldiers set up for LOD:

http://unity3d.com/unity/preview/download (Pro Features Demo - bottom right)

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image berniebresslaw · Jan 31, 2013 at 05:17 PM 0
Share

I have downloaded the pro features demo and seen the LODGroup working on a character but cannot reproduce this using the demo assets and following Olly's guide above.

It seems the key is to get a character with multiple skinned meshes and a single skeleton and animation - this is the bit I cannot repro.

In the demo, the characters with working LODs have this structure

Soldier_Red_Agent(GameObject with LOD Group)

    Lightprobe_Anchor (works fine without this)
    SoldierRed_LODs (with Animation)
       Pelvis
          Other bones
       Soldier_LOD0 (Skinned$$anonymous$$eshRenderer)
       Soldier_LOD1 (Skinned$$anonymous$$eshRenderer)
       Soldier_LOD2 (Skinned$$anonymous$$eshRenderer)

When I follow the steps above I get this structure

 $$anonymous$$ySoldier (GameObject with LOD Group)
    Soldier_LOD0 (with Animation)
       Pelvis
          other bones
       Soldier (Skinned$$anonymous$$eshRenderer)
    Soldier_LOD1 (with Animation)
       Pelvis
          other bones
       Soldier (Skinned$$anonymous$$eshRenderer)

The result is that the mesh will switch at distance, but will not animate unless I apply the animation to both Soldier_LOD0 and Soldier_LOD1.

Has anyone had any luck with Olly's steps for an animating character over several LODs?

I suspect that the fbx needs to include a single skeleton and multiple skinned meshes, but if anyone has any advice on how to set this up from multiple fbxs containing a single skinned mesh each, then I would really appreciate some info on how to achieve this.

p.s. Hope this is submitted correctly - first post ;)

avatar image berniebresslaw · Feb 13, 2013 at 09:18 AM 2
Share

Had a reply from Ricardo at unity support with details on how to set this up, so thought I would share. Steps detail how to get a character with a single skinned mesh to LOD through 3 meshes, whilst still being run from a single animator. It is also possible to import an fbx with multiple skinned meshes, but for our workflow this wasn't best.

Anyway, here goes...

Drag character into the scene (or parent under a newly added empty game object)

Find the skinned mesh

Right Click and duplicate x2

You now have the single animator, 3 skins layout (all at same hierarchical level) which is vital to this working.

Next switch the duplicates for the LOD versions by dragging your low poly skinned meshes onto the 'mesh' property for each duplicate.

You could consider rena$$anonymous$$g the duplicates so they make more sense for the LOD setup...

To activate the LODs go to the root object, add component of type LODGroup.

Select LOD0 and drag the high res mesh onto it. Repeat for LOD1 and 2 (using medium and low res)

You can slide the LOD bars to adjust when each level kicks in.

You can also drag the camera icon in the lod group to shift the camera back and forth to see when they switch.

To test this drag an anim onto the 'Animation' component.

That's it!

You should also consider the properties of each skinned mesh renderer LOD - you can get performance back by turning off cast/receive shadows, quality (maximum bones per vert).

Thanks Ricardo!

avatar image kanga · Feb 19, 2013 at 09:29 PM 0
Share

How are the variation meshes setup? I have three versions skinned to their own skeletons which are a copy of the main. Sloting the lower res version into the duplicates property slot blows them up. Do the three meshes have to be skinned to the same rig then?

avatar image
1

Answer by Sundar · Sep 27, 2012 at 12:06 AM

Check this LOD Management

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by sxnorthrop · Apr 21, 2016 at 03:17 PM

Try using a 3D modeling program, and on your character, duplicate the skin 2 times. Select the second layer and dumb down some of the vertices. Do this for the third layer as well. Import into unity, drop a LOD Group on the base of the model above the rig. Drag in the separate layers of the model into each different LOD. And you should be good, now all your different model layers will use the same rig, and also use the LOD group.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by holyfot · Jan 07, 2020 at 05:50 AM

Here is an example script that doesn't require a bunch of objects. You just setup the materials (in the right order) and the meshes. Character LOD Script

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

LODGroup feature not available despite being on Unity Pro 1 Answer

LOD Popping in when objects placed via terrain painter 0 Answers

LOD only working in scene view 1 Answer

Character Animation Pose Mesh,Animated Pose Mesh 0 Answers

Is it normal to have one drawcall PER levels of detail when using LODGroup? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges