Component:LODGroup: Difference between revisions

From Resonite Wiki
Automated: update Fields
No edit summary
Line 4: Line 4:
}}
}}
{{stub}}
{{stub}}
See [https://docs.unity3d.com/2022.3/Documentation/Manual/class-LODGroup.html LOD Groups in the unity engine] for an explaination.  
A LOD (Level Of Detail) Group allows you to define behaviors to load alternate meshes for objects based on their relative size on a user's screen. This is commonly used to replace complex and finely detailed meshes with simplified versions based on a user's distance from the object.


== Usage ==
== Usage ==
Line 15: Line 15:
== LOD ==
== LOD ==
{{Table TypeFields
{{Table TypeFields
|ScreenRelativeTransitionHeight|Float| ScreenRelativeTransitionHeight on the Unity LOD component.
|ScreenRelativeTransitionHeight|Float| This defines the minimum size of the object to use this LOD stage.
|FadeTransitionWidth|Float| FadeTransitionWidth on the Unity LOD component.
|FadeTransitionWidth|Float| FadeTransitionWidth on the Unity LOD component.
|Renderers|{{RootFieldType|SyncRelayList`1|[[Component:MeshRenderer|MeshRenderer]]}}|TypeAdv2=true| List of mesh renderers that should belong to this component, which become Mesh Renderers from the UnityEngine when they are injected by [[FrooxEngine]] into the unity scene forcibly via it's rendering pipeline.
|Renderers|{{RootFieldType|SyncRelayList`1|[[Component:MeshRenderer|MeshRenderer]]}}|TypeAdv2=true| List of mesh renderers that should belong to this component, which become Mesh Renderers from the UnityEngine when they are injected by [[FrooxEngine]] into the unity scene forcibly via it's rendering pipeline.
Line 27: Line 27:


== Examples ==
== Examples ==
This can be used to reduce detail for objects further away, or increase it if it's closer. useful for objects like jewelry, buildings, detailed surfaces, or anything that needs to take up less rendering power when it is further away.  
A simple LODGroup would be specific stages where the object doesn't appear to lose any detail due to the smaller size.
 
[[File:LOD_Example.png|right|thumb]]
This example object will switch from the Sphere when the object is taking up 30% of the rendered screen, and to the cube when it's 5% of the rendered screen.
== See Also ==
== See Also ==
* [[Component:MeshRenderer|MeshRenderer]]
* [[Component:MeshRenderer|MeshRenderer]]

Revision as of 20:51, 9 May 2025

Component image 
LODGroup component as seen in the Scene Inspector

This article or section is a Stub. You can help the Resonite Wiki by expanding it. A LOD (Level Of Detail) Group allows you to define behaviors to load alternate meshes for objects based on their relative size on a user's screen. This is commonly used to replace complex and finely detailed meshes with simplified versions based on a user's distance from the object.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
LODs list of LODGroup.LOD A list of different LOD stages with renderers that should appear for each stage.
CrossFade Bool Cross fade on the Unity LOD component.
AnimateCrossFading Bool Animate Cross fade on the Unity LOD component.

LOD

Fields
Name Type Description
ScreenRelativeTransitionHeight Float This defines the minimum size of the object to use this LOD stage.
FadeTransitionWidth Float FadeTransitionWidth on the Unity LOD component.
Renderers direct SyncRelayList`1<MeshRenderer> List of mesh renderers that should belong to this component, which become Mesh Renderers from the UnityEngine when they are injected by FrooxEngine into the unity scene forcibly via it's rendering pipeline.


Behavior

This also influences the images seen of renderers viewed in mirrors. meaning that a renderer specified by this component can look different in the mirror vs if it's right beside you, at the exact same moment.

This component relies heavily on the behavior of Unity when it's forced to the unity side via Connectors in FrooxEngine.

Examples

A simple LODGroup would be specific stages where the object doesn't appear to lose any detail due to the smaller size.

This example object will switch from the Sphere when the object is taking up 30% of the rendered screen, and to the cube when it's 5% of the rendered screen.

See Also