LDCad 1.6a Animation crash


LDCad 1.6a Animation crash
#1
Exclamation 
When I use Explode or Magnet Build script on attachment file, then i get a message:
Playback is too slow for 25 fps at an avg frame time of 222.56ms.

The question is how change FPS from LUA script ?!


Attached Files
.ldr   Mosaic.ldr (Size: 325.74 KB / Downloads: 9)
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a Animation crash
#2
(2018-03-11, 14:59)Jarema Wrote: When I use Explode or Magnet Build script on attachment file, then i get a message:
Playback is too slow for 25 fps at an avg frame time of 222.56ms.
It's a question of graphics board performance, size of LDCad window, complexity of model, etc.... You can try to reduce required frame rate to a lower value (open animation panel on main view top right, click on '25fps' and reduce that value). Note that for saving an animation this is not a problem since the images are not created in real time.

Or you can use setFPS in the script.

Nice mosaic BTW!
Reply
RE: LDCad 1.6a Animation crash
#3
Thanks for help.
Another question is: How move parts from sub-model to main-model when "Ungroup all" is not work at all ? Then delete empty sub-model.
Some scripts do not work properly without this. I need GUI and LUA behavior.
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a Animation crash
#4
(2018-03-11, 14:59)Jarema Wrote: When I use Explode or Magnet Build script on attachment file, then i get a message:
Playback is too slow for 25 fps at an avg frame time of 222.56ms.

The question is how change FPS from LUA script ?!

Like Philo wrote,

It is not crashing but at some point their are too many bricks for the program to manipulate/reprep/render 25 times a second.

The bottle neck is probably not the graphics card, any semi recent card should be able to handle 8000 bricks.

The script execution is usually also below 1ms even for the biggest scripts.

The problem lies in the render prepping which is needed whenever a bricks position and or visibility changes.
This is CPU based work and uses only a single thread.
It will be even worse if the model contains many transparent parts.

If you want to view the animation regardless, You can do an OpenGL export (alt+e) at any fps and combine the images with ffmpegenc or something.
Reply
LDCad 1.6a Animation developer diary
#5
Currently, the script for LDCad can do such a thing: Click to watch . The chassis and the green brick are from the first step. I gave two wheels for one step.
Main script use static.lua for grounded elements - like baseplate - and horizontal.lua to know what direction obtain when moving part -- like wheel.
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a Animation developer diary
#6
(2018-03-11, 21:44)Jarema Wrote: Currently, the script for LDCad can do such a thing: Click to watch . The chassis and the green brick are from the first step. I gave two wheels for one step.
Main script use static.lua for grounded elements - like baseplate - and horizontal.lua to know what direction obtain when moving part -- like wheel.

Looks promising maybe add sorting (in the start event) on y and x distance to zero to force a logical order?
Reply
RE: LDCad 1.6a Animation crash
#7
Exclamation 
How extract informations about sub-model parts via LUA Script ? Because animate sub-model as one object break animation.
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a Animation crash
#8
(2018-03-12, 10:55)Jarema Wrote: How extract informations about sub-model parts via LUA Script ? Because animate sub-model as one object break animation.

You can follow the references recursively trough someRef:getSubfile(), someSubfile:getRefCount(), someSubFile:getRef(index).

But the matrices/positions inside that will be relative, so you need to multiply with the higher ref's matrix.

Alternative is to use groups as they automatically manage absolute matrices.

This will only go as expected for single used submodels though.
Reply
RE: LDCad 1.6a Animation crash
#9
(2018-03-11, 19:28)Roland Melkert Wrote: Like Philo wrote,

It is not crashing but at some point their are too many bricks for the program to manipulate/reprep/render 25 times a second.

The bottle neck is probably not the graphics card, any semi recent card should be able to handle 8000 bricks.

The script execution is usually also below 1ms even for the biggest scripts.

I recently suffered from the same problem. When I set the fps to e.g. 60 and press play ldcad freezes and after a minute or so it returns responding but w/o starting the animation and w/o further notification.

I ran already similar animations and part numbers with 60fps on the same computer and it worked. But what I found out is that the pneumatic hoses do have a significant influence on the max fps.
Reply
RE: LDCad 1.6a Animation crash
#10
(2019-01-06, 13:36)Joscha Wrote: I recently suffered from the same problem. When I set the fps to e.g. 60 and press play ldcad freezes and after a minute or so it returns responding but w/o starting the animation and w/o further notification.

I ran already similar animations and part numbers with 60fps on the same computer and it worked. But what I found out is that the pneumatic hoses do have a significant influence on the max fps.
Are you animating things connected to the hose? If so it will need to regenerate the whole hose every frame, depending on the length and complexity of it this will be a major bottle neck as it is done single threaded.

If the hose doesn't change it should not regenerate, if it does anyway this could indicate a bug. Could you send me the model in that case so I can investigate.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)