POV-Ray : Newsgroups : moray.win : Mesh coordinates and animation Server Time
28 Mar 2024 06:14:35 EDT (-0400)
  Mesh coordinates and animation (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: Mesh coordinates and animation
Date: 5 May 2009 17:30:00
Message: <web.4a00afb3c4c8e8b85dd6915e0@news.povray.org>
"Kzerphii Toomk" <kze### [at] orangefr> wrote:
> Is it possible to change coordinates of a mesh (or mesh 2) during an
> animation...?
>
> I'd like give life to meshes but XYZ resize is not enough... :))

Theoretically you can't change *anything* during an animation - you just write
the scene so that it produces different geometry for each frame, whether it is
a sphere, CSG, mesh or whatever; but I guess that's not the answer you were
after ;)

So a more practical reply to your question is "No, that's not possible - unless
you're auto-generating the mesh using SDL".


Post a reply to this message

From: Reactor
Subject: Re: Mesh coordinates and animation
Date: 5 May 2009 20:05:00
Message: <web.4a00d3b0c4c8e8b8bb1c7af80@news.povray.org>
"clipka" <nomail@nomail> wrote:
> "Kzerphii Toomk" <kze### [at] orangefr> wrote:
> > Is it possible to change coordinates of a mesh (or mesh 2) during an
> > animation...?
> >
> > I'd like give life to meshes but XYZ resize is not enough... :))
>
> Theoretically you can't change *anything* during an animation - you just write
> the scene so that it produces different geometry for each frame, whether it is
> a sphere, CSG, mesh or whatever; but I guess that's not the answer you were
> after ;)
>
> So a more practical reply to your question is "No, that's not possible - unless
> you're auto-generating the mesh using SDL".



The mesh needn't be auto-generated, I've been tinkering with a script that would
permit the use of control points that would allow an existing mesh to undergo
various transformations.  The idea was to allow the user to specify a control
point or groups of points, specify their effect radius, and specify a
transformation for each.  The points within the radius would be transformed,
taking into account the effect of distance from that control point and other
control points.

Simple testing indicates that it would be troublesome from a parsing standpoint,
since to do this it requires that every affected point in the mesh definition be
replaced with an expression that yields the modified vector.  I've been meaning
to finish writing C program that will insert the expressions, which will make
animating my wings models easier, but I haven't gotten around to it yet.

I do want to stress that it is very possible to animate a mesh2 in POV - so far
I've only used the divide and conquer method, but what I described above will
also work.


-Reactor


Post a reply to this message

From: clipka
Subject: Re: Mesh coordinates and animation
Date: 6 May 2009 06:40:01
Message: <web.4a0168bcc4c8e8b853a485b50@news.povray.org>
"Reactor" <rea### [at] hotmailcom> wrote:
> "clipka" <nomail@nomail> wrote:
> > So a more practical reply to your question is "No, that's not possible - unless
> > you're auto-generating the mesh using SDL".
>
> The mesh needn't be auto-generated, I've been tinkering with a script that would
> permit the use of control points that would allow an existing mesh to undergo
> various transformations.  The idea was to allow the user to specify a control
> point or groups of points, specify their effect radius, and specify a
> transformation for each.  The points within the radius would be transformed,
> taking into account the effect of distance from that control point and other
> control points.

Um... if I understand you correctly, you're then still auto-generating the mesh,
even though you wouldn't be using SDL but an external tool.


Post a reply to this message

From: Reactor
Subject: Re: Mesh coordinates and animation
Date: 7 May 2009 01:00:01
Message: <web.4a026a31c4c8e8b828ee5ba70@news.povray.org>
"clipka" <nomail@nomail> wrote:
> "Reactor" <rea### [at] hotmailcom> wrote:
> > "clipka" <nomail@nomail> wrote:
> > > So a more practical reply to your question is "No, that's not possible - unless
> > > you're auto-generating the mesh using SDL".
> >
> > The mesh needn't be auto-generated, I've been tinkering with a script that would
> > permit the use of control points that would allow an existing mesh to undergo
> > various transformations.  The idea was to allow the user to specify a control
> > point or groups of points, specify their effect radius, and specify a
> > transformation for each.  The points within the radius would be transformed,
> > taking into account the effect of distance from that control point and other
> > control points.
>
> Um... if I understand you correctly, you're then still auto-generating the mesh,
> even though you wouldn't be using SDL but an external tool.



I'm not sure if I understand your meaning completely - when you say 'generating'
I tend to think of it as producing the coordinates for the mesh, whereas the
script is intended to read any pre-existing valid mesh2.  That said, the
transformation of the points are produced within SDL in response to the clock
variable or the user's desire.

That is to say, the external tool would modify the mesh2 declaration, for
example changing vector literals in the vertex_vector list into expressions
that produce a displaced vector with respect to clock (or whatever else the
users specifies).


-Reactor


Post a reply to this message

From: clipka
Subject: Re: Mesh coordinates and animation
Date: 7 May 2009 08:55:01
Message: <web.4a02da03c4c8e8b8f708085d0@news.povray.org>
"Reactor" <rea### [at] hotmailcom> wrote:
> I'm not sure if I understand your meaning completely - when you say 'generating'
> I tend to think of it as producing the coordinates for the mesh, whereas the
> script is intended to read any pre-existing valid mesh2.  That said, the
> transformation of the points are produced within SDL in response to the clock
> variable or the user's desire.
>
> That is to say, the external tool would modify the mesh2 declaration, for
> example changing vector literals in the vertex_vector list into expressions
> that produce a displaced vector with respect to clock (or whatever else the
> users specifies).

