Messed up in Shadows
-
hello,
anyone know how to get shadows to behave properly when the view is taken in the cover of the shadows?
whenever i position the view within the shadows the shadows get all messed up. they tend to cover the entire scene in a patchwork of shadows that is not what should be casted. i verified the shadows were normal by moving the scene out of the shadows, and sure enough they cast properly.
-
this is what most older sketch up users call the "infamous shadow bug"
no know cure for it
your just going to have to wait until google figures it out -
It is called Carmack's reverse - or rather, Carmack's reverse would be the cure for it which Google is not licensed to use, hence the shadow problem. Its much larger than just SketchUp.
-
I've worked around it occasionally by adding a tiny hole in the geometry behind the camera that lets in a tiny bit of light to the exact position of the camera eye.
-
@thomthom said:
I've worked around it occasionally by adding a tiny hole in the geometry behind the camera that lets in a tiny bit of light to the exact position of the camera eye.
Ah, that was clever. Could it be made at least semi automatic?
Meaning, that one would create the "hole" between the sun and the camera and turn it on and of with a click or something like that?
Maybe booleans? -
To automate this...
You'd need to get the vector from 'target' to 'eye', then 'raytest' [but its now buggy in v8!] with it - from the 'camera.eye' [or do we need 'eye' to 'sun' vector?]; finding every face it hits, then adding a small 'hole' in each of the faces - even if they are in instances ? - these 'holes' would have a new small face put on a new layer that is 'off' [only in that view ?]...
A toggle toolbar that adds/removes the 'hole' is probably best - it'd find every face that's on that special layer and takes its edges and erase them if they are not needed to preserve other faces etc, these holes/faces would then disappear from the model...
Thomthom is the resident 'raytest' guru... AND made this initial idea so we await his new wonder_tool... -
I won't have time for this one.
But it could probably be made pretty non-restrictive by adding cut-out components where the holes needs tobe. then placing then on a separate layer for easy toggle.As for model.raytest - completely unpredictable in SU8, random rays fail. FUBAR. We need a patch for SU.
-
To clarify... is the 'hole' needed from eye along the target_to_eye vector, or from eye along the eye_to_sun vector???
How big is the 'hole' required to be ?
I can see that using a small 'hole cutting' component placed on every face at every intersection of the ray with a face would be best. It's non-destructive and easier to remove later... -
It'd be from the eye to the sun - as, if I remember correctly, the camera eye needed to be outside the shadows.
(You might want to verify this works properly - as I only did it a couple of times, on very simple models. I might have mistaken the conditions that made it work...)
Advertisement