The PolySpatial SDK for Apple Vision Pro had many limitations due to its imitation-based nature, and it did not support several common Unity features. During one of our architectural projects, we needed to create grass similar to Terrain Detail objects. Using a flat texture was not an option because the environment around the villa had to look like a natural forest.
We also had to block the horizon line, which meant surrounding the villa with natural elements such as grass and trees. This was not just for visuals but also to accurately represent how the real location looked.
Placing GameObjects manually could have worked, but the 3D model of the house was being updated frequently, which caused issues like grass objects sinking into the ground, floating in the air, or clipping through the mesh. Doing this manually every time was not practical, so I needed a fast and automatic system.
Using too many GameObjects would be expensive in terms of performance. Even with mesh baking and reduced batch counts, a simpler and more efficient solution was required. I used a Particle System for this.
• I assigned the exterior “terrain” mesh as the particle emitter.
• With the radius setting, I spread the grass meshes naturally around the building.
• The particle system allowed me to randomize colors and sizes, creating variation automatically.
• This resulted in a system that generated and placed vegetation automatically without the need for constant manual updates.
Next, I created a simple sway shader. It manipulated vertex positions and UV coordinates to simulate a flag-like waving motion. By defining the pivot point using UV coordinates, only the upper parts of the grass moved while the base stayed still.
Finally, I darkened the lower parts of the grass textures to fake ambient occlusion, adding a stronger sense of density and depth to the vegetation.
All done with particle emitter and cheap vegetation sway shader:
First integration of particle spawner. Also used in here 3D masking for test.