Tree Bitmap casts sqaure shadow??
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-06-09 05:42 AM
‎2004-06-09
05:42 AM
7 REPLIES 7

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-06-09 09:30 AM
‎2004-06-09
09:30 AM
This is a bug in 8.1 (perhaps 8.0 too) that David NC and I (and probably others) have been complaining about for some time. The shadow masking worked properly in 7.0 and earlier.
No really good solution for trees ... but for people, place the image on the plan, trace a slab over it, save as an upright GDL object, apply the person bitmap to it, and align texture. A pain, but a workaround.
Alternatively, if you have Piranesi or Artlantis, do the bitmap trees there...
Sorry.
Karl
No really good solution for trees ... but for people, place the image on the plan, trace a slab over it, save as an upright GDL object, apply the person bitmap to it, and align texture. A pain, but a workaround.
Alternatively, if you have Piranesi or Artlantis, do the bitmap trees there...
Sorry.
Karl
AC 28 USA and earlier • macOS Sequoia 15.4, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-06-09 04:18 PM
‎2004-06-09
04:18 PM
There are a lot of good bitmap trees at www.gdlcentral.com. They're free and they've just been uploaded! I'd recommend downloading the entire library zip file, rather than each tree manually.
Cheers,
Link.
Cheers,
Link.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-06-10 06:51 AM
‎2004-06-10
06:51 AM
Link wrote:Sadly, these too, cast rectangular shadows. The revised Garden Works trees are much better than the billboard tree that comes in the standard AC library though, whether for views at different angles ... or for flythroughs or VRs. Just no useful shadows if rendered in AC until they fix the masking problem.
There are a lot of good bitmap trees at www.gdlcentral.com. They're free and they've just been uploaded! I'd recommend downloading the entire library zip file, rather than each tree manually.
Karl
AC 28 USA and earlier • macOS Sequoia 15.4, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-06-10 09:45 PM
‎2004-06-10
09:45 PM
Karl,
Actually its not a bug...ArchiCAD's rendering engine just needs a little help. If you follow the modification steps below to edit the "TreeBitmap.gsm" object, you'll have a tree object that casts shadows! Of course it will be limited to the tree images that come with the standard ArchiCAD library. If there's enough interest, I may offer a more sophisticated version that will call any tree image you choose to store in your library. I personally use Image Cels and get great results
Anyway here goes:
1.) Open the "TreeBitmap.gsm" object
2.) Comment out the "entire" existing 3D script and paste the following in its place:
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
define texture "shadowmap" pic, a,zzyzx,1,0
shadow on
define material "shadowmap" 20,
1,1,0,
.58,.85,0,1,
0,
0,
.878401,.513481,.412253,
0,0,0,
0,
IND(fill, "solid fill"),61,
IND(texture, "shadowmap")
material shadowmap
!!! rotate shadow mask to sun's azimuth
if SYMB_MIRRORED goto 5
rotx 90
roty ((GLOB_SUN_AZIMUTH)+90)-w~
goto 10
5:
rotx 90
roty -((GLOB_SUN_AZIMUTH)+90)+w~
!!!create plane for shadow mask
10:
plane_ 4,
-a/2,0,0,1,
a/2,0,0,1,
a/2,zzyzx,0,1,
-a/2,zzyzx,0,1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! make visible part of tree
!!! rotate perpendicular to camera
shadow off
material m_
del top
dkx=K~-X~:if dkx=0 then dkx=1
dly=L~-Y~:if dly=0 then dly=1
dazi=ATN(dly/dkx)
if (dazi+90) >90 then rotz 180
if (dazi+90) <90 then rotz 0
if SYMB_MIRRORED goto 20
rotz 90+dazi-W~
goto 30
20:
rotz -90-dazi+W~
30:
pen 10
ROTX 90
ADDX -A/2
picture pic,a,zzyzx,1
end
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
3.) Switch to the parameter script, comment and/or delete the entire exisitng parameter script and paste the following in its place:
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
values "pic" "decid1","decid2","decid3","pine1","pine2"
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
!!!values "pic" `Deciduous 1`,`Deciduous 2`,`Deciduous 3`,
!!!`Pine 1`,`Pine 2`
values "gs_detlevel_3D" `Detailed`,`Off`
if gs_cont_pen=0 then parameters gs_cont_pen=4
if gs_fill_pen=0 then parameters gs_fill_pen=91
values "typ" `Style 1`,`Style 2`,`Style 3`,
`Style 4`,`Style 5`,`Style 6`,`Style 7`,
`Style 8`,`Style 9`,`Style 10`
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
4.)If you check the 3d Script you may get a message stating something like "error in definition of materials..." Just ignore this and save your object.
5.)You should now have a fully working, shadow casting, camera rotating, tree object!!! (note that the tree image rotates to the camera but the shadow plane rotates to the sun!!!)
6.) place the object in your model and do a 3d view - it should rotate to the camera. If you change the camera position, you may need to rebuild the window in order for the object to update to the new camera postion.
7.) And finally, make sure you the Photo Rendering Setting's "Options..." set to "use transparency in shadow calculations"
Happy Script Editing! Please let me know your results,
Regards,
Dan K
Actually its not a bug...ArchiCAD's rendering engine just needs a little help. If you follow the modification steps below to edit the "TreeBitmap.gsm" object, you'll have a tree object that casts shadows! Of course it will be limited to the tree images that come with the standard ArchiCAD library. If there's enough interest, I may offer a more sophisticated version that will call any tree image you choose to store in your library. I personally use Image Cels and get great results
Anyway here goes:
1.) Open the "TreeBitmap.gsm" object
2.) Comment out the "entire" existing 3D script and paste the following in its place:
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
define texture "shadowmap" pic, a,zzyzx,1,0
shadow on
define material "shadowmap" 20,
1,1,0,
.58,.85,0,1,
0,
0,
.878401,.513481,.412253,
0,0,0,
0,
IND(fill, "solid fill"),61,
IND(texture, "shadowmap")
material shadowmap
!!! rotate shadow mask to sun's azimuth
if SYMB_MIRRORED goto 5
rotx 90
roty ((GLOB_SUN_AZIMUTH)+90)-w~
goto 10
5:
rotx 90
roty -((GLOB_SUN_AZIMUTH)+90)+w~
!!!create plane for shadow mask
10:
plane_ 4,
-a/2,0,0,1,
a/2,0,0,1,
a/2,zzyzx,0,1,
-a/2,zzyzx,0,1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! make visible part of tree
!!! rotate perpendicular to camera
shadow off
material m_
del top
dkx=K~-X~:if dkx=0 then dkx=1
dly=L~-Y~:if dly=0 then dly=1
dazi=ATN(dly/dkx)
if (dazi+90) >90 then rotz 180
if (dazi+90) <90 then rotz 0
if SYMB_MIRRORED goto 20
rotz 90+dazi-W~
goto 30
20:
rotz -90-dazi+W~
30:
pen 10
ROTX 90
ADDX -A/2
picture pic,a,zzyzx,1
end
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
3.) Switch to the parameter script, comment and/or delete the entire exisitng parameter script and paste the following in its place:
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
values "pic" "decid1","decid2","decid3","pine1","pine2"
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
!!!values "pic" `Deciduous 1`,`Deciduous 2`,`Deciduous 3`,
!!!`Pine 1`,`Pine 2`
values "gs_detlevel_3D" `Detailed`,`Off`
if gs_cont_pen=0 then parameters gs_cont_pen=4
if gs_fill_pen=0 then parameters gs_fill_pen=91
values "typ" `Style 1`,`Style 2`,`Style 3`,
`Style 4`,`Style 5`,`Style 6`,`Style 7`,
`Style 8`,`Style 9`,`Style 10`
!!!____________________________________________!!!
!!! SCRIPT MODIFIED BY dvk 061004 !!!
4.)If you check the 3d Script you may get a message stating something like "error in definition of materials..." Just ignore this and save your object.
5.)You should now have a fully working, shadow casting, camera rotating, tree object!!! (note that the tree image rotates to the camera but the shadow plane rotates to the sun!!!)
6.) place the object in your model and do a 3d view - it should rotate to the camera. If you change the camera position, you may need to rebuild the window in order for the object to update to the new camera postion.
7.) And finally, make sure you the Photo Rendering Setting's "Options..." set to "use transparency in shadow calculations"
Happy Script Editing! Please let me know your results,
Regards,
Dan K
Karl wrote:
This is a bug in 8.1 (perhaps 8.0 too) that David NC and I (and probably others) have been complaining about for some time. The shadow masking worked properly in 7.0 and earlier.
No really good solution for trees ... but for people, place the image on the plan, trace a slab over it, save as an upright GDL object, apply the person bitmap to it, and align texture. A pain, but a workaround.
Alternatively, if you have Piranesi or Artlantis, do the bitmap trees there...
Sorry.
Karl

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-06-11 03:02 AM
‎2004-06-11
03:02 AM
Dan wrote:Can't follow all of that at the moment, Dan (but thank you!) ... but to clarify: it is a bug, because the objects worked in 7.0. Whether the bug is in the objects themselves or in the engine is another matter, but something that used to work no longer works = usability bug.
Karl,
Actually its not a bug...ArchiCAD's rendering engine just needs a little help.
Karl
AC 28 USA and earlier • macOS Sequoia 15.4, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-06-15 09:50 PM
‎2004-06-15
09:50 PM
Karl wrote:Dan wrote:Can't follow all of that at the moment, Dan (but thank you!) ... but to clarify: it is a bug, because the objects worked in 7.0. Whether the bug is in the objects themselves or in the engine is another matter, but something that used to work no longer works = usability bug.
Karl,
Actually its not a bug...ArchiCAD's rendering engine just needs a little help.
Karl
Try this, it works very well, a complete replacement for all Picture objects, using the same parameters mostly, and using A and zzyzx. Casts shadows perfectly!!!
this is in the IOMWAC book.
You can add the object turning routine if you want.
!!Billboard.gsm
!Omwac book
!2D Script
!June 2004
PEN cont_pen
HOTSPOT2 0,0
HOTSPOT2 A,0
HOTSPOT2 A/2,0
CIRCLE2 0,0,A/100
CIRCLE2 A,0,A/100
CIRCLE2 A/2,0,A/100
LINE2 0,0,A,0
!Billboard Object rectangular Master Script
DEFINE TEXTURE 'biltexture' picture_file,
A,zzyzx,1,0
DEFINE MATERIAL 'bilmat' 24,
1,1,1,
0,61,IND(TEXTURE,'biltexture')
!Billboard Rectangular.gsm
!3D Script
!This one casts shadows correctly
!June 2004
PEN cont_pen
IF shad THEN SHADOW ON ELSE SHADOW OFF
MATERIAL bilmat
ROTx 90
POLY_ 5,
0,0,1,
A,0,1,
A,zzyzx,1,
0,zzyzx,1,
0,0,-1
BASE
VERT 0,0,0
VERT 0.1,0,0
VERT 0,0.1,0
VERT 0,0,0.1
COOR 258, -1,-2,-3,-4
BODY -1
DEL 1
Parameters – picture_file (abc), shad (Boolean) and cont_pen (Pen)
A and B and ZZYZX
--:David Nicholson-Cole GDLA:--
http://sustainabletallbuildings.blogspot.com
http://chargingtheearth.blogspot.com
http://sustainabletallbuildings.blogspot.com
http://chargingtheearth.blogspot.com
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-06-22 11:59 PM
‎2004-06-22
11:59 PM
or create a material (with the image as the texture) with the alpha mask as transparency
apply to zero thickness wall and adjust wall size and texture origin as reqd
shadows work fine with this
obviously this won't autorotate to the camera but it it would'nt be difficult to turn it into a gdl object that did
apply to zero thickness wall and adjust wall size and texture origin as reqd
shadows work fine with this
obviously this won't autorotate to the camera but it it would'nt be difficult to turn it into a gdl object that did