by utiler » Mon Dec 12, 2011 9:45 pm
TIG wrote: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. 
purpose/expression/purpose/....
-

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
by 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)?
-

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
by 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
-

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
by 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.   simon
-

simon le bon
-
- Posts: 1077
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by 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
by 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 
++ simon
-

simon le bon
-
- Posts: 1077
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by 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
-

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
by TIG » Wed Dec 14, 2011 4:27 pm
Here's v1.1 viewtopic.php?p=371243#p3712431.1 20111214 Addressed issues with tiny faces/holes and group/instance sitting on face whilst casting a shadow.
TIG
-

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
by simon le bon » Wed Dec 14, 2011 7:18 pm
Hi TIG This tool is a great idea ++ 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.
-

simon le bon
-
- Posts: 1077
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by TIG » Wed Dec 14, 2011 9:24 pm
simon le bon wrote:Hi TIG This tool is a great idea ++ 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  [lost it!] I'll investigate...
Please, register (free) to access all the attachments on the forums. TIG
-

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
by 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 
I'm going to test the ShadowProjector with incremental complexity models... thank you for your patience and kindness *s
-

simon le bon
-
- Posts: 1077
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by TIG » Thu Dec 15, 2011 10:19 am
Hiding the glass, or putting it onto an 'off' layer work too...
TIG
-

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
by 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. 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 PS: [Plugin] Teapot (1.0.0) — 01 December 2009
Please, register (free) to access all the attachments on the forums.
-

simon le bon
-
- Posts: 1077
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by 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
-

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
by TIG » Thu Dec 15, 2011 4:57 pm
Here's v1.2 viewtopic.php?p=371243#p371243Its speed and error trapping are improved. It now limits its purview to potential shadow-casting objects and is therefore quicker... 
TIG
-

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
by simon le bon » Thu Dec 15, 2011 6:42 pm
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,


As it is, it's already a great tool dear TIG Thank you so much to make SketchUp each day growing as a wonderful application ++simon
-

simon le bon
-
- Posts: 1077
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by dereeei » Mon Dec 19, 2011 1:06 pm
I can't use the plugin  It crashes my model all the time. I made a magnifier glass and a ground plane (face) . I selected the face, that was oriented with front upwards (the shadow projected on front face), then ran the plugin. ... First time it made a grouped face over my selected one. Now it just crashes every time. Model attached.
Please, register (free) to access all the attachments on the forums.
-
dereeei
-
- Posts: 573
- Joined: Tue Nov 16, 2010 1:48 pm
- Name: derei
by TIG » Mon Dec 19, 2011 2:20 pm
It Bugsplats for me too. It's a relatively small object and makes many tiny facets in the shadow that it needs to process. Some complex shapes just have too much geometry. I erased the unneeded coplanar edges which up the face count considerably! Also made sure the forms were solids - tiny holes leak shadows - erased unwanted internal partitions and flaps... The small detailing on the handle also makes some tiny facets when projected. Lifting the handle up 1mm so it didn't touch the face [a single point of contact or tiny common facet seems to be awkward]. Making it 1000 bigger using Scale, simplifying the handle and putting the lens on an 'off' layer [you don't want it's shadow anyway ?] - I did get it to work eventually... BUT it took ages ! If I copy/paste your geometry into a new SKP I get an error fix now ? message about zero length edges - BUT it doesn't 'fix' within the SKP itself - weird... This simplified version processes readily without problems. Capture.PNG
Please, register (free) to access all the attachments on the forums. TIG
-

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
by Juantxo » Thu Feb 02, 2012 9:22 am
If someone is interested there is a similar shadow projector in skelion plugin. You can project shadows at specific time, but over a range of time too, that's the main difference of the plugin. I tried with the magnifier.skp test and it works.(Time calculation about a minut)
-

