BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

Problems with GLOB_FRAME_NR

Anonymous
Not applicable
I am having a problem getting the results of using the GLOB_FRAME_NR parameter to show up in an animation. What I am trying to do is get lights to flash.

I have thoroughly checked the script and am sure that it is working properly. The light does go on and off according to the conditions I set. The animation process (Create Fly-Through) IS recalculating the model for each frame. (I checked this in the report window.) BUT...

The lights are modeled (on or off) according to the setting of the first frame in the animation and do not change after that. They should be flashing according to parameters I have set in the script. I have tried this in LightWorks and the internal engine with the same results. It seems that the recalculation (though reported) isn't actually having any effect on the parts.

I'm pretty sure I have done everything possible to make this work. So I am guessing I have run into some sort of bug, but just want to throw this out there in case there's something I'm missing. Or even if someone knows if this is a bug and of what sort.
20 REPLIES 20
Anonymous
Not applicable
Karl wrote:
I found my notes from 2001- the bug that DNC and I found in 7.0 is not relevant. It was that if 'rebuild' was checked, that each frame generated took longer and longer to render. So, the key was just to have "Rebuild Model for Each Frame" checked in the fly-through dialog.

Sample attached. (The fire had three lights that randomly varied their color and intensity within a warm range, as well as wobbled their directionality.)

Cheers,
Karl
I do have the rebuild for each frame option on in the fly-through settings. Are you saying there is another place to turn this on/off? Is there an enabling function within the part or something?

BTW guys, thanks for the movies and samples. I'll have to try to figure this out after I get past this deadline though. I prefer the known quantity of the workaround to the indefinite prospects of sorting it properly.


UPDATE: I have a break on the deadline (waiting for some info) so I am investigating now. Olivier's fan is working correctly on my machine so now I have to figure out where my script goes wrong. Thanks for the help. I'll post back once I sort it out.
Anonymous
Not applicable
I'm narrowing it down but still mystified. Olivier's fan works in a test file but not in my project file. Time for a clean merge I guess.

BTW: I am also getting a lot of crashing on this one. It seems to do with the camera tool. It crashes consistently if I try to undo a camera placement (I have to select and delete or it's a trip to the bug reporter). Perhaps this is related.

I just tried a new file with a copy paste from the project and it froze when I tried to save, I guess the next test is to see if my strobe will work in a clean file.
Anonymous
Not applicable
I GOT IT TO WORK!

Finally after weathering a few crashes and strange behaviors I have my animation going properly without ugly workarounds.

I haven't sorted out the details yet (and I'm not sure I will now that it's working) but making a new clean file and copy/pasting what I needed from the project has done the trick. The weird bit is that Olivier's fan/strobe test part did not work in my new clean file (nor the original) though it worked just fine in my prior tests in simple models. Fortunately my part is doing it's thing so I can go to bed happy.

Thanks again everyone.

Olivier, it was seeing your part work in my simple test that inspired me to go ahead and get this worked out. Thanks.
Anonymous
Not applicable
Well I got it to work...partly.

My strobe flashes properly but the flythrough will only go for 144 frames and then locks up. Sometimes it manages to report a memory error.

It seems there is a problem in the fluorescent fixture part I am using. The session report lists the following error 144 times after each perspective cut (strange numerology here eh?):

Invalid value of LightWorks parameter : LWA_LIGSSPOT_RADIUS (Referenced from : spot4)

There also happen to be exactly 144 fluorescent fixtures I have placed using the GS part:

Fluorescent Recessed 01 12

I am going to try changing the light cone settings to see if that helps.

EDIT: A simple change didn't work. Anybody have an idea? I really don't want to replace 144 light fixtures (assuming I can find one that works - I'm not excited about having to write one either).
Anonymous
Not applicable
Hi
I used to come by a similar problem when i was scripting some animated objects. (far easier to do in other rendering based software).

If you are just trying to render/indicate flashing, could you just use some sort of tube, that switches between two different materials ? (one with a luminance channel & one without)
Anonymous
Not applicable
sdb wrote:
Hi
I used to come by a similar problem when i was scripting some animated objects. (far easier to do in other rendering based software).

If you are just trying to render/indicate flashing, could you just use some sort of tube, that switches between two different materials ? (one with a luminance channel & one without)
What problems did you experience animating in ArtchiCAD? What software do recommend that is better for this? I have used Cinema 4D in the past but don't have a current license and it seemed like overkill for this (seemingly) simple animation.

The main purpose of the animation is to gat the flashing light to cast on the walls so it is turning the light source on and off that is the main point. The strobe part does also switch materials when it flashes but this is barely noticeable in the animation.

I am finally finishing the animation as I write this.

In the end the scripted animation DID NOT WORK. The flythrough still crashes after about 139 frames when the rebuild model option is turned on. Worse (if that is possible) is that the strobes work only sporadically. Some seem to flash reliably, others not at all and the rest work sporadically.

So right now I have one computer rendering the flythrough with no animation and using my laptop to make each set of 3 frames (1/8 sec at 24 fps) that need to have the flash on. For about a minute and a half of video this is about 90 manually initiated sequences. A major pain in the neck to do something that is supposed to be automatic.

I will definitely be filing a bug report once I'm finally done with this.
Anonymous
Not applicable
Hi Matthew,

Another long shot:

I recall that sometime ago I was experiencing some erratic geometry behavior in 3d animations...

To fix this (don't ask me why)... I put an environment global variable, like "var1 = GLOB_HSTORY_ELEV" inside the 3d script...

It looks like this "search" for an environment global variable keep the engine "wake up" during all the frames...

Again... Looonng shot...

HTH.
Anonymous
Not applicable
Hey Matthew,

It's just a thought, but to work around the GDL coding problem could you render the animation twice, one with the light permanently on, and one with the light off. If these were both output as individual frames, you could then recombine alternate frames in a movie editor and get the same effect.
Karl Ottenstein
Moderator
Peter wrote:
Hey Matthew,

It's just a thought, but to work around the GDL coding problem could you render the animation twice, one with the light permanently on, and one with the light off. If these were both output as individual frames, you could then recombine alternate frames in a movie editor and get the same effect.
Clever workaround idea, Peter! If the frame rate makes it too tedious to merge the individual frames (likely), this trick might make the merging easier, Matthew: generate a mask video in addition to the two that Peter mentions. Just using the internal engine (I'm guessing the memory leak is in LW), generate a video of just a surface that changes colors (white/black, whatever) representing the flickering speed. Place this video in between the other two tracks and set the appropriate color as a chroma key or mask to allow the video above (the illuminated one) to dominate.

Karl
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Peter wrote:
Hey Matthew,

It's just a thought, but to work around the GDL coding problem could you render the animation twice, one with the light permanently on, and one with the light off. If these were both output as individual frames, you could then recombine alternate frames in a movie editor and get the same effect.
This is what I ended up having to do. A serious pain in the neck but it's almost done.

BTW: Movie editor not needed. I'm just replacing the files in the finder. Very quick and simple. No masks nor twiddling with timelines needed.
Learn and get certified!