level 5
KnIfER
楼主
有两类植被体系,实时生成的和实现画好的。
The Procedural Foliage Volumes and the Foliage Paint tool are identical at runtime. The Procedural Foliage Volumes just place foliage instances as if it had been placed by the foliage tool, and you can even add or remove instances with the foliage tool after the simulation has been run. The instances are rendered using a HierarchicalInstancedStaticMeshComponent for each foliage type. The instance buffer is always around while the levels are loaded so the instance data contributes to runtime memory, size on disk and load time. Each instance has 48 bytes of GPU data and 80 bytes of system memory. Unlike Landscape Grass, the Foliage Paint and Procedural Foliage types can have collision.
The Landscape Grass feature renders instances the same way as the Foliage Paint tool (by populating instances in HierarchicalInstancedStaticMeshComponents) but the instance data is generated at runtime and only around the camera. This generation has some minor cost, but it done in a background thread, and it allows you to have what would be many millions of instances placed by the foliage tool and only have the 100,000 or so near the player in memory. Landscape grass does have its own memory cost, which the density map that is generated in the editor for areas with grass that the runtime system uses to know where to place instances. The cost is 2 bytes per landscape vertex for components which have grass (to store the height data) plus 1 byte per vertex for each grass type. This cost is typically much lower than it would be if they were painted or procedural instances.
(Procedural Procedural Foliage Volumes and Foliage Instances peformance --ue4 answerhub)
2019年01月30日 15点01分
1
The Procedural Foliage Volumes and the Foliage Paint tool are identical at runtime. The Procedural Foliage Volumes just place foliage instances as if it had been placed by the foliage tool, and you can even add or remove instances with the foliage tool after the simulation has been run. The instances are rendered using a HierarchicalInstancedStaticMeshComponent for each foliage type. The instance buffer is always around while the levels are loaded so the instance data contributes to runtime memory, size on disk and load time. Each instance has 48 bytes of GPU data and 80 bytes of system memory. Unlike Landscape Grass, the Foliage Paint and Procedural Foliage types can have collision.
The Landscape Grass feature renders instances the same way as the Foliage Paint tool (by populating instances in HierarchicalInstancedStaticMeshComponents) but the instance data is generated at runtime and only around the camera. This generation has some minor cost, but it done in a background thread, and it allows you to have what would be many millions of instances placed by the foliage tool and only have the 100,000 or so near the player in memory. Landscape grass does have its own memory cost, which the density map that is generated in the editor for areas with grass that the runtime system uses to know where to place instances. The cost is 2 bytes per landscape vertex for components which have grass (to store the height data) plus 1 byte per vertex for each grass type. This cost is typically much lower than it would be if they were painted or procedural instances.
(Procedural Procedural Foliage Volumes and Foliage Instances peformance --ue4 answerhub)
