POV-Ray : Newsgroups : povray.newusers : Light Cycle animation questions... Server Time
30 Jul 2024 18:19:41 EDT (-0400)
  Light Cycle animation questions... (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 18 Feb 2004 11:29:39
Message: <403392f3@news.povray.org>
> You might be thinking too hard and overlooking the simplicity of it.

Probably...

> The splines have all three axes. Or I'm not thinking hard enough.
> Maybe you're needing a way to create the path based on what
> the room shape is and obstacles in it? If so, then 'trace' is
> probably the answer. That could be applied to sense surroundings,
> but it can slow up animations.

No... I'm more thinking along the lines of having no room, no floors,
no walls.  Do you have the "3D Pipes" screen saver that comes with
Windows.  Run that with the settings of
Pipes: Multiple
Pipe Style: Traditional
Joint Type: Elbow
Surface Style: Solid
And it will show you the effect I'm trying to get.  Now stick a
"Light Flyer" in front of each Pipe that's creating the trail behind
it much like the Light Cycles do.

If one follows this path:
<0,0,0> to <1,0,0> to <1,1,0>   the "Light Flyer" is going up
                                                  into the y-direction

And have another follow this path:
<0,0,0> to <0,0,1> to <0,1,1>  this "Light Flyer" is now also
                                                 hearded up into the
y-direction.

If the observer is standing at <0,0,-10> he'll see the side of
the first "Light Flyer" and the top of the second.  So I need to
know more then just which direction they are headed in.  At
the start of each path I want each "Light Flyer" parked with
its top pointed in the y-direction but after it makes a few turns
I'm not sure how to tell POV-Ray where up is any longer.

For the above two examples:
At the end of path 1 I need to know: forward = y up = -x
At the end of path 2 I need to know: forward = y up = -z

However all this at the moment is overshadowed by the
problem that I can't even animate the trails forming.

> I had figured you would be plotting out the path yourself
> though, in advance.

Yes... I will be.

> If that were the case, all you'd do is set the vectors to
> include each value, i.e. <0,0,0> to <1,0,0> to <1,1,0>
> moves forward (+x) then stays at x*1 but moves up y*1.

I follow that... and as long as I'm just flying a sphere around
the screen that will work.  Now I want the sphere to leave a
trail and I want to give the sphere a shape that will need to
be properly positioned at the head of the trail.

Am I defining the problem clearly?

Carl


Post a reply to this message

From: Hughes, B 
Subject: Re: Light Cycle animation questions...
Date: 19 Feb 2004 01:22:37
Message: <4034562d@news.povray.org>
"Carl Hoff" <hof### [at] wtnet> wrote in message news:403392f3@news.povray.org...
> >
> > Maybe you're needing a way to create the path based on what
> > the room shape is and obstacles in it?
>
> No... I'm more thinking along the lines of having no room, no floors,
> no walls.  Do you have the "3D Pipes" screen saver that comes with
> Windows.

Yep. I understand. With trails being only a segment of a pipe, longer or
shorter based on speed I presume.

> the start of each path I want each "Light Flyer" parked with
> its top pointed in the y-direction but after it makes a few turns
> I'm not sure how to tell POV-Ray where up is any longer.
>
> At the end of path 1 I need to know: forward = y up = -x
> At the end of path 2 I need to know: forward = y up = -z
>
> However all this at the moment is overshadowed by the
> problem that I can't even animate the trails forming.
>
> Am I defining the problem clearly?

As a bell... I'm just not thinking good this time of night. And I'm
beginning to think this thread ought to move on to the general or
advanced-users group.

A motion spline and sphere_sweep can definitely be done, unchanging in
number of points but changing vectors so that it moves away from its last
position and stretching in a manner consistent with speed. What I hadn't
considered before is that you're intending to orient the objects in more
than one plane so that the objects will have varying ups. But that shouldn't
matter really. Hmmmm, before I forget what I'm saying I'll write it out in
SDL form to make more sense of it.

spline {
    linear_spline
    5,
    t1,<x1,y1,z1>,
    t2,<x2,y2,z2>,
    t3,<x3,y3,z3>,
    t4,<x4,y4,z4>,
    t5,<x5,y5,z5>
}

So the variables would need to range farther apart as time goes by. Say all
start at zero, next the 1's remain at zero but each of the others increase,
with other t's always being of higher value than the previous. The xyz 2's
through 5's would need to increase toward their intended paths while
shifting from the 5's back toward the 1's as time goes along.

Just wish I were thinking more clearly to figure what would be the best way
to do that.

Bob H.


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 19 Feb 2004 09:29:18
Message: <4034c83e@news.povray.org>
> Yep. I understand. With trails being only a segment of a pipe,
> longer or shorter based on speed I presume.

Each trail will be a linear spline if that's what you mean by
segment of pipe.  Its more then just the last cylinder on the
spline.  For now I'm assuming all the 'flyers' have a fixed
constant speed.  So if all started at the same time they would
all have the same total length.  The number of bends would
depend on the path they took.  The length of the individual
cylinders (what I think you may mean by segment) only
depends on the path chosen, not speed.  At some point I'll
play with giving the 'flyers' variable speed but I don't expect
that to be too hard once I've got the constant speed problem
fixed.

> As a bell... I'm just not thinking good this time of night. And
> I'm beginning to think this thread ought to move on to the
> general or advanced-users group.

Ok... Let me think of the best way to state this problem and
I'll make a post in the general group.  Its just that I consider
myself very new to this and I didn't think this problem was
as hard as I was making it.  Maybe it is.

> A motion spline and sphere_sweep can definitely be done,
> unchanging in number of points but changing vectors so that
> it moves away from its last position and stretching in a
> manner consistent with speed.

Yes... that's what I want.

> What I hadn't considered before is that you're intending to
> orient the objects in more than one plane so that the objects
> will have varying ups.

I'll be doing both.  I want to do some clasic Light Cycle
animations where they will be leaving trails on a 2D grid.
In those cases up will always be +y.  But I also want to
play with light flyers on a 3D game grid.  So I want to
solve the more general problem.

> But that shouldn't matter really. Hmmmm, before I forget
> what I'm saying I'll write it out in SDL form to make more
> sense of it.
>
> spline {
>     linear_spline
>     5,
>     t1,<x1,y1,z1>,
>     t2,<x2,y2,z2>,
>     t3,<x3,y3,z3>,
>     t4,<x4,y4,z4>,
>     t5,<x5,y5,z5>
> }

Yes... something like this:

spline {
  linear_spline
  5,
  0.0, <0,0,0>
  0.1, <0,0,1>
  0.3, <2,0,1>
  0.6, <2,3,1>
  1.0, <2,3,5>
}

Note:  its easy enough to choose the times and the segment
lengths such that the flyer will have a constant speed.

> So the variables would need to range farther apart as time
> goes by. Say all start at zero, next the 1's remain at zero but
> each of the others increase, with other t's always being of
> higher value than the previous. The xyz 2's through 5's
> would need to increase toward their intended paths while
> shifting from the 5's back toward the 1's as time goes along.

Ok... you lost me.  The path doesn't need to stop where it
started.  And the location of the bends is fixed.  And I assume
its ok to assume they'll all start at zero.  When I animate more
then one 'light flyer' though the paths should never cross so
they will be starting at different points.  The paths can be
chosen manually to assure they don't cross though.  To somehow
automate the process of path generation is more work then
I wanted to put into this.  It would be nice to be able to pull a
few paths out of the "3D Pipes" screen saver as that is the
effect I'm trying to copy but I can make my own.

> Just wish I were thinking more clearly to figure what would be
> the best way to do that.

Oh I've got some of my own ideas.  For the above 5 segment
path I could have 5 different sphere sweeps.  The first could look
like this:

sphere_sweep {
  linear_spline
  2,
  <0,0,0>
  <0,0,clock*10>

And have alot of If statements such the the above was only
used between 0 and 0.1 clock values.

But I want a macro that I can feed a series of points to and
have it do all that for me.  The above way would be a very
manual process that would have to be redone for each
different path.  I'm thinking surely there has to be a better
way.  Say I define the spline as path_1.  I'd like to be able
to do:

sphere_sweep {
   clock/1 of path_1

So when the clock has a value of 0.5 I'll get just the first
half of path_1.  After that's solved I need to be able to define
up as a function of clock.  Forward I see how to do.

Thanks,
Carl


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 19 Feb 2004 09:54:18
Message: <4034ce1a@news.povray.org>
> As a bell... I'm just not thinking good this time of night. And I'm
> beginning to think this thread ought to move on to the general or
> advanced-users group.

See the thread I just started called "Spline animation question..."
in the general group.  I hope I've defined the problem concisely
and clearly over there.  I think I fell a little short of that goal here.

Thanks again for all the help,
Carl


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 22 Feb 2004 00:42:12
Message: <40384134$1@news.povray.org>
> > Am I defining the problem clearly?
>
> As a bell...

Ok... I've found a solution to both of my problems.  I've posted code that
does what I want it to over in povray.binaries.scene-files.  Please feel
free to take a look.  Two other problems that I came across in this
situation were:

(1) The same issue bongotastic had with splines of variable length.  In my
code if I change the number of points in my spline I have to change
path1_num, the array path1, and edit my path1_spline declaration.  It really
seems I should be able to do this in a general way and not have to change
the path1_spline declaration but I couldn't find a way to do it.

(2) It proved to be harder then I thought to position an object that's
defined with forward in the x-direction and up in the y-direction to a new
set of forward and up vectors.  I got something that works but I think I did
it in a very ugly way.  Surely there is a more general way of doing this.

Anyways please feel to play with the code I posted and I welcome any
constructive feedback anyone wants to share.

Thanks,
Carl


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 22 Feb 2004 09:14:22
Message: <4038b93e$1@news.povray.org>
> (1) The same issue bongotastic had with splines of variable length.
> In my code if I change the number of points in my spline I have to
> change path1_num, the array path1, and edit my path1_spline
> declaration.  It really seems I should be able to do this in a general
> way and not have to change the path1_spline declaration but I
> couldn't find a way to do it.

This problem is fixed with the help of bongotastic's thread in
povray.newusers.

#declare path1_spline = spline {
  linear_spline
  #declare ctr = 0;
  #while (ctr < path1_num - 0.5)
    path1_seg_time[ctr], path1[ctr][0],
    #declare ctr = ctr + 1;
  #end
}

> (2) It proved to be harder then I thought to position an object that's
> defined with forward in the x-direction and up in the y-direction to a
> new set of forward and up vectors.  I got something that works but
> I think I did it in a very ugly way.  Surely there is a more general
> way of doing this.

Still thinking about this one.

Carl


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.