Yes, that's of course possible.

I'd consider this "auto-generating", which I'd define as "computing the actual
mesh vertices at script parse time [or earlier]".

Or, rather, even "meta-auto-generating", as you'd be auto-generating the code to
auto-generate the mesh vertices ;)


Post a reply to this message

From: Reactor
Subject: Re: Mesh coordinates and animation
Date: 7 May 2009 19:35:00
Message: <web.4a036f5dc4c8e8b88ffa93e60@news.povray.org>
"clipka" <nomail@nomail> wrote:

> Yes, that's of course possible.
>
> I'd consider this "auto-generating", which I'd define as "computing the actual
> mesh vertices at script parse time [or earlier]".
>
> Or, rather, even "meta-auto-generating", as you'd be auto-generating the code to
> auto-generate the mesh vertices ;)


Yep, that's how it'll work... eventually. <sigh>  The math part should be easy
to bake, but I've very little experience at writing robust parsing code, so
it'll be a learning experience.


-Reactor


Post a reply to this message

From: Stephen
Subject: Re: Mesh coordinates and animation
Date: 9 May 2009 19:45:49
Message: <ja5c059vn7i8pt41nvph685oao4870p97d@4ax.com>
On Tue, 5 May 2009 12:54:16 +0200, "Kzerphii Toomk" <kze### [at] orangefr> wrote:

>Is it possible to change coordinates of a mesh (or mesh 2) during an 
>animation...?
>
>I'd like give life to meshes but XYZ resize is not enough... :))
>
>Thanks for answers.


Hi Kzerphii,
	I don't think that there is. You can animate the mesh in an animation if
you pre-animate a series of meshes and then include them one at a time during
the rendering. IIRC as I did not use the animation feature of Moray very much,
try using the include plugin and call the meshes with something like;

#include concat("E:\\Graphics\\Scenes
\\My_mesh_",str(mod(frame_number,89),-4,0),".inc")

PS the "My_mesh_",str(mod(frame_number,89),-4,0),".inc")" includes a mesh
numbered 0 to 89.inc in a cyclic fashion. Like My_mesh_0.inc

-- 

Regards
     Stephen


Post a reply to this message

From: Kzerphii Toomk
Subject: Re: Mesh coordinates and animation
Date: 12 May 2009 17:24:36
Message: <4a09e914$1@news.povray.org>
Thanks for these answers... :)


web.4a036f5dc4c8e8b88ffa93e60@news.povray.org...
> "clipka" <nomail@nomail> wrote:
>
>> Yes, that's of course possible.
>>
>> I'd consider this "auto-generating", which I'd define as "computing the 
>> actual
>> mesh vertices at script parse time [or earlier]".
>>
>> Or, rather, even "meta-auto-generating", as you'd be auto-generating the 
>> code to
>> auto-generate the mesh vertices ;)
>
>
> Yep, that's how it'll work... eventually. <sigh>  The math part should be 
> easy
> to bake, but I've very little experience at writing robust parsing code, 
> so
> it'll be a learning experience.
>
>
> -Reactor
>
>


Post a reply to this message

From: Kzerphii Toomk
Subject: Re: Mesh coordinates and animation
Date: 12 May 2009 17:24:37
Message: <4a09e915@news.povray.org>
Wow, thanks for this answer. I will try to do it.


ja5c059vn7i8pt41nvph685oao4870p97d@4ax.com...
> On Tue, 5 May 2009 12:54:16 +0200, "Kzerphii Toomk" <kze### [at] orangefr> 
> wrote:
>
>>Is it possible to change coordinates of a mesh (or mesh 2) during an
>>animation...?
>>
>>I'd like give life to meshes but XYZ resize is not enough... :))
>>
>>Thanks for answers.
>
>
> Hi Kzerphii,
> I don't think that there is. You can animate the mesh in an animation if
> you pre-animate a series of meshes and then include them one at a time 
> during
> the rendering. IIRC as I did not use the animation feature of Moray very 
> much,
> try using the include plugin and call the meshes with something like;
>
> #include concat("E:\\Graphics\\Scenes
> \\My_mesh_",str(mod(frame_number,89),-4,0),".inc")
>
> PS the "My_mesh_",str(mod(frame_number,89),-4,0),".inc")" includes a mesh
> numbered 0 to 89.inc in a cyclic fashion. Like My_mesh_0.inc
>
> -- 
>
> Regards
>     Stephen


Post a reply to this message

From: Stephen
Subject: Re: Mesh coordinates and animation
Date: 13 May 2009 07:15:01
Message: <web.4a0aaadac4c8e8b85fd99d9e0@news.povray.org>
"Kzerphii Toomk" <kze### [at] orangefr> wrote:
> Wow, thanks for this answer. I will try to do it.
>

The Wow makes me think (forgive me :-)

If you are going to use PovRay SDL it might be a good idea to familiarise
yourself with it, a bit. When I created animations in Moray I did not use the
animation system so I created a static scene, exported the PovRay script, by
rendering it, then edited it. (Remember that Moray uses a Z-axis is up as

Maybe you could try transforming (translate, rotate or scale) objects then try
to animate something like a bicubic_patch object by varying the control points
using the clock or frame variables. I would suggest using the frame_number


does. (Bishop3D is in Beta testing but nearing release. It is not as mature as
Moray but does work with PovRay 3.6 and 3.7 (dual cores :-} )
http://www.bishop3d.com/ )

 Regards
     Stephen


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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