SketchUcation Plugin Store

 

 

[Plugin] ShadowProjector v1.2 20111215

[Plugin] ShadowProjector v1.2 20111215

Postby TIG » Sat Dec 10, 2011 3:48 pm

###
Copyright 2011, TIG (c)
Permission to use, copy, modify, and distribute this software for any
purpose, and currently without fee, is hereby granted, provided that
this text and the above copyright (c) notice appear in all copies.
This software is provided "as is" and without any express or implied
warranties, including, without limitation, the implied warranties of
merchantability and fitness for a particular purpose.
###
Name: TIG-shadowProjector.rb
###
Activate:
Menu > 'Tools' > 'ShadowProjector'
###
Usage:
Select Face[s] - any other Objects in the Selection are ignored.
Run the tool.
Choose the 'Type' from the initial settings dialog's drop-down list.
    Lines
    Edges
    Faces
    Faces[Edged]
    Faces[Edged]%
    Faces[Edged]%sq
OK to continue, Cancel to abort.
'Lines' draws just the lines along each shadow's perimeter on the face.
'Edges' draws a looped line around each shadow's perimeter.
'Faces' draws each shadow as a 'gray' face, with hidden edges.
'Faces[Edged]' draws each shadow as a 'gray' face, with visible edges.
'Faces[Edged]%' draws each shadow as a 'gray' face, with visible edges,
it then adds a text-tag to the center of the 'Shadow' showing the % of
the Face in shade.
'Faces[Edged]%sq' is similar, but it also appends the shaded:total area
in sq' or sqm.
If you choose a 'Text' option a second dialog asks for the text height
[default is 2" or 50mm].
The last used 'Settings' are remembered during a session.
Faces that are oriented away from the sun are ignored if the 'Type' does
not include making a Face.
Unless are making 'Shadows' with Faces do not Select Faces oriented away
from the sun as they will be ignored anyway.
Qualifying Faces are now processed in turn.
All Faces are analyzed for shading, so it's much quicker to Select only
those Faces you know to be shaded [or you are interesting in]; as an
unshaded Face will take time to analyze and produce no 'Shadow' anyway.
'Shadows' are drawn over the Face showing the extent on any shadows cast
on it by other active Faces located between it and the sun [within 1km].
Note that a Surface's 'Shadows' are processed as separate facets, so
it's much quicker to have hidden geometry 'on' and then Select only
those Surface Faces that you know are shaded...
Faces within active Groups and Components will be included in any
shadow-casting analysis - but they slows down processing considerably.
Hidden Objects or those on 'off' Layers are ignored in the analysis;
BUT those with 'casts_shadows/receive_shadows' unchecked ARE still used.
Each 'Shadow-Group' is named after the ShadowTime and the Face's ID;
e.g. 'Shadows@Jun_21_12:00#0xc741eac'***
***A Face's ID changes with each session.
Those with % or %sq have the text-group similarly named but with those
values appended to the name;
e.g. 'Shadows@Jun_21_12:00#0xc741eac=67.1%'
The 'Shadow-Groups' are put on a Layer named 'SHAD'.
The 'Shadows' 'gray' material is named 'Shadows'; once it's been made
you can change its color/transparency etc as desired.
Any text is colored 'Black'.
The text-group can be moved within the shadow-group for clarity etc.
The tool beeps when it's finished processing.
The processing is one step undoable.
Note that if the 'Shadows' have Faces then the Shadow-Face is moved
0.1mm off the original Face to avoid 'z-fighting' between surfaces.
Similarly any text-group is slightly offset too.
It's best to process a few faces at a time because Sketchup slows up
almost 'exponentially' as it processes larger collections...
If you process a lot at once be prepared to have lunch and come back
when it's done !
Remember that although it might 'white-out' it is still processing.
It's recommended that you keep the Outliner window closed when using
this tool, although it can be useful for selecting shadow/text-groups
later on.
###
Donations: PayPal.com to info @ revitrev.org
###
Version:
1.0 20111210 First issue.
1.1 20111214 Addressed issues with tiny faces/holes and group/instance
sitting on face whilst casting a shadow.
1.2 20111215 Speed and error trapping improved.
###
TIG-shadowProjector.rb
Please, register (free) to access all the attachments on the forums.
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby kaas » Sat Dec 10, 2011 4:48 pm

A great plugin! Thanks TIG.

Very usefull to add more depth to facades (filling the shadow-faces with hatch lines by using Jolran's 2dBoolean and assigning a thin 'pen' to the shadow-scene in LO).

greetings, Max
kaas
 
Posts: 42
Joined: Mon Mar 30, 2009 5:54 pm
Location: the Netherlands
Name: kaas
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] ShadowProjector v1.0 20111210

Postby utiler » Sun Dec 11, 2011 12:47 am

Neat TIG!! DO you ever get time to work for money???

This is a little like GOH's 1001Shadows, right?

http://www.1001shadows.com/en/index.html

:thumb:
purpose/expression/purpose/....
User avatar
utiler
Top SketchUcator
 
Posts: 1936
Joined: Wed Nov 14, 2007 11:35 am
Location: Queensland, Australia
Name: Andrew
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby d0n » Sun Dec 11, 2011 12:48 am

really useful plugin

Would it be possible to add an option to pick the source of the shadow ? say I only want to see the projected shadow from 1 component on 1 selected face
d0n
 
Posts: 7
Joined: Sat Aug 27, 2011 12:16 am

Re: [Plugin] ShadowProjector v1.0 20111210

Postby Pilou » Sun Dec 11, 2011 2:59 am

Just idea : makes the "solid shadow" volume from the object to the ground shadow casted ;)
So that will obtain a funny volume that you can colorize as you want !
So you can calculate its volume for any process :)
For example compare 2 objects for know what the object who makes the biggest shadow volume! ;)
Or the one who makes the more beauty shadow volume!
Poetic isn't it ? :enlight:

