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.

Shading for slow (or patient?) learners

Started by samdavo, June 29, 2013, 12:42:09 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

samdavo

I post an example where, after a tediously long period of experimentation / changing lights, I finally ended up with a half sensible rendering - complete with a hint of shadows. 
In summary,  it is still very "average" quality imo.   And the plates merge together around the edges for instance.   And finally the H angle for the light seems to have become the V angle ( or appears to be very confused / confusing)
 
Detail
Think of the drawing as two stacks of three plates each that someone shot a cannon ball through.   The fact that each plate is made of two parts is covered in other threads about Cross-sections (when holes are involved).  The second (lower) set have "Hidden Edge (Removed)" on those unwanted lines (but, unless grouped, each plate continues to behave as two planes) - irrelevant to this thread. 

Anyway I post approx the best I can do, (plus some notes), and invite others to discuss and/or improve on my attempt(S). 

Basically
1. I got no-where until I turned off Graphics Accelerator. Until then, the only thing I could achieve was a seriously amateurish workaround where I selected a variety of materials and colours to highlight the individual plates.
2. I don't see any difference in this case between Gouraud and Phong.
3. I enclose three alternatives for the direction of the light,  namely
  H00  V60
  H45  V60
  H90  V60
"Move with eye" ticked, as also "Shadows On" - and all three Shadows Options chosen near midrange (shadow map, softness, and tolerance).

4. Weird thing is that H seems to have more to do with V??  i.e. H=00 means the light is directly overhead(??)
5. I have used 5% fog, and this merges from front ( the lower set of plates) to the back ( the upper set).

(edit) DOHH - well I've worked one thing out anyway...
H00 and V60 is relative to the line from eye to "isometric object", already sloping at 35.26 degrees to horiz plane.
HENCE that light beam is sloping at 35.26+60 = 95.26, i.e. the "sun" isn't overhead, but slightly past vertical.
   

samdavo

#1
6. I also enclose some of the setting used above, for light source at H00 V60.

7. I also enclose a screensnip with shadows turned off. 
Without the shadows between the plates, the edge of one plate just merges with the one underneath.

8. One way (pretty amateurish) to get these edges to show clearly is to make them different colours (see attachment called "multiple colours").  But would this be acceptable for a catalogue? or something half - professional?  I suspect not.   
cheers

samdavo

#2
(edit) Next reply is more relevant than this one - penny has finally dropped by then

Probably the best is to have the light looking down
i.e. change "H45 V60 move-with-eye-ticked"
to  "H45 V60 move-with-eye-UNTICKED" ( and knowing that Isometric is a 45degree rotn about Y axis - and incidentally 35deg about the horiz plane).

That way the shadow highlights the front edge of the plates.

Note that all of the above posts - AND this one - use the standard Isometric view.(which starts to make a difference now that we are talking "move with eye unticked"

Note that H=00 Now has light from front
and V=90 now has light overhead.  (arguably more logical in that respect - some may disagree of course).


PS I believe I am correct in saying that you get the same lighting for
H = 00 and V = 00 deg with Move with eye ticked; ( compare an optometrist with a light in front of his eyes on his helmet);

as you do with
H = 45 and V = 35.26 deg and Move with eye UNTICKED (=  the settings that DCAD uses for Isometric)
in both cases you are looking down the light rays, and there is zero shadow. (no sample shown, but feel free to try it out).

samdavo

#3
ok - the penny drops
Here is a dcd drawing.
There are 2 lights there.

Light #1 is H=00 and V=(60-35.26) with "move with eye" ticked;
Light #2 is H=45 and V=60 "move with eye" UNTICKED.

You can choose either light #1 or light #2
and you get exactly the same shadows.
( because Isometric view has initial rotation of Ho=45 and Vo = 35.26.)

PS I add the shadows using one or other of the two lights ( #1 and #2) side by side as the final attachment. Note that they are the same.

samdavo

#4
Incidentally, I would argue that NONE of the above are particularly clear - and it is
MUCH easier
AND better
to simply have HLD hidden line dashed - which is possible in Model Space ( hence this screen snip) even if it isn't in Paper Space.
(All as mentioned in Feature requests)
and forget about shading.
(2 cents)
I mean there is no doubt what the enclosed attachment means.  All the rendered versions are unclear.

samdavo

#5
Lol
You're not gonna believe this, but this started as an attempt to draw a random-branched Xmas tree (Minstrel style).   Then I swept it around the wrong axis, (well right Y axis, but shifted horizontally due to handle being off centre) - and viola (violin whatever)  - I end up with a lamp :)

So I figured I might as well post it, and pretend it was intentional.
Cheers
sam   


PS Anyway, a lamp is more useful than a Xmas tree - specially in winter in Aus :)

samdavo

#6
oops lol
Then I get white stripes on the lampshade when I add a spotlight in the centre ( and vector convert the elliptical bulb).

For some reason I am reminded of the old story of sitting a dozen chimps at typewriters, and expecting one to come up with a Shakespearean drama, lol.   Such are my talents in this field of rendering.

PS On raising the spotlight, (from where I originally tried it somewhere near the bulb thinking that that would give bright effect) - I find the inside of the lampshade is brighter (2 cents)

samdavo

#7
etc etc
Clearly this is one of those romantic lamps that dims when you clap your hands.  :)

