I have a basic 3rd person game now loading models for the ground and other props etc with a player that has different animations and walks around
I tried the default shadowmap at different resolutions but it’s a mess to set up properly and when I do it’s not very performant friendly for mobile
I’m looking for a new unique way to do basic dynamic shadows, theoretically it shouldn’t be so hard just to take the outline of the player with its animations and just project it into the ground at an angle. My scene is very big and dynamic so I can’t just bake shadows into everything, regarding other props.
And since the player is moving with dynamic animations baking doesn’t make sense
But the shadows don’t have to be perfect, currently though there are literally no shadows at all which looks kind of weird. In terms of actual calculations all we need to do is simply get the outline of the player(s) that are moving and being animated and just project them at a slightly skewed angle on the surfaces underneath or next to them. Most objects are static but there are also rotating and moving coins etc so it would need to be dynamic
It also doesn’t have to be based on the threejs light sources or determine if anything is blocking them etc just one direction for all shadows both inside and out for simplicity
I’m thinking something with custom shaders to draw the luminescence of the character to a render texture then project that on the ground next to the player, maybe through using some kind of mix shader for each of the objects I want to project the shadows onto, but I can’t fully conceptualize how to do it
Many of my textures for objects have repeat x and y already so of it’s a mix shader it would have to mix on top of the current tiling texture without messing it up etc
PointLight shadow draw scene 6 times.
DirectionalLight draw scene 1 time.
Maybe need 2 DirectionalLights.
First DirectionalLight to draw shadows 1 time, not every frame and only for static objects.
Second DirectionalLight to draw shadows every frame for dynamic shadow.
Perfomance depend of type shadow, value of shadow blur, shadow size, numbber of object, number of triangles etc.
Into old games was used fake shadow like circle geometry.
Example: 200 objects, directionalLight call 200 draws, 20fps
If use instanced circle or sphere geometry for objects, then 1 draw call. 40fps
If use instanced plane with circle texture, then 1 draw call. 60fps
Or instanced plane with circle texture only for far objects.
I can’t use the shadowmap that’s built in to threejs… it’s really bad quality unless i increase the quality by a lot which slows the scene down tremendously. I need a new way of makong shafows from s ratch that has perfect sharp edges and exteemely performant worthy for huge scenes. Something to do with a mix shadet but nit sure exactly
Sadly that’s not something basic you’re asking for.
You just decribed some desktop Unreal engine feature where the whole scene use LOD with dynamic texturing and distance field processing.
Recent emerging practice has shown great results in a target which employs a reduced imaging kernel, but applies upsampling in a post-processing neural matrix. Furthermore, to mimic a natural bifocal apparatus the camera emulates: depth-of-field, visible noise, and similar aberrations. Superresolution tensors seem to define the future for Unity-type AAA teams such as Among Us.
I don’t have it working in a minimum level, but I do know for sure that the standard shadow map setup is a mess and does not work. I’ve tried everything, including dynamically moving it with the character. I have decided to never use it again, there has to be another way to get BASIC, but solid and accurate, shadows. If you can get the luminescence of a model why can’t that be projected in a mix shader, or something similar?
I literally did not understand a single word you just said, lol. All I’m looking for is extremely basic shadows, outline of the moving character on the ground and other objects, and outlines of other objects etc. Shouldn’t be that intensive to just project and outline of something, theoretically
I think you’ve missed a vital step here. I can almost guarantee that you need to correctly configure the “bounds” of the directional lights shadow camera