Or another funny problem of reverse ingeneering :)
What is the object who create this shadow volume :)
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10213
Joined: Wed Jan 23, 2008 10:33 pm
Operating system: Windows
SketchUp version: 6
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby TIG » Sun Dec 11, 2011 12:07 pm

utiler wrote:Neat TIG!! DO you ever get time to work for money???
This is a little like GOH's 1001Shadows, right?
http://www.1001shadows.com/en/index.html
:thumb:

Not the same thing, this shows shadows cast on selected faces by objects, I don't have that tool but I think 1001shadows projects all onto the 'ground' [of course if you have a ground-plane face selected my tool does the same]. My tool also has options of displaying the shadows - from a line, to a face, to a face with statistics...
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby TIG » Sun Dec 11, 2011 12:09 pm

d0n wrote:really useful plugin
Would it be possible to add an option to pick the source of the shadow ? say I only want to see the projected shadow from 1 component on 1 selected face
Select the objects you don't want to cast shadows and temporarily group them, then either put the group onto an 'off' layer or hide that group OR simply Edit>Cut the unwanted items. Then do the shadows and the unseen grouped/cut objects are ignored; then unhide the temporary group and explode it OR Edit>PastInPlace to restore the objects ?
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby Pixero » Sun Dec 11, 2011 4:18 pm

Wow, thanks TIG this seem to be exactly what I wished for a little while ago. To bad it's too late for that perticular project but there will be more I'm sure.
Thanks!
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1301
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby TomDC » Sun Dec 11, 2011 8:01 pm

Cool! Thanks! :thumb:
Bill Maher on the French: "They invented sex during the day, lingerie and the tongue."
TomDC
 
Posts: 2940
Joined: Mon Nov 12, 2007 1:16 pm
Location: Behind you.

Re: [Plugin] ShadowProjector v1.0 20111210

Postby simon le bon » Sun Dec 11, 2011 8:29 pm

Hi TIG :D :enlight:

How many smart tools from you I haven't tested? a bunch of them I guess: it's a pity (but they are carefully bookmarked ;) ).

This one one more time, is full of potential :thumb: :thumb: :thumb:



+++
simon
User avatar
simon le bon
 
Posts: 1077
Joined: Sat Jan 26, 2008 10:22 am
Location: Chouy/ Picardie/ France
Name: Simon Bonnet

Re: [Plugin] ShadowProjector v1.0 20111210

Postby TIG » Sun Dec 11, 2011 9:28 pm

Perhaps it's my Christmas Present to SCF...
I've been working on it for some time... and I finally got a moment to polish if up for its release...
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby mitcorb » Sun Dec 11, 2011 10:30 pm

Hi, TIG:
Another great tool from you.
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3429
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] ShadowProjector v1.0 20111210

Postby simon le bon » Sun Dec 11, 2011 11:09 pm

Perhaps it's my Christmas Present to SCF...


:thumb: :thumb:

:fro:


*s
User avatar
simon le bon
 
