Fog Distance -what does it refer to?
-
FogStartDis
is the distance from the camera's eye that the fog effect will kick in >0% obscuration - i.e. before that everything is not obscured at all.
FogEndDist
is the distance from the camera's eye that the fog effect has 100% obscuration - i.e. beyond that everything is obscured.
The distances are measured along the vector from the camera's 'eye' towards its 'target'... -
hmm... But when I zoom in and out of a view, the the fog doesn't change. I thought the SU zoom actually moved the camera. But no?
-
Does makes sense though. I just drew a cline from the camera eye to the target and plottet some cpoint offset from the eye at the start and end distance of the fog.
Interactive Fog tool next. Thanks TIG.
-
hey thomthom
was wondering if you'd made this plugin at all? (didn't see it in your sig link) if you have, i promise to make good use of it!
it sounds like to poor precision of this has bugged you like it has me - if no plugin do you know of a way i can carefully manipulate the fog, using script or something?thanks
-
Typing this in the Ruby Console returns the 'end of the fog' in 'm' [when everything is obscured]
Sketchup.active_model.rendering_options["FogEndDist"].to_m 7.43732765885055
i.e. about 7.4m
This sets the end distance
Sketchup.active_model.rendering_options["FogEndDist"]=8.m
to exactly 8.0mSimilarly you can get/set the 'start of the fog' with
Sketchup.active_model.rendering_options["FogStartDist"].to_m 4.98010062093833
i.e. it's about 5m
and to reset
Sketchup.active_model.rendering_options["FogStartDist"]=4.m
to exactly 4.0m -
thanks TIG that's really useful.
@thomthom said:
I thought the SU zoom actually moved the camera. But no?
me too...... i have a scene with a section cut - what is the best way to move the camera a little closer to the cut so my fog works better?
-
Why not move the for start/end instead ?
-
@tig said:
Why not move the for start/end instead ?
because my camera is a long distance away from the section cut which seems to reduce the precision with which i can set the fog. when the camera is closer to the cut i seem to have a lot more flexibility to control what is completely clear and what is fogged out. i did test it using your start / end tip tho, thanks.
so is it right that zooming in and updating my scene doesn't actually move the camera? 'walk' appears to be greyed out
-
Sketchup.active_model.active_view.camera.eye
==Point3d(-59.7779, -77.1402, 48.9843)
Sketchup.active_model.active_view.camera.target
==Point3d(3.18141, -0.298445, 25.7127)
Sketchup.active_model.active_view.camera.eye.distance(Sketchup.active_model.active_view.camera.target)
==102.029867652137ZOOM
Sketchup.active_model.active_view.camera.eye
==Point3d(-89.1738, -140.962, 69.414)
Sketchup.active_model.active_view.camera.target
==Point3d(-26.2145, -64.1203, 46.1425)
Sketchup.active_model.active_view.camera.eye.distance(Sketchup.active_model.active_view.camera.target)
==102.029867652137You will note that the distance between the eye and target is unchanged on a ZOOM... but the eye/target location points do change.
If you have the Fog dialog open and zoom in/out you will see the fog adjusts relative to the eye, and the two fog sliders auto-adjust to suits - thus the fog start/end are dynamic, based on the eye/target which in turn are affected by the zoom and other camera settings...
-
thanks TIG
you are beginning to show me how skp REALLY works
so i think i can move my camera (accurately) a little closer by a combination of the above info - i can tell skp where to put the camera, fog start and fog end precisely using coords and these 'commands'
Advertisement