Dec.26

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

Oct.27

Scripting Level of Detail utility in 3dsmax

I find out a way to press Create New Set in Level of Detail section of 3ds max. This is quite handy of you are trying to create LODs in 3ds max where you would need too create a set for each asset. With this you could press the create set button with script.

UtilityPanel.OpenUtility Level_of_Detail
for c in windows.getChildrenHWND #max where c[5]== “Create New Set” do UIAccessor.PressButton c[1]

Tips & Tricks