To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.rayOpen lugnet.cad.ray in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Ray-Tracing / 999
998  |  1000
Subject: 
Re: LDA2001 and batch .pov file creation
Newsgroups: 
lugnet.cad.ray
Date: 
Sun, 30 Sep 2001 16:20:27 GMT
Viewed: 
880 times
  
Tore Eriksson wrote...
Best thing however would be if there was a way of having camera instructions
inside the frame .DAT files overriding the defaults as is for lights. Like:
  0 CAMERA POSITION -1500 -72 -400
  0 CAMERA LOOK_AT -1420 -120 -200
  0 CAMERA ANGLE 62
I know this has been discussed but I don't think something came out of it(?)

Yes, it has been discussed before, and No, nothing came out of it...
I would prefer something like
0 L3P OPTIONS -cc-1500,-72,-400 -cla-1420,-120,-200 -ca62

Also, is it possible to trick L3P to make an include statement in the
beginning of the output file?
Something like:
  0 IF POV
  0 #include "hills.pov"
  0 END POV
(Sorry, I haven't studied the ifpov syntax yet...)

0 FILE model.dat
0 L3P IFPOV
0 #include "hills.pov"
0 L3P ENDPOV

If placed at beginning of DAT file, the include statement will be placed in the beginning
of the model object description:

#declare model_dot_dat = union {
// FILE model.dat
// L3P IFPOV
#if (1)
#include "hills.pov"
// L3P ENDPOV
#end
   object {
...

which is probably not what you want.
I guess a new option is necessary, e.g. -ihills.pov

If I turn to Option 2, I have to translate all animation instructions. With
linear movement or rotation, that would probably be no big problems, but
what about walking for example?
The MFWalk 40 is something like this:
      // Check for MFWalk
      // (sss is stringed version of an object's ID
      // (eg 'Minifig01')
      // GetRAM returns '<none>' if object has no MFWalk property
      if GetRAM(sss+'.MFWalk', '<none>') = '40' then
      begin
        MovePerFrame := StrToFloat(GetRAM(sss+'.MovePerFrame', '0'));
        FramesPerLoop := StrToFloat(GetRAM(sss+'.FramesPerLoop', '30'));
        FrameI := StrToInt(GetRAM(sss+'.FrameI', '0')) + 1;
        PutRAM(sss+'.FrameI', IntToStr(FrameI));
        Progress := FrameI / FramesPerLoop;
        if Progress > 0.25 then ii := 1 else ii := 0;
        if Progress > 0.75 then ii := 2;
        case ii of
          0: v := 2.7925 * Progress;
          1: v := 1.3963 - 2.7925 * Progress;
          2: v := -2.7925 + 2.7925 * Progress;
        end;
        // v is now angle (in radians) of left arm and right leg
        // v*-1 is angle of right arm and left leg
        // rest of code is snipped
      end;
      // END of Check for MFWalk
Now how do you do similar stuff in POV code?

   #declare FrameI = FrameI + 1;
   #declare Progress = FrameI / FramesPerLoop;
   #switch (Progress)
   #range (0, 0.25)
      #declare v = 2.7925 * Progress;
      #break
   #range (0.25, 0.75)
      #declare v = 1.3963 - 2.7925 * Progress;
      #break
   #else
      #declare v = -2.7925 + 2.7925 * Progress;
   #end
   // v is now angle (in radians) of left arm and right leg

/Lars



Message has 2 Replies:
  Re: LDA2001 and batch .pov file creation
 
Thanks for your quick response, Lars. (...) That would be perfectly ok for me. The lines I outlined could maybe be of more generic use in other applications, but that's not important. At least not for me, now. As I understand it, L3P is your program (...) (23 years ago, 30-Sep-01, to lugnet.cad.ray)
  Re: LDA2001 and batch .pov file creation  [DAT]
 
(...) ...but it gives me another idea: 0 Anim03 0 Author: Tore Eriksson 1 7 0 0 0 1 0 0 0 1 0 0 0 1 700.dat 0 L3P IFPOV 0 #if (clock=0.0) 1 2 80 -28 -70 1 0 0 0 1 0 0 0 1 3001.dat 0 #end 0 #if (clock=0.05) 1 2 100 -28 -70 1 0 0 0 1 0 0 0 1 3001.dat (...) (23 years ago, 24-Oct-01, to lugnet.cad.ray)

Message is in Reply To:
  LDA2001 and batch .pov file creation
 
I had almost done writing a long reply on this thread when a very aggressive spyware/adware triggered a large number of popup-ads that eventually crashed my system. I think it was one of Kazaa's nasty companion programs. No more Kazaa for me! This (...) (23 years ago, 30-Sep-01, to lugnet.cad.ray)

12 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