Any way to set make Shadows on a ceiling?

I know you can set the sun angle but at some point (sunset or sunrise) the sun goes dark, as you would expect in a real-world example.

I do Reflected Ceiling Plans in SU however and is would be great to have shadows coming from below or “underground” to accomplish this.

I thought about setting a daytime scene then somehow trying to use vector.reverse to generate the opposite direction but shadow_info only seems to accept NorthAngle, lat, long, and time settings, none of which will generate the desired outcome I don’t think.

Any thoughts.

The only workaround that comes to my mind is to make your model into a component and place an upside down (and mirrored) copy of it and use that as the basis of the ceiling plan.

1 Like

I’m not picturing what you may mean…

do you want to see ‘light’ coming through openings and the shadows cast on floor and objects below, or something else…

can you attach a ‘without shadows’ example img and or simple skp…

on a mac it’s reasonably easy to programatically generate a copy with any or all parameters modified

and continue processing it within the same ruby module… [ i.e. change :active_model ]

if you work on a copy, you can be a lot more aggressive in your coding to achieve the single view you desire…

when looking at these types of problems, I first work out a manual workflow to achieve the end result…

I then work out in which order would best suit the API as it may differ…

if your end result is a ‘Top View’ ‘Parallel Projection’ looking through the ceiling with ‘light’ falling on 3D objects and floor below, then modifying a ‘Section Slice’ group may be all that’s required…

more details needed I’m afraid…

EDIT:
this is what I mean by a modified section cut…


john

Hi John,

When I cut a Reflected Ceiling Plan (RCP), I put a section plan in the model at about 4 feet above the floor but actually reverse the direction of the cut. In other words, if you selected the “Align View” in the Section Plane’s contextual menu, you would be looking up at the top half of the model with the sky beyond.

In and RCP view is when the problem of having no shadows presents itself.

Like so…

BTW, you seem to be very quick with the animated GIFs… what do you use to generate them? Your GIF is 395 KB and mine is 4M and half the length! I use Photoshop and try everything to downsize… skip 3/4 frames, downsize to 800 pixels wide, SaveForWeb optimized. Sheesh!

I have LiceCap.app, with a button in SU to launch it [of course]…

john

Along the line of @Anssi’s suggestion: a mirrored component next to the original that you can work on.
Not sure if this is what you mean though.

image

2 Likes

Right, That does the trick but would like it to be a little cleaner… These models could have thousands of entities and maintaining 2 would be a bear, even if they were components.

A good suggestion though!

Very slick!

So what I mean is viewing the model from below as shown, can you get the sun to come from a position that has a negative Z (blue axis) value so the shadows (really light AND shadows!) will fall on the surface of the ceiling.

From the API, I can see that I can adjust the sun direction on the XY plane using

Sketchup.active_model.shadow_info['NorthAngle']

The angle relative to the ground plane (the azimuth) however does not appear to be able to be set directly. Instead you set a date/time and possibly a geolocation.

I think my only chance would somehow be to:

  • convince SU that I am in China on when it is noon in the US (possibly by setting the sunset and sunrise times to something ridiculous)
  • fake a position in outer space?
  • hack the shadow rendering features to set an angle directly

Any thoughts?

is that a MAC or PC capture software? it captures Lice? :smile:

Not sure why you want to show shadows on ceiling plans but if you think they

will be to complex why not make your model (or part thereof ) a component,

save it in a new file, turn it upside down and cast your shadows…

if your master model changes… just update the RCP…

now this is a good example of the benefits of XREFs

As I and g.h.hubers suggested, if you make your model into a component, a copy will update automatically when you edit the original.

2 Likes

Thanks guys but looking for a programmatic solution. :grimacing:

upload or PM me a geolocated model where you know that ‘sunlight’ should shine on the ceiling and I’ll have a play…

I think either sunposition.rb or shadow_projector.rb could help…

my thought are to :move the whole model to a suitable altitude, capture the shadows as geometry then :move the lot back…

in the RCP scene you turn ‘shadows’ off and use a translucent grey material on the captured shadow group…

john

OK, I looked at both plugins and they are not quite it either:

  • sunposition basically re-creates a sun path but is less concerned with actually generating the shadows from a given sun position.
  • shadow_projector creates geometry where the shadows would be but does not mess with actual sun positions.

I also don’t want to mess with moving the model as there may be several things/dependancies in the model that could mess up.

Perhaps we should forget about the ceiling/RCP example and I will just restate as a new question that is more targeted.

So here is the re-stated question:

1 Like