Foliage and raytracing problems

Hello,

I have some problems with foliage and ray tracing. UE 4.25

The problem is that the objects that use the “two sided foliage” shading model are not working as expected when used with the foliage tool and raytracing…if I place the object in the level as a regular object, not scattered, the object is rendered ok.

Also noticed, that if I turn off the raytraced translucency the foliage objects are rendered ok, but as I need raytraced reflections on windows, I have to turn on raytraced translucency in order to get them…

Any ideas??

actor scattered with foliage and with “two sided foliage” shading model…Raytracing translucency on

actor scattered with foliage and with “two sided foliage” shading model…Raytracing translucency off

Is “Evaluate World Position Offset” enabled in the object’s details panel under Rendering > Ray Tracing?

1 Like

Looking at the screenshot, where does the red colour come from? Do you have something in the subsurface node? Try plugging the base colour into the subsurface node.

I don’t think ray-traced glass reflection requires ray-traced translucency to be on. These are 2 different things. I didn’t get the translucency to work, so I turned it off and still have ray traced reflections. Although I remember switching them on and off was causing some problems. It wouldn’t work until either build lighting or build reflection or close the editor. Can’t remember which it was.

Is the material set to masked or to translucent? Masked would be the correct choice afaik. Translucency shouldn’t affect that at all. Unless the subsurface feature uses translucency somehow when ray-tracing is enabled.

There are a lot of other things that may screw it up and I’m not sure which of those stop it from rendering proper. Just a few thoughts:

  • is it lit dynamically. Some features don’t work that good with dynamic lighting.
  • foliage has its own settings regarding lighting. Check if it is set to cast dynamic shadow or static or both for the grass,
  • if you don’t use ray traced reflections for the grass then you need a reflection actor above it. A reflection cube with a high radius will do.
  • do you have the post process volume set to unbound? does it reach out to the grass?
  • you got a lightmass importance volume there if you have static lighting?

this is a foliage object, I searched on the foliage detail object and in every one of the foliage elements and did not found this option you mention…I only see the ·Rendering -> Raytracing ->Evaluate World Position Offset in the details of the object placed alone in the world, but not in the foliage elements or foliage object…and when placed alone it renders as it should and changing this option does not affect

Yes there is subsurface, an it is the same albedo texture just multiplied with another color, as a “tint color”. I tryed to unplug the whole subsurface nodes and the red is still there, and also when I unplug all the others nodes except for the opacity mask, the red is still there.

One can think that the opacity mask is the cause, but then I deactivate the opacity mask and leave all the other and the red is still there…to ilustrate it I use the trees, where it is easy to apreciate the red than in the grass…trees without opaqcity mask and Raytrace translucency on:

The material is “surface-Masked-two sided foliage” It looks like something related to the “two sided” or with “subsurface” property…but I have not too much knowledge on creating materials, and possibly with raytracing there is something special to do on the material in order to work properly with raytraced translucency on, because with raytracing deactivated the material works fine…at least that is what I suspect…Any ideas on this though?

the whole thing is intendet to be baked, but not the foliage, that is set to “movable” because it is not possible to bake it all, not enough RAM.

Cast shadows is enabled, and also cast static shadows and cast dynamic shadows are activated…changing this makes no effect on the problem

I use ray trace reflections on the scene. But is there a way to deactivate just ray trace reflections from the grass?
I have only found this comand “r.RayTracing.InstancedStaticMeshes” but setting to 0, disables all ray tracing effects on all the foliage elements, also no shadows from trees…
Anyway, I have a sphere reflection covering the whole project

yes, post proces is set to unbound, and there is a lightmass importance volume

wich version of unreal are you working? I also used raytraced reflections only in UE 4.22 … but now I am working with 4.25, and also though it was strange, but do not find a way to get ray traced reflections on glass without the ray tracing translucency to be ON.

Just in case, I tryed yor suggestions, I build the light, the reflections and restarted the editor after turning off ray traced translucency…still no ray traced reflections on glass materials wothout translucency

thank you

I had a closer look at the project I thought had ray traced reflections without translucency being turned on and it seems that the reflections are from the reflection cubes and not ray-traced as I claimed before.

I turned off ray traced translucency because I couldn’t get any refraction value to change. The glass would always look odd and very distorted no matter where and what values I put into the specular or translucency input. I guess it is still work in progress in the engine. Or the documentation is out of date.

EDIT: I got the weird refraction problem solved. I had to leave the refraction input empty and set the specular back to 0.5 as a start. Then tweak the specular value. The higher the value the more refraction the glass will have.