Virtual Heightfield Mesh Shading

I started experimenting with Virtual Heightfield Meshes (VHFM) for landscapes.

As it seems now, the VHFM does not have a proper shading as seen here:

In comparison, this is the normal landscape shading:

It looks like the VHMF does not generate it’s vertex normals. One way I managed to “generate” shading is with the flat shading method (which, mind you, is not good for this situation)

My question is, is there a proper way to “enable” shading for Virtual Heightfield mesh? Do I manually generate smooth shading through the material graph? Do I wait for this to be fixed?

P.S. I did enable Cast Shadows on the VHFM actor but it only works with dynamic lighting since it does not interact with the baked GI.

It is currently set to Stationary with Dynamic Shadows Distance set to 1000.

Well, the point is to use Stationary Directional Light. Movable Dir Light does not contribute to the GI baking which is necessary.

The shadows themselves aren’t the problem. The problem is the lack of proper shading on the Virtual Heightfield Mesh and the lack of baked GI on it.

VHFM doesn’t give you the movability options like a classic actor. The mesh does look unlit since it lacks shading from vertex normals (which I assume are missing), but it can receive dynamic shadows (but NOT static baked shadows).

“but it only works with dynamic lighting since it does not interact with the baked GI.”

Is your directional light set to “movable”?

Does anything prevent you from using a movable directional light? From what I understand that’s required here to get proper shadows on the mesh, since stationary lights only generate dynamic shadows for movable objects. Also, 1000 units (10 metres) might be a bit low.

The mesh looked unlit to me in the first picture, suggesting that it only receives light from a skylight, which is why I mentioned shadows. It seemed to me that the mesh was simply ignored by the directional light. Due to what you said in your post my presumption is that you could try setting the VHFM actor to movable (if that is at all possible) to ensure the directional light is considered for shading, since it doesn’t interact with the baked GI you need.

I did not take the time to recreate a similar scene, so I’m just poking in the dark here, my sincerest apologies.

you can pipe in the world space normal output from the virtual texture rendered from your original landscape

Just blend your normals (using for example anglecoreectednormalblend node)with vertexnormalws node and connect it to you virtualtexture normal input and voila. Youll get the vertex normals on the heightfield mesh.

1 Like

It Works!