|  |  | after solving the last problem with your nice #switch i now have another
problem. I created a cameraspline using the spline.mcr but as already
mentioned in in another post, the look_at point moves with the movement of
the camera or even more worse, the camera looks in the moving direction.
But i need to have it focused to a single point. Or even better i would
like to create another spline for the look_at. Is it possible ? Sorry but
i'm still a noob in creating animations.
The path and the camera.
#declare Path = create_spline (
   array[10] {<   0,  0, 10>,
             < -10,  0,  0>,
             <   0, 10,  0>,
             <  10,  0,  0>,
             <   0,  0,-10>,
             < -10,  0,  0>,
             <   0,  0, 10>,
             <  10,  0,  0>,
             <   0,  0,-10>,
             < -10,  0,  0> },
   spline_loop (yes) + spline_tension (-1))
   preview_spline (Path, default_options)
#declare CAM_motion =   camera {right -4/3*x up y
                        angle 45.000000
                        location < 0.01, 0, 0 >
                        look_at <0,0,0>
                        animate_by_spline (Path, auto_banking (off))}
Thanks in advance, Shu.
Post a reply to this message
 |  | 
|  |  | "Manuel Mata" <man### [at] yahoo es> wrote:
> "sHURAKAI" <nomail@nomail> wrote:
> Just use spline keyword instead of spline macros. Create 2 splines one for
> path and other one for look_at and use them on the camera. If u want to
> focus to a single point use a simple vector for the var myLook_at.
>
> See ya.
>
>                    Manuel Mata Rueda
>                    http://es.geocities.com/manuel_mata_rueda
Hi Manuel,
and thanks for Your help. You were right, the macro was the problem. Now
it's working fine. :))))))).
I created a little scene with a camera spline for the movement and another
while-loop.
For all the people with the same probs here is a small scene-template (only
the object is missing, works fine with +kff100) :
#include "colors.inc"
global_settings { assumed_gamma 2.2
                  max_trace_level 50}
#declare CamPath = spline {natural_spline
                                       0.00,     <   0, 10,100>,//
                                       0.05,     <   0, 10, 80>,//
                                       0.10,     <   0,  8, 60>,//
                                       0.15,     <   0,  7, 50>,//
                                       0.20,     <   0,  6, 40>,//
                                       0.25,     <   0,  5, 30>,//
                                       0.30,     < -30,  5,  5>,//
                                       0.35,     < -20, 25,  0>,//
                                       0.40,     <   0, 30,  5>,//
                                       0.45,     <  20, 25,  0>,//
                                       0.50,     <  30,  5, -5>,//
                                       0.533,    <  25,  5,-25>,//
                                       0.566,    <   0,  5,-35>,//
                                       0.600,    < -25,  5,-25>,//
                                       0.633,    < -35,  5,  0>,//
                                       0.666,    < -25,  5, 25>,//
                                       0.700,    <   0,  5, 40>,//
                                       0.733,    <  35,  5, 35>,//
                                       0.766,    <  55,  5,  0>,//
                                       0.800,    <  40,  5,-40>,//
                                       0.833,    <   0,  5,-55>,//
                                       0.866,    < -40,  5,-40>,//
                                       0.900,    < -55,  5,  0>,//
                                       0.955,    < -40,  5, 30>,//
                                       1.000,    <   0,  4, 23>}//
#declare LookPath = spline {linear_spline
                                       0.00,     <-1.0,  0,  0>,//
                                       0.10,     <-0.8,  0,  0>,//
                                       0.20,     <-0.6,  0,  0>,//
                                       0.30,     <-0.4,  0,  0>,//
                                       0.40,     <-0.2,  0,  0>,//
                                       0.50,     < 0.0,  0,  0>,//
                                       0.60,     < 0.2,  0,  0>,//
                                       0.70,     < 0.4,  0,  0>,//
                                       0.80,     < 0.6,  0,  0>,//
                                       0.90,     < 0.8,  0,  0>,//
                                       1.00,     < 1.0,  0,  0>}//
#declare CAM_prev_z   = camera {right -4/3*x
                        location < 0.0, 5.0, 100.0 >
                        angle 45.000000
                        look_at < 0, 10, 0 >
                                }
#declare CAM_prev_y   = camera {right -4/3*x
                        location < 0.0, 200.0, 0.0 >
                        angle 75.000000
                        look_at < 0, 10, 0 >
                                }
#declare CAM_motion =   camera {right -4/3*x up y
                        angle 55.000000
                        location (CamPath(clock)+ < 0,3,0 >)
                        look_at (LookPath(clock))
                                }
camera{CAM_motion}
#declare Nr = 0;
 #declare EndNr = 1;
 #while (Nr< EndNr)
 sphere{ <0,0,0>,0.2
   texture{ pigment{color rgb <1-Nr/1.1,0+Nr/1.1,0>}
           finish {ambient 0.25 diffuse 0.85 phong 1}
                }
         translate CamPath(Nr)
       }
 #declare Nr = Nr + 0.002;  //
 #end
#declare Node = 0;
 #declare EndNode = 1;
 #while (Node< 0.5)
 sphere{ <0,0,0> 0.5
         texture{ pigment {color rgb <1,1,1>}
                 finish  {ambient 0.25 diffuse 0.85 phong 1}
                }
         translate CamPath(Node)
       }
#declare Node = Node + 0.05;
#end
#declare Node = 0.5;
 #declare EndNode = 1;
 #while (Node < EndNode)
 sphere{ <0,0,0> 0.5
         texture{ pigment {color rgb <1,1,1>}
                 finish  {ambient 0.25 diffuse 0.85 phong 1}
                }
         translate CamPath(Node)
       }
#declare Node = Node + 0.033;
#end
#declare Nr = 0;
 #declare EndNr = 1;
 #while (Nr< EndNr)
 sphere{ <0,0,0>, 0.2
   texture{ pigment{color rgb <1-Nr/2,0.75+Nr/4,0>}
           finish {ambient 0.25 diffuse 0.85 phong 1}
                }
         translate LookPath(Nr)
       }
 #declare Nr = Nr + 0.001;
 #end
light_source { <0,50,22> rgb<0.5,0.5,0.5> shadowless }
light_source { <-22.2,0,0>      rgb<0.5,0.5,0.5> shadowless }
light_source { <22.2,0,0>       rgb<0.5,0.5,0.5> shadowless }
light_source { <0, 50, 30> color rgb 0.5
               spotlight
               radius 1
               falloff 10
               tightness 1
               point_at <0,0,0>
             }
plane{<0,1,0>, 0
      texture{pigment{ color DarkSlateBlue } }
      translate< 0, -5, 0 >
     }
// Bye and have fun, Shu. Post a reply to this message
 |  |