Juantxo
-
- Posts: 51
- Joined: Wed Jul 28, 2010 3:40 pm
- Location: Valencia
- Name: Juantxo
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Advanced
-
by morph » Sun Mar 11, 2012 2:48 pm
to TIG
I try to find the way to reduce the time of ShadowProjector plugin culation process after I found it take a long time when the number of calculated face up to 50 faces.
Now, I study in master degree and try to create plugin to retrieve shadow area from all day solar vector on glass face of building. When I try to put ShadowProjector algorithm to 10 loops solar vector, the time usage graph of 10 loops are not linear. It is parabola although the time usage graph in loop which use the .raytest function is linear.
Please suggestion.
-
morph
-
- Posts: 3
- Joined: Sun Aug 07, 2011 3:50 am
by TIG » Sun Mar 11, 2012 4:40 pm
Morph
The time it takes Sketchup to add objects to a context is not linear. The more objects the slower it is, but as you have noticed it is almost 'exponential' so x2 objects takes x4 the time etc. With relatively few objects this is not so noticeable - but the more objects the worse it gets. Also the number of objects already in the context slows things up considerably... so perhaps compartmentalizing the results inside their own entities context - e.g. a group - might speed things up...
TIG
-

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
by morph » Wed Mar 14, 2012 5:26 pm
to TIG Next idea I think I will try to use EntitiesObserver and EntityObserver to check face after first run calculation process (which take a long time) if face is not modified it will cut off from next calculation. But after I read Google Developer Sketchup ( https://developers.google.com/sketchup/ ... esobserver) it warn me that "WARNING: The methods of this observer fire in such a way that making changes to the model while inside of them is dangerous. If you experience sudden crashes, it could be because of this observer. A potential workaround is to use a ToolsObserver to watch what the user is doing instead." Please recommend me for my idea.
-
morph
-
- Posts: 3
- Joined: Sun Aug 07, 2011 3:50 am
by mra » Tue Jun 19, 2012 7:57 am
I can't seem to get this to work.
It works on one object on my scene, but crashes SketchUp if I attempt it on other objects (exploded or not, normals facing the right way).
-
mra
-
- Posts: 56
- Joined: Mon Nov 29, 2010 5:16 am
by TIG » Tue Jun 19, 2012 11:06 am
mra wrote:I can't seem to get this to work. It works on one object on my scene, but crashes SketchUp if I attempt it on other objects (exploded or not, normals facing the right way).
How does it 'crash' ? If you mean it becomes 'unresponsive' [aka a white-out], that doesn't mean it's crashed - it's just taking a long time to do all of the calculations needed - the complexity increases exponentially as everything has to be checked against everything else... You do need to keep things as simplified as you can to ensure it completes within a reasonable time - e.g. use layers etc to hide unwanted objects, ensure the objects are not too complex - and remember that it's pointless casting shadows from [or onto] door-handles, leaves etc - it's to take shadows from block models onto block models etc - also many objects won't cast shadows if they are already within the 'umbra' of other objects, so exclude those from the calculations too... If it's actually 'crashing' - as in a Bugsplat! - then what error messages do you get, if any 
TIG
-

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
by the.pjt » Tue Jun 19, 2012 8:08 pm
I wish this features would be done by SU core ... not ruby .. sorry for main developers .. if they had made a C++ API and compiled extensions .. or a open source program these tasks could be compute much faster ... but .. thanks a lot dear TIG , ... this is incredible to simulate shadow system in ruby ... thanks for everything , I don't know what is your name and who you are .. man or woman ? , but thanks dear unknown TIG ... 
-
the.pjt
-
- Posts: 208
- Joined: Sun Aug 09, 2009 1:20 pm
- Location: iran
- Name: pejman
by tetsuyahishida » Thu Jun 21, 2012 7:43 am
TIG!
This plugin is wonderful. I'm now planning to make a plugin to export an hourly data of the shadow ratio. And now checking the code of yours. Since sketchup API doesn't have enough kind of shadow API, it would very helpful if you could explain the algorithm to get the shadow.
Anyway thanks for your masterpiece.
-
tetsuyahishida
-
- Posts: 11
- Joined: Thu Jan 29, 2009 3:34 pm
- Location: Tokyo
by TIG » Thu Jun 21, 2012 9:46 am
tetsuyahishida wrote:TIG!
This plugin is wonderful. I'm now planning to make a plugin to export an hourly data of the shadow ratio. And now checking the code of yours. Since sketchup API doesn't have enough kind of shadow API, it would very helpful if you could explain the algorithm to get the shadow.
Anyway thanks for your masterpiece.
Read the .rb file's code to see how it works... The sun has a 'direction' [to get the direction of the rays of sunlight we reverse that vector]. The selected faces are processed in turn - 'selected face'... It finds the edges of all faces in the model or groups/instances that might shine onto that 'selected face'. It extrudes these edges into a grouped 'tube' with a very long set of faces, which it then intersects with the 'selected face' and adds faces temporarily. The tube is erased. It then has a set of edges representing the outer limits of the 'selected face's' shadows; internal 'coplanar' edges are erased so it's as simple as possible. Each 'shadow' group is formated as the options set, text added etc... Obviously it's much more complicated than that [e.g. how to spot if there's a 'hole' in a face], but the principle is as stated...
TIG
-

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
by tetsuyahishida » Fri Jun 22, 2012 2:35 am
Wow now I got it.I guess that's the best way. Thanks so much. TIG wrote:tetsuyahishida wrote:TIG!
Read the .rb file's code to see how it works... The sun has a 'direction' [to get the direction of the rays of sunlight we reverse that vector]. The selected faces are processed in turn - 'selected face'... It finds the edges of all faces in the model or groups/instances that might shine onto that 'selected face'. It extrudes these edges into a grouped 'tube' with a very long set of faces, which it then intersects with the 'selected face' and adds faces temporarily. The tube is erased. It then has a set of edges representing the outer limits of the 'selected face's' shadows; internal 'coplanar' edges are erased so it's as simple as possible. Each 'shadow' group is formated as the options set, text added etc... Obviously it's much more complicated than that [e.g. how to spot if there's a 'hole' in a face], but the principle is as stated...
-
tetsuyahishida
-
- Posts: 11
- Joined: Thu Jan 29, 2009 3:34 pm
- Location: Tokyo
by Gonvaz » Fri Feb 15, 2013 11:11 am
I'm afraid I can't make it work. I select a face, then I click tools>ShadowProjector, select lines, or faces, etc. and nothing happens. I haven't been able to get any projection of any shadow.
-
Gonvaz
-
- Posts: 3
- Joined: Fri Aug 19, 2011 11:08 am
- Name: Gonvaz
Return to Plugins
|