Posts: 1077
Joined: Sat Jan 26, 2008 10:22 am
Location: Chouy/ Picardie/ France
Name: Simon Bonnet

Re: [Plugin] ShadowProjector v1.0 20111210

Postby jolran » Mon Dec 12, 2011 9:32 am

Cool idea, TIG! :thumb:
User avatar
jolran
 
Posts: 678
Joined: Sun Oct 26, 2008 9:23 pm
Location: Sweden
Name: Joel G
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] ShadowProjector v1.0 20111210

Postby darospa » Mon Dec 12, 2011 1:59 pm

fantastic!!!! a great help for architectural drawings instead of cheap renderings

thank you
darospa
 
Posts: 3
Joined: Mon Jan 26, 2009 6:10 pm
Name: darospa

Re: [Plugin] ShadowProjector v1.0 20111210

Postby utiler » Mon Dec 12, 2011 9:45 pm

TIG wrote:
utiler wrote:Neat TIG!! DO you ever get time to work for money???
This is a little like GOH's 1001Shadows, right?
http://www.1001shadows.com/en/index.html
:thumb:

Not the same thing, this shows shadows cast on selected faces by objects, I don't have that tool but I think 1001shadows projects all onto the 'ground' [of course if you have a ground-plane face selected my tool does the same]. My tool also has options of displaying the shadows - from a line, to a face, to a face with statistics...


That's pretty cool, TIG. :thumb:
purpose/expression/purpose/....
User avatar
utiler
Top SketchUcator
 
Posts: 1936
Joined: Wed Nov 14, 2007 11:35 am
Location: Queensland, Australia
Name: Andrew
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby pbacot » Tue Dec 13, 2011 12:45 am

Something cool about this but not sure how someone makes use of it. Is it only so you can export a polygon and use it in a CAD rendering (2d)?
User avatar
pbacot
Top SketchUcator
 
Posts: 2766
Joined: Sun Jul 20, 2008 7:26 pm
Location: Sonoma
Name: pbacot
Operating system: Mac
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] ShadowProjector v1.0 20111210

Postby TIG » Tue Dec 13, 2011 12:16 pm

pbacot wrote:Something cool about this but not sure how someone makes use of it. Is it only so you can export a polygon and use it in a CAD rendering (2d)?
It's as useful as you think up uses for it... :?
For example, checking the % of solar shading on some selected glazing at a certain Date/Time.
Getting the area [sq'/sqm] of perhaps some selected glazing or a solar-panel that's receiving [or not receiving] direct sunlight...
Because faces using a translucent material don't show normal shadows you can now use this tool to add a visible translucent 'gray' shadow-group face [with no edges] onto selected window-glass etc, to fake these shadows in a Sup render...
DAE files etc don't contain shadow info but you can now include a faced snapshot of the shadows if desired.
I only invented the tool - you lot need to come up with uses for it... ;)
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.0 20111210

Postby simon le bon » Wed Dec 14, 2011 1:45 am

Dear Tig,

TIG wrote:Because faces using a translucent material don't show normal shadows you can now use this tool to add a visible translucent 'gray' shadow-group face [with no edges] onto selected window-glass etc, to fake these shadows in a Sup render...

That was exactly what I wanted to experiment: colored glasses and their colored shadows...

Glasses and bottle are drawn , but :? I can't make to "ShadowProjector" draw their shadows.. Probably too complex shapes.


:roll: simon
User avatar
simon le bon
 
Posts: 1077
Joined: Sat Jan 26, 2008 10:22 am
Location: Chouy/ Picardie/ France
Name: Simon Bonnet

Re: [Plugin] ShadowProjector v1.0 20111210

Postby driven » Wed Dec 14, 2011 3:25 am

Simon,
what scale are you trying at, is it a small triangle issue... just a thought
john
driven
Top SketchUcator
 
Posts: 1455
Joined: Fri May 01, 2009 11:50 pm
Name: John
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

Re: [Plugin] ShadowProjector v1.0 20111210

Postby simon le bon » Wed Dec 14, 2011 10:53 am

Hi John

You are right in the way I never take enough care of the scale !!! ;)
In this occurrence, the scale is not too small but too big: a glass of 135cm width !! You may be thirsty :shock:



++simon
User avatar
simon le bon
 
Posts: 1077
Joined: Sat Jan 26, 2008 10:22 am
Location: Chouy/ Picardie/ France
Name: Simon Bonnet

Re: [Plugin] ShadowProjector v1.0 20111210

Postby TIG » Wed Dec 14, 2011 2:52 pm

