To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10411
10410  |  10412
Subject: 
LDA2006 Progress Report
Newsgroups: 
lugnet.cad.ray, lugnet.animation, lugnet.cad.dev
Date: 
Fri, 24 Feb 2006 06:08:09 GMT
Viewed: 
1106 times
  
I've changed priorities once again. The need of what I call standalone scripts
have turned my todo-list upside-down. And the Tween command has made all the
difference! After working all night, I finally made it work. That is, the first
of the three kinds of standalone scripts I've planned for. But hopefully the
most complicated. The other two will just use commands that LDA already
supports. All I have to do is let the program jump into a new script and when
it's done, find its way back to the next line of the main script.

The idea is that the main script, here:"MyAn.txt", will call on another script
here:"mfWalk01.txt", every time the compiler shoots a frame. And after several
hours I have it to behave the way I've planned.

Here's the call from MyAn.txt:
Minifig01.Animation = MFWalk01.txt
(where Minifig01.Animation becomes a variable that is assigned the value
"MFWalk01.txt")

And this is the content of MFWalk01.txt:
; MFTimmy.txt
Self.FramesPerLoop = 20
Self.MoveZSelf = -4
Self.LeftArm.XRot.Tween Self.Progress 0 0.25 0 -40
Self.LeftArm.XRot.Tween Self.Progress 0.25 0.75 -40 40
Self.LeftArm.XRot.Tween Self.Progress 0.75 1 40 0
Self.RightArm.XRot.Tween Self.Progress 0 0.25 0 40
Self.RightArm.XRot.Tween Self.Progress 0.25 0.75 40 -40
Self.RightArm.XRot.Tween Self.Progress 0.75 1 -40 0
Self.LeftLeg.XRot.Tween Self.Progress 0 0.25 0 40
Self.LeftLeg.XRot.Tween Self.Progress 0.25 0.75 40 -40
Self.LeftLeg.XRot.Tween Self.Progress 0.75 1 -40 0
Self.RightLeg.XRot.Tween Self.Progress 0 0.25 0 -40
Self.RightLeg.XRot.Tween Self.Progress 0.25 0.75 -40 40
Self.RightLeg.XRot.Tween Self.Progress 0.75 1 40 0

The compiler replaces "Self" with the object name from the call, in this case
"Minifig01". Normally, XRot would be a variable, but in this case (XRot, YRot,
or ZRot) it is a command. And the rotation angle is tweened to a value depending
on where in the table the Progress value fits. This means that we are not forced
to follow a mathematic formula or have to get ourselves into hopelessly
complicated if-statements! And the animated objects have individual Progress
"clocks" that can be started and stopped independent of eachother at different
times (=frames). The format is not bound to minifigs either. At least it suits
my way of thinking much better than POV programming. A much more obvious
time-line. (I wish it was possible to make the syntax more LDraw-like, but five
years of thinking and re-thinking has proved it impossible.)

And the best thing of all: it works!


Before I release the new version, I have to re-work the built-in Minifig
generator, so the program is able to read standalone object definition files or
"change property" -  files.
The Create command will have company with a LoadFromFile command:
Minifig01.LoadFromFile Scene 1  0 -40 0  1 0 0  0 1 0  0 0 1  mfTimmy.txt
will replace (or rather, be an alternative to) these 10 lines:

Minifig01.Create Scene 1  0 -40 0  1 0 0  0 1 0  0 0 1  970.dat
Minifig01.Torso.Create Minifig01 4  0 -32 0  1 0 0  0 1 0  0 0 1  973.dat
Minifig01.Head.Create Minifig01.Torso 14  0 -24 0  1 0 0  0 1 0  0 0 1
3626bp01.dat
Minifig01.Hat.Create Minifig01.Head 0  0 0 0  1 0 0  0 1 0  0 0 1  3624.dat
Minifig01.LeftArm.Create Minifig01.Torso 16  15.55 8 0  0.9855 0.17 0  -0.17
0.9855 0  0 0 1  981.dat
Minifig01.LeftHand.Create Minifig01.LeftArm 14  5 18 -10  1 0 0  0 0.73 -0.64  0
0.64 0.73  983.dat
Minifig01.RightArm.Create Minifig01.Torso 16  -15.55 8 0  0.9855 -0.17 0  0.17
0.9855 0  0 0 1  982.dat
Minifig01.RightHand.Create Minifig01.RightArm 14  -5 18 -10  1 0 0  0 0.73 -0.64
0 0.64 0.73  983.dat
Minifig01.LeftLeg.Create Minifig01 16  0 12 0  1 0 0  0 1 0  0 0 1  972.dat
Minifig01.RightLeg.Create Minifig01 16  0 12 0  1 0 0  0 1 0  0 0 1  971.dat

This is so exciting! It won't be long until CGI based Brickfilms are very easy
to create - at least for those who know how use LDraw! I think it's almost a
revolution.


/Tore



Message has 1 Reply:
  Re: LDA2006 Progress Report
 
(...) --SNIP-- (...) --SNIP-- (...) This all sounds very cool Tore. I may have to give it a go sometime. One suggestion to you is to allow for different tweening systems. Sometimes you may want something other than a linear tweening and it would be (...) (19 years ago, 25-Feb-06, to lugnet.cad.ray, lugnet.animation, lugnet.cad.dev)

Message is in Reply To:
  Re: LDA2005 Progress Report
 
(...) October 2, 2005 Dear Diary, Most of this weekend, I've worked on the L3P Options panel instead of playing around with the program as planned. The new features make a much nicer output, so it has been worth the delay. Progress in my todo-list (...) (19 years ago, 2-Oct-05, to lugnet.cad.ray, lugnet.animation, lugnet.cad.dev)

18 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR