Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 DimitriUK · Jul 15, 2015 at 12:49 PM · c#cameralodocclusion

How is LOD implemented?

Hello,

So I have reached the point where I want to have lots of Zombies coming at the player, however I seem to get some frustrating lag. I have used Occlusion Culling as well, but it's having a bit of issues right now such as even when the zombie is still in the camera, it sometimes flickers.

So I read about 'LOD', Level Of Detail which got me interested. I basically wanted it to work like the system of SpeedTree as for when you are far from the Tree, the LOD is at the lowest, and as you get closer, it increases and eventually reaches max.

Will I need to do lots of scripting for this? If that's the case, don't write me up a whole script, just get me on the go to making this awesome system for my Zombies. :)

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

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by DimitriUK · Jul 15, 2015 at 06:34 PM

So I will be answering my own question with some knowledge from 'TutiBueno2' as well.

In order to work with an effective LOD system which will allow you to have many objects in your world, or if you are building a huge open world level, then using the LOD system is for you.

Here is a short tutorial:

  1. First, you will need your model, but several of them each with lower poly meshes.

  2. You will click on your Parent Object/ZombieAI >> Add Component >> Rendering >> LOD Group.

  3. You will now have:

  4. LOD 0 (Highest Polygon Model) - Click on the Green LOD0 100%, and you will see you can add Renderers. Drag your highest detailed mesh/model in to that Renderer.

  5. LOD 1 (Medium Polygon Model) - Drag your lower poly model's render parts in to that as well.

  6. LOD 2 (Lowest Polygon Model) - Drag the lowest poly of the model in to LOD 2.

  7. Change your 'Fade Mode' to Crossfade and you can configure how far and close it should begin to render, etc.

BE AWARE, if you only have 1 model such as a model from Mixamo's 'Fuse', then you may have trouble unless you use there Decimator which lowers the polys of the model.

Since Mixamo have just joined Adobe, the decimator is currently not usable and all features should be restored within a few months according to Mixamo.


If you are NOT using a Third Party program to create your models and would like to use an LOD system, it is recommended that when you are creating your 3D models, you should start with making the lowest poly model up until the highest, or as I heard some sort of unwrapping method can help.

I really hope this helps for anyone else in the future wanting to know about how the LOD system works.

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
1
Wiki

Answer by SkandYxyz · Jul 15, 2015 at 03:56 PM

Hi Dimitri,

you have multiple options. First, unity comes with an integrated LOD system. You can find this under Components->Rendering->LOD Group. Add this to your Game Object. Now you have to generate a 3D object file, e.g. an .fbx file with multiple meshes and name them ...LOD0 ...LOD1 ...LOD2. Generate a Mesh or Skinned Mesh Renderer and assign this 3D object and it should switch beteen the LOD's depending on distance. The problem with Unity's LOD system is, that it might be slow, because it has to calculate the distance between every LOD Group and the camera very often. A better choice is to make a 3D Grid, that holds each object and updates rarely. For this the best LOD system on the asset store is in my opinion QuickLod together with InstantOC. They are worth the money.

Sincerly,

Andre

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
1

Answer by TutiBueno2 · Jul 15, 2015 at 03:58 PM

No, no scripting needed. You just have to add the "LOD Group" component to your zombie model.

It would be nice if you have different versions of your zombies, one for each LOD level, like a super detailed one for close view, a medium detailed and a low detail (for far view).

More info here: http://docs.unity3d.com/Manual/class-LODGroup.html

Comment
Add comment · Show 1 · 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 DimitriUK · Jul 15, 2015 at 06:25 PM 0
Share

Yeah, I kind of figured it out. I then realised, it wasn't working and then realised that I needed the same Zombie model but with less polygons for each the lower the LOD gets.

Since the Zombie model I have got doesn't have that, I might have to try out a third-party program such as QuickLOD as 'SkandYxyz' mentioned.

$$anonymous$$y levels will be having hundreds and hundreds of zombies. I literally lag hard if there is over 30 right now, hahaha.

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

23 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Distant terrain level of detail question. 0 Answers

UNITY 3D: How to make the camera follow the player? Smoothly 2 Answers

How can I limit the rotation on the Y axis so the player cant spin the camera 360 in an FPS game? 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