LDraw.org Discussion Forums
Animate building a model - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: Rendering Techniques (https://forums.ldraw.org/forum-20.html)
+--- Thread: Animate building a model (/thread-16668.html)



Animate building a model - Jaco van der Molen - 2015-06-17

Hi all,

What would be the right tool (if there is one) to animate the actual building of a model?
I am looking for something of a mix between LDD where you see a new brick flying in to snap to the right position and the movies by ArtiFex Creation (https://www.youtube.com/user/artifexcreation/videos)
Would this be possible with some LDraw tools?

I'm thinking simple rendering an image of each step and then animate each frame using some moviemaker program.
But then, each image of each step has to be the same width and height and the model (base) should be in a fixed position. How do I do that?

Thanks again all.

Jaco


Re: Animate building a model - Damien Roux - 2015-06-17

I think Pov Ray can do that.

Search "Tubafrog" on Youtube.


Re: Animate building a model - Jaco van der Molen - 2015-06-17

Oh wow. That is exactly what I was looking for.
The question is now: how do I do that? :-)


Re: Animate building a model - Roland Melkert - 2015-06-17

You could use my LDCad's scripting feature to animate the parts appearing. The simplest way (in a non mpd) is to just loop trough all references and show them based on time.

script (could not attach as .lua is not allowed)

Code:
function register()

  local ani=ldc.animation('build')
  ani:setLength(15)
  ani:setEvent('frame', 'onFrame')  
end

function onFrame()

  local ani=ldc.animation.getCurrent()
  local sf=ldc.subfile()
  local cnt=sf:getRefCount()
  local thres=ani:getFrameTime()/ani:getLength()*cnt
  
  for i=1,cnt do
    sf:getRef(i):setVisible(i<=thres)
  end
end

register()

Just copy it into a .lua file and place it alongside in the model's folder. Afterwords you link it using the header dialog.

If you want more advanced things happening like the pieces flying etc you'll need to get you hands dirty using some (matrix) math.

Downside: At the moment you can only export the OpenGL rendering, but I'm planning to add pov-ray export in 1.6


Re: Animate building a model - Jaco van der Molen - 2015-06-18

Thanks Roland. I've sent you a pm.