Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

mistake in last post

Rajesh Patil
Expert
am sorry for my last post of "parameterized library parts" . Actually i was interested to know about the meaning of the sentence written in fly-through dialog "Rebuilt model for each frame, use only if any library part is parameterized to change with frame number". I was unable to get the frame number feature in any library parts parameters, hence still confused, so kindly give me a proper guidelines for the same.
Rajesh Patil
AC 09-27 | INT | WIN11 64
Dell Inspiron 7591, Core i9, 9880H 2.30GHz, 16.0GB, NVidia GeForce GTX1650, 4.0GB, SSD Internal 500GB, Dell SSD External 250GB
6 REPLIES 6
Frank Beister
Advisor
Parametric (nearly all) objects can react in their shape or behaviour on the frame position in the moment of generating a fly through. For this they need to be executed before the calculation of each (!) frame. This needs a rebuilt of the complete 3D model in each frame position. This slows down calculation dramatic. If you haven't such objects (normally) you can deactivate the checkbox to built once (at the beginning) the 3D model.

Here you find a movie completely rendered in AC without postproduction.
http://www.opengdl.org/gdl-de/obj00009.htm
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Rajesh Patil
Expert
sir,
thnx for your reply. but still i need some more help about making the door or window to be get open as i create a fly-through via AC9, i.e. say if my camera1 to camera2 have 20 frames how can i use those frames to show door opening effect from 0 to 90deg. If you know any document in "english" kingly give me the URL for same. I did tried with www.opengdl.org but the site is not opening in english though i pick on "english" option on top-left of same window. egarly waiting for your reply.
Rajesh Patil
AC 09-27 | INT | WIN11 64
Dell Inspiron 7591, Core i9, 9880H 2.30GHz, 16.0GB, NVidia GeForce GTX1650, 4.0GB, SSD Internal 500GB, Dell SSD External 250GB
TomWaltz
Participant
I have only seen a small number of library parts ever use this feature. I'm not sure that I have ever seen any in the Archicad library itself. Offhand, the only ones I can think of are the 3rd-party Smart Parts kit of objects.
Tom Waltz
Frank Beister
Advisor
You could use TheAnt from opengdl.org. Unfortunatly I searched in the German user community for people sharing their code. So the English button does work only on tentmaker page. The selfgdl-project took most of my "free" resources the last two years, so opengdl.org has not got my focus. In the view of the obejct depository, I will change now the intention of this site to be a workbench for gdl developers á la sourceforge.net. But this will take a few time, but then will be in (broken) English. 😉

I did not understand, that you really want to program a dynamic object. As Tom said, there are no(t much) objects, which use this feature. You will have to add this to an existing door, if you are not able not use TheAnt. It is not as heavy as it sounds, but you should have a tiny scripting, better GDL experience. Which door do you want to change? If it is not in the int. library, send it to me I will have a look on it. OK?
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Djordje
Ace
The Porsche 911 that used to be free on ObjectsOnLine long time ago had the moving script built in.

It is attached here ... keep in mind that it was written for ArchiCAD 6.o
Djordje



ArchiCAD since 4.55 ... 1995
HP Omen
Laszlo Nagy
Community Admin
Community Admin
I can tell you the method of doing it, but I do not have the time to actually do it for you.

There are GDL Global variables that Library Objects can use to obtain info about the state of the Project or elements in it.
One such variable is the GLOB_FRAME_NR variable. Here is is description:

http://archicadwiki.com/Global_GDL_Parameters#head-79c77ce70e2254718bd7c757968c9ccaad640986

You need to use this read-only variable in the 3D Script of your Door object to ask from Archicad what Frame of the Animation it is currently creating. It will give you an integer number.

In most Door Objects, among the Parameters, under the 3D Representation category, you will find one called 'Opening Angle in 3D'.
You must modify your 3D Script so that the GDL variable 'gs_open_3D' changes depending on the value of the Frame.

I would use 4 new variable. You will need to create these new parameters for the Door object:

1. StartFrame - this will be the Frame of the Animation at which the Door will start to open from its Starting Opening Angle value.
2. EndFrame - this will be the Frame of the Animation at which the Door will reach its End Opening Angle value.
3. StartAngle - the Angle at which the Door is open when it starts opening.
4. EndAngle - the Angle at which the Door stops opening.

Then you would have a the following formula:

FrameNumber=EndFrame-StartFrame
CurrentFrame=GLOB_FRAME_NR-StartFrame
gs_open_3D=StartAngle+CurrentFrame*(EndAngle-StartAngle)/FrameNumber

Example: You want aDoor in your Project to start opening from and Angle of 30 degrees at Frame 150 and reach its final opening angle of 120 degrees at Frame 170.
In this case:
StartFrame=150
EndFrame=170
StartAngle=30
EndAngle=120

At Frame 150 (GLOB_FRAME_NR=150):
gs_open_3D=30+0*(120-30)/20=30+0*4.5=30

At Frame 158 (GLOB_FRAME_NR=158):
gs_open_3D=30+8*(120-20)/20=30+8*5=70

At Frame 170 (GLOB_FRAME_NR=170):
gs_open_3D=30+20*(120-30)/20=30+20*4.5=120

You might also want to create a boolean toggle so this whole thing is executed only when this toggle is set to ON (when you want to use it).

You can place this in either in the Master Script or the beginning of the 3D Script of the Door object.
I hope you can make it work.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27