Dec.26

Unreal engine photogrammetry unlit material + shadow

Unreal engine photogrammetry unlit material + shadow

One of the major problems that I had with Photogrammetry data in unreal was presenting them with a unlit material but being capable of receiving 3d objects shadows. now you might think that yes you could use unlit mode material in unreal but with unlit material the object will not receive any shadow. This is super easy in unity3d with a custom written shader however its more complicated in unreal. I came up with a workaround that seems to be a good fix.

Photogrammetry in unreal, default lit material

So the quick fix I found is by creating a custom post process material to apply to a global unbound post process volume in unreal.

Post Process Material structure
https://www.ghafari.co.uk/Downloads/PP_UnlitShadow_Mat.uasset

After applying this to your Post Process volume, select all the Photogrammetry objects from outliner and in the details panel search for Render CustomDepth pass and turn the chemark on.

After that you will see that the dark areas in your Photogrammetry has some sort of unlit effect.

Photogrammetry afetr applying the Post Process Material, dark areas are gone

Now the next minor issue is that Photogrammetry object itself has self shadow as marked in the image we could easily remove that by looking at a option in the detail panels named self shadow only, by turning it on you will turn of the self shadowing.

Finally, by placing some 3d objects over the Photogrammetry you could see that it received shadow from 3d objects in unreal

Tips & Tricks
Share this Story:
  • facebook
  • twitter
  • gplus

About samghafari

3d Artists and Game Developer.

Leave a comment

Comment