Hi there,
right now I am trying to make a voxel terrain. Since I am just prototyping, I use BP and will probably switch to c++ later, when I know that it works.
Now I stumbled on weird behavior of the engine, when using raytraced reflections.
Setup:
There is an Actor with a ProceduralMesh Component. The procedural mesh is then filled with all of the necessary data (Vertices, Tris, UVs, Normals).
Each “voxel type” got an own Mesh Section on this ProceduralMesh Component, so I can assign different materials.
Examples:
In this simple example I generate 4 blocks on top of each other from bottom to top (randomly picked “rock” or “dirt”). The floor is a chrome plane for reflection. As you can see, the second Mesh Section (“dirt”) has correct Normals in “World Normal” view, but grey(?) Normals in “Ray Tracing World Normal” View. Thus, the reflections in the left image are somehow missing. SSR work fine though (probably since the normal pass is correct).
Now I thought that it might be an issue with the “dirt” material. But as you can see in the next image, it does not depend on the material:
In this random configuration the voxel type was the other way around, but still the same normal error. The material seems not to be the issue.
And now of course one might think that it must have something to do with the “create mesh section” process.
As you can see in the next image, it is not always the second voxel, but the second mesh section in general:
When I print the Normal Vectors of both sections, all values are correct. This makes sense, since also the rasterized World Normal pass looks fine.
Now I am a bit lost on how to debug further, since it seems to be a deeper issue probably in the engine code. Could this be the case, or does someone has an idea on what to investigate next?
Edit: The order of creating a section does not matter, section 0 always works fine; section index > 0 does not work…
Edit 2: In fact, nearly every ray tracing pass/buffer (?) looks wrong for the second section. Are procedural meshes supported at all with ray tracing?
Thank you in advance! This is driving me nuts.
Happy New Year
Codibasti