DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Accurate shadows

Started by samdavo, October 29, 2014, 03:28:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

Probably 90% of you know this, (or a similar technique)
and in any case it has been mentioned before:-

But suppose you want to draw an accurate shadow, (i.e. an accurate direction of light rays) eg from point A on the blade of a sundial ...
to point B on the ground; 
you can do it as follows:-

go to Q\Light Source,
set the light source as "Spotlight" (temporarily)
this lets you set "Position" = point A
and "Direction Point" = point B,
then press Apply,
then change Spotlight to Directional Light
(you should find horizontal and vertical angles of the light rays  automatically adjusted from spot light to directional light),

(PS turn off "move with eye")
also tick Shadows on,
press Apply again and back out of these settings.

And shade the drawing in Gourard or Phong with Accelerator turned off.  You should find the shadow going from A to B as per the "challenge" (2 cents).

SolarFreak

That's good stuff.  Since hanging around here and seeing all the renderings with shadows, I've started experimenting with the lighting options.  You've just revealed how to set the position of a directional light (those options are grayed out typically).  I was attempting to draw a surface with compound curves this morning, and was inspired to try drawing a parabolic trough and rendering realistically.  This will do it.

Thanks!

I love the torn looking paper at the base - nice touch!

samdavo

#2
solar
yep - options for setting those points are greyed out until you go to spotlight (temporarily as I say).

IMO, this is the easiest way to calculate the angles required for Q\lightsource,
eg on this occasion
Horiz Angle = -8 deg, and
Vert Angle = 42 deg.
And these are not easily measured / calculated.

PS Moving on, re the raggedy edges ...
the picture is of "the World's oldest sundial, from Egypt's Valley of the Kings (c. 1500 BC)" - you can find it here :-
http://en.wikipedia.org/wiki/Sundial.
i.e. those raggedy edges are the fault of some Egyptian stonemason :)

Herewith a more practical example - courtesy of adriank.  Note the shadows of the venetian blinds.

If you go to reply #44 on this thread, you will find a gif movie "pool and bedroom at dusk.gif"  that I made using his (adriank's) drawing - stick with it to the end, and you will see the effects of the sun setting behind those venetians :)
http://forum.designcad.com/index.php?topic=5522.msg37951#msg37951

PS If you haven't looked into bdeck's macro vdd***.d3m, as per the final post of that thread, you should consider doing so.  It is a great way to manipulate objects "in front of your eyes".
cheers
sam

samdavo

#3
solar
You and others might wonder why I put these topics on "General Discussion" thread.  In truth they are somewhere between "Looking for Help", and "Tips and Tricks".
 
Personally I find it an easy way to
a) present what I consider could be the subject of a youtube
b) except that I'm not 100% confident of all aspects of what I am espousing,
c) indeed I am often thinking aloud as I write the posts,
d) and frequently others chime in with corrections and improvements.

And at the end of the day, I believe I ask questions that others maybe haven't thought of asking yet, with benefits all round.
And I invite others to do likewise - both starting new topics, and setting me straight on topics I have started.
(2 cents) :) 

prl

Quote from: samdavo on October 29, 2014, 03:28:59 PM
Probably 90% of you know this, (or a similar technique)

Thanks Sam, I was, until this post, one of the 10% crowd.

samdavo

prl
well that makes a change - but I remain, in general, seriously in your shadow.

samdavo

#6
Actually, I'll demonstrate why I think the above method is the easiest way to set that "incident lightray direction",  bearing and inclination/elevation from the horizon.  Basically it only takes a few clicks of the mouse to set that to match AB.

And without construction lines (or some maths in the background), I can't see another way to get those angles.

Imagine a 3:4:5 triangle in the XZ plane  - so that the "bearing" of the hypotenuse = atan (3/4) = 36.8699 deg = "Horiz Angle" ;

and on top of the (5) hypotenuse, you draw a 5:12:13 triangle - so that the altitude of the sun = atan (12/5) = 67.3801 deg = "Vert Angle". (= the slope of a telescope looking at the sun.)
(These are slightly different to my initial drawing, although the sun is in the same quadrant and general direction).

Summary.
1. These are the same values you get after the "temporary spotlight" method above.  (although for some reason the x,y,z coords of points A and B are not correct when you set them (?) - even though as I say, in the final result, the angle(s) of the line between them is/are correct.

2. I challenge anyone to be able to easily find those values (without drawing construction lines) just using
Dimension\Info\Angle and Distance between points\angles to X Y and Z axes; 

or Dimension\Info\Angle and Distance between points\spherical, where you get
angle from the X axis to the projection of the line in the XY plane, (see note **) and
angle from the Z axis; (see note ***)
this is effectively useless imo, at least for finding bearing and elevation.

Note **.  It would be so much more useful if you could have the bearing of the line in the XZ (horizontal) plane,
Note ***  And if you could have the altitude/elevation of the final vector above that XZ (horizontal) plane.