Modding:Level of detail: Difference between revisions
(Created page with "The lodLevel (level of detail) parameter of [https://apidocs.vintagestory.at/api/Vintagestory.API.Client.ITerrainMeshPool.html#Vintagestory_API_Client_ITerrainMeshPool_AddMeshData_Vintagestory_API_Client_MeshData_System_Int32_ ITerrainMeshPool.AddMeshData] controls at which distances the mesh is rendered. In general, meshes with a lower lodLevel are used for higher detail shapes. [https://github.com/anegostudios/vsapi/blob/master/Client/Render/FrustumCulling.cs#L149 Fru...") |
(Link to the json tessellator) |
||
Line 1: | Line 1: | ||
The lodLevel (level of detail) parameter of [https://apidocs.vintagestory.at/api/Vintagestory.API.Client.ITerrainMeshPool.html#Vintagestory_API_Client_ITerrainMeshPool_AddMeshData_Vintagestory_API_Client_MeshData_System_Int32_ ITerrainMeshPool.AddMeshData] controls at which distances the mesh is rendered. In general, meshes with a lower lodLevel are used for higher detail shapes. | The lodLevel (level of detail) parameter of [https://apidocs.vintagestory.at/api/Vintagestory.API.Client.ITerrainMeshPool.html#Vintagestory_API_Client_ITerrainMeshPool_AddMeshData_Vintagestory_API_Client_MeshData_System_Int32_ ITerrainMeshPool.AddMeshData] controls at which distances the mesh is rendered. In general, meshes with a lower lodLevel are used for higher detail shapes. | ||
[https://github.com/anegostudios/vsapi/blob/master/Client/Render/FrustumCulling.cs#L149 FrustumCulling.InFrustumAndRange] controls which levels of detail are rendered at which distances. The following table summarizes the logic. Note that the table is accurate for meshes directly added through <code>ITerrainMeshPool.AddMeshData</code>, but inaccurate for meshes added by the json tessellator, because the json tessellator adjusts the lodlevel before inserting the meshes in the pool. | [https://github.com/anegostudios/vsapi/blob/master/Client/Render/FrustumCulling.cs#L149 FrustumCulling.InFrustumAndRange] controls which levels of detail are rendered at which distances. The following table summarizes the logic. Note that the table is accurate for meshes directly added through <code>ITerrainMeshPool.AddMeshData</code>, but inaccurate for meshes added by the [[Modding:Block_Tessellator#JSON|json tessellator]], because the json tessellator adjusts the lodlevel before inserting the meshes in the pool. | ||
<table class="wikitable"> | <table class="wikitable"> |
Latest revision as of 06:45, 30 October 2023
The lodLevel (level of detail) parameter of ITerrainMeshPool.AddMeshData controls at which distances the mesh is rendered. In general, meshes with a lower lodLevel are used for higher detail shapes.
FrustumCulling.InFrustumAndRange controls which levels of detail are rendered at which distances. The following table summarizes the logic. Note that the table is accurate for meshes directly added through ITerrainMeshPool.AddMeshData
, but inaccurate for meshes added by the json tessellator, because the json tessellator adjusts the lodlevel before inserting the meshes in the pool.
Distance to block | Level 0 | Level 1 | Level 2 | Level 3 |
---|---|---|---|---|
short | visible | visible | visible | hidden |
medium | hidden | visible | visible | hidden |
long | hidden | visible | hidden | visible |
![Icon Sign.png](/images/thumb/1/15/Icon_Sign.png/32px-Icon_Sign.png)
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |