Hi everybody!
My team is currently hitting a roadblock with getting RVT’s working across multiple levels. Specifically: getting grass spawned via Grass Output Node to read the current level’s RVT files.
I’ll try and explain the problem the best I can:
I am currently working on a game with multiple levels. I’ve been using RVT’s for blending objects with the landscape.
To do this:
I’ve created a master landscape material that outputs to the shader as well as two RVTs for height and material attributes.
Each landscape in each level has its own material instance, and I point to a new respective RVT for the landscape to write to in the Landscape Details Panel > Virtual Texture.
Within each level, I have any number of props or foliage that will sample the RVT’s written to by their respective landscape’s material.
Everything works great in one level, but when I move on to make a new level, all my prop/foliage actors look incorrect because they sample the RVT’s written to by the last level.
One of our team’s engineers wrote a script that we place on an actor in scene that can query every object in a scene which uses RVT’s, then create a dynamic material instance per object which then swaps the asset’s old RVT parameter with the appropriate current level’s RVT. This works fine for actors individually placed in the scene, but not for my grass which is placed in the scene via Grass Output Node in the landscape master material.
How can I update the material parameters for my grass per level to match the RVT the current landscape is writing to?
Also I’ve searched all over for this question and only found it asked once on these forums but with no answer. I see Epic and many others recommend using RVT’s but I find it odd no one explains how to use this in a project with multiple levels.
Help is greatly appreciated!
Thank you!