"To see, or not to see, that is the question"
... not quite there yet.


samdavo

#8
Lamp 6 with twisted licorice stand ( I drew a curve parallel to the first curve, and swept em both)  - and piano accordion,  this is what I got !!  lol.

samdavo

#9
Added a pretty lame tree, with wireframe balls.
Made the lampshade transparent, and the stand is twisted red and yellow lines swept together.
I get completely different effects with accelerator on or off (probably known to everyone else here but me);
shadows shows with accelerator off, and
and wireframe shows with it on etc etc .

PS the right hand bulb is an absolute experiment - I made a sphere, distorted it to an ellipsoid using infobox bounding box dimensions,  exploded that and vc'ed it - then lol , swept the multiple vectors.  I guess you could say that experiment was a disaster. :)

samdavo

#10
Herewith the dcd. It is pretty messy in terms of construction lines left in place, sorry (and I haven't used blocks which will annoy Minstrel - sorry m8 - - just booling around here ok?). 

PS Minstrel - Please note that I have learnt much from your youtubes -  any similarity to what I have done here to that is purely coincidental, and in no way a pisstake on
a. translucent balls,
b. with coloured shadows,
c. well constructed with circular arrays,
d. and blocks, and
e. with techniques that ( believe it or not) apply far beyond Xmas trees - right through the year in fact :)
thanks again.   

PS Back to that jpeg with "accelerator on" or off for that matter,  INITIALLY I couldn't understand why the back of the floor is brighter than the front - I had tried fogging - then turned it off.
But the fog remained lol.

Turns out it is due to spotlight #3 :)
And the only remaining fog is in my head.  Cheers.

samdavo

#11
Question...
How do you add a bright WHITE bulb to a drawing? (not talking off-white now).
Do you have to avoid coloured lights completely? (or hide the bulb in the shadow of any coloured lights maybe ?)

And I thought that making it the origin, and placing the light (as a spotlight) at the origin, it would help the realistic-ness of the inside of the lampshade.  But it seems to be too much like a mono-directional beam of light.

That disastrous experiment above was trying to replicate a glass cloth filament that you used to tie onto the gasflame (anyone remember those? - maybe called portable mantle type lamps ? powered by propane  these days I guess).  But the only way I can get WHITE-white is to change the elliptical bulb to white vectors / matchsticks.

I post the washed-out best effect I can get using white matchsticks - it is effectively transparent and lines are too thin.  So I tried making those lines "wider" with wide lines filled - that didn't work either.

THe first attachment shows what happened when I changed the set of matchsticks to a solid ( using Ctrl+D) - still vectors underneath - thinking that this make it appear when I tried "accelerator off"  - so that I might achieve BOTH
a. shadows, and
b. white bulbs,
but the solid is virtually invisible when placed in front of the lampshade (if you look at the marked up first attachment).

PS The missus says that my Xmas tree looks more like a Swiss guard at the Vatican than a tree - apologies to any Swiss guards reading this.

PS As for colours for lights in general ...  (other that my question how to get pure white)...
I notice that ...
http://www.neon-lighting.com/articles/Types%20of%20Lamps.htm

"No commonly used light source emits equal amounts of each light frequency, including daylight. Incandescent lamps are known for their warm colour, resulting from the fact that they emit more lower frequency red and orange light than high frequency blue and violet. The graph below clearly shows this bias towards the lower end of the visible spectrum".
I post some spectra of incandescent and neon lights ( for interest) .

Cheers
sam

samdavo

#12
Here's the mantle type light I though might be possible (2 cents)  - with zero success.

And also ( changing tack slightly) wouldn't you think that Chinese Lanterns would be fairly easy ?

samdavo

So I've put the white bulb in the too hard basket (although you can get it to work in a fashion with Accel ON = no real shadows).
And amended the lampshade to be opaque.
Herewith tree plus two alternative lamps called light 4 ( right) and light 5 ( left).
and a point light inside the lampshade ( actually towards the front of the circular shades, as you will note from the shadows).    Three screensnips with Accel OFF (= shadows), and one with it ON ( shows white bulbs)
But I suspect you can't get both together.
(2 cents).

samdavo