Hey ,
do you mean with “hundreds of assets” the count of StaticMeshComponents inside my Actor BP? Then yes, its very high with about 1000…
With “The scene capture can be pointed down at the ground orthographically.” & “if the view is ortho top down” you mean the SceneCapture positioning like in the last picture from me? So this positioning and the Projection Type set to Perspective is right, isn’t it?
I don’t quite understand what you mean with:
“So instead I just did something a bit hacky that checked if the camera vector was straight down (ie dot(CameraVector, 0,01) and check abs value), and collapsed the shadowcatcher in the vertex shader by adding negative worldposition.”
&
“you can hide the mesh in the vertex shader if the camera direction Z is -1”
You hide the ShadowCatcher by changing its position in Worldspace every Tick?.. Is the cost to hide/unhide the ShadowCatcher higher than changing the position ( i tested it quickly and it doesn’t seems to work…)
The main problem (beside the high cost of the ScreenCapture caused by the polycount) seems to be the hide/unhide of the hipoly object, so i have 2 questions/problems here:
-
"The gist of the more ‘robust’ way to do this is to instead use a white flood mesh and set that mesh to be only visible to a Scene Capture. "
By adding only the ShadowCatcher plane (= white flood mesh) to the “Show only Actors” list from the SceneCapture, there are no shadows visible in the RenderTarget…
So i need to add the high poly object to this list, otherwise i got a blank white RenderTarget texture… -
"Why do you need to hide/unhide the hipoly object? " Well you wrote: “Then you set any shadow casters to ‘cast hidden shadow’. Then you can hide them and the shadow will render onto the white shadow catcher ground.”
If i don’t hide the object (whats then the point to use “cast hidden shadow”…), the SceneCapture renders also the object and this makes the RenderTarget texture not useable… (But maybe with a Mask?)
Sorry, if I misunderstand some things here, but I just started 2-3 months ago with Unreal and there is so much to understand and learn!
