Like you’d see in Sim City or Cities Skylines, I’d like to have a heatmap in my landscape. Actors would be able to ask the landscape what the float value of their world location is, and also impact the value of the heatmap at any position on it.
Based on my research I don’t think this is possible with the landscape material only. I think I’ll need a manager which the actors interact with, but that manager also needs to somehow tell the landscape material what to display visually. Things like runtime virutal textures keep showing up in my searches, but I’m not experienced enough to string together a logical solution.
A scenecapture2d at the top,
And Niagara emitters associated with whatever items drive whatever heatmap you need.
Capture only the speficic niagara emitter in the 2d capture.
Use the resulting live texture in a materia (or wherever else like a minimap)
Can work rather well - and is as cost effective as it gets since it only displayes/gets rendered when specifically visualized.
The downside is the shape you generate with the emitter is only as good as the texture/transparency you set up for it.
And that can look really bad when you over populate it.
Another option could be distancetonearestsurface and throwing items in and out of custom stencil values.
And another option could be to change PP material to the scene capture 2d.
Thanks for your input, it’s given me some ideas to play around with. For the most basic prototype, I’ve arrived at the following method, which doesn’t yet tile, but can.
Create a material representing the values you want over your landscape. I’m using a curve atlas to help me clamp the noise values into solid blocks. Note the values you wish to output need to be plugged into the Emission pin, ready for our Render Target:
When you press play, it will write your material onto the render target:
In the landscape material, blend your attribute laters together using the Render Target. Make sure you’re dividing the absolute world position xy by the width of your landscape (in units) - this will scale the Render Target 1:1 with your landscape. My landscape is 3150 units wide, so I’m using that value.
You will now have a landscape that can visually represent the values of your heatmap.
Now doing some fairly simple math, you can go from from world coordinate to pixel coordinate of the render target, allowing you to get the value from any pixel of the Render Target.
This doesn’t include aspects like the actual lookdev of such a mode, but it’s at least a start on how I can read and write values to specific locations, and also represent them visually.