Is the orange face 'reversed' - view in Monochrome mode to see.
Shadows are only cast onto front faces.
Also there is an issue with tiny faces/holes and groups/instances placed exactly onto a face and casting a shadow.
I'm doing a fix now...
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.1 20111214

Postby TIG » Wed Dec 14, 2011 4:27 pm

Here's v1.1 viewtopic.php?p=371243#p371243
1.1 20111214 Addressed issues with tiny faces/holes and group/instance sitting on face whilst casting a shadow.
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.1 20111214

Postby simon le bon » Wed Dec 14, 2011 7:18 pm

Hi TIG ;)

This tool is a great idea ++ :thumb:
I'm very sorry The updated rb doesn't work at all and anymore for me (and the first version is overwrited arghhh!).

Please can you pick an eye on my following SketchUp 7 model ?

TIG_shadowProjector002.skp


Sorry for trouble :?

++simon
Please, register (free) to access all the attachments on the forums.
User avatar
simon le bon
 
Posts: 1077
Joined: Sat Jan 26, 2008 10:22 am
Location: Chouy/ Picardie/ France
Name: Simon Bonnet

Re: [Plugin] ShadowProjector v1.1 20111214

Postby TIG » Wed Dec 14, 2011 9:24 pm

simon le bon wrote:Hi TIG ;)

This tool is a great idea ++ :thumb:
I'm very sorry The updated rb doesn't work at all and anymore for me (and the first version is overwrited arghhh!).

Please can you pick an eye on my following SketchUp 7 model ?

TIG_shadowProjector002.skp


Sorry for trouble :?

++simon
I can get it to work with reduced complexity [removing the 'glass']...
Capture.PNG

I don't have v1.0 either :roll: [lost it!]
I'll investigate...
Please, register (free) to access all the attachments on the forums.
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.1 20111214

Postby simon le bon » Thu Dec 15, 2011 12:48 am

Hi TIG,

I can get it to work with reduced complexity [removing the 'glass']...


Me too :thumb: ;)


I'm going to test the ShadowProjector with incremental complexity models...

thank you for your patience and kindness

*s
User avatar
simon le bon
 
Posts: 1077
Joined: Sat Jan 26, 2008 10:22 am
Location: Chouy/ Picardie/ France
Name: Simon Bonnet

Re: [Plugin] ShadowProjector v1.1 20111214

Postby TIG » Thu Dec 15, 2011 10:19 am

Hiding the glass, or putting it onto an 'off' layer work too...
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.1 20111214

Postby simon le bon » Thu Dec 15, 2011 12:30 pm

Dear TIG

I can get it to work with reduced complexity [removing the 'glass']...
_ _ _ _ _ _
Hiding the glass, or putting it onto an 'off' layer work too...

As I can conclude , ShadowProjector not only take in account the geometry casted by the shadowed selected face, but also the entire geometry of the model.:roll:
:?

I'm going to test the ShadowProjector with incremental complexity models...


Alas ShadowProjector is stopped by the first model :?





TIG_shadowProjector_incrementalComplexity.skp


Simon.

PS1: I am not happy to be the one who show the tool limitations :oops:

PS: [Plugin] Teapot (1.0.0) — 01 December 2009
Please, register (free) to access all the attachments on the forums.
User avatar
simon le bon
 
Posts: 1077
Joined: Sat Jan 26, 2008 10:22 am
Location: Chouy/ Picardie/ France
Name: Simon Bonnet

Re: [Plugin] ShadowProjector v1.1 20111214

Postby TIG » Thu Dec 15, 2011 2:35 pm

You are right.
It would be better/quicker if it found only the objects potentially casting shadows on the face...
BUT the algorithm to do that robustly is beyond me [at the moment].
So at the moment it checks everything that's active for shadow casting even when it doesn't even cast a shadow on the face.
So I suggest that keep the 'active entities' simple [using temporary grouping?] and do small sets of shadows...
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] ShadowProjector v1.2 20111215

Postby TIG » Thu Dec 15, 2011 4:57 pm

Here's v1.2 viewtopic.php?p=371243#p371243
Its speed and error trapping are improved.
It now limits its purview to potential shadow-casting objects and is therefore quicker... :shock:
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Need SketchUp Books, Models, Styles or Textures? Check out our One Stop Shop for SketchUp.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012

Next

Return to Plugins

Who is online

Users browsing this forum: Bing [Bot], imranzabidin, jo-ke, pbun and 10 guests