![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Peter Hertel
Subject: Re: Which ship would you rather ride in?
Date: 30 Dec 2002 16:09:20
Message: <3e10b600@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Not much interest in this post. Have others:
> 1) observed the same problem and found more intelligent solutions?
> 2) not yet experimented with Reorients this deeply and never discovered
the
> "problem" ?
yup that's me :)
> 3) observed it and had no aesthetic difficulties with it?
Doesn't it just depend on the scene? What looks best in the particular
situation?
Transform_2 looks far better in this case, but what perhaps in a different
scene Transform_1 would look better? Me thinks you'd have to set up the
macro for what you'd need.. The POV-Ray way :) Or am I completely out of
bounds now? Sorry if I am!
> 4) not understood me at all?
Perhaps? Haven't followed the other discussion..
-Peter
PS: The tip of your spaceship isn't connected smoothly to the body, but it
might have been the way you want it to be? ;)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
The reorient macro just provides one solution for reorienting an object.
I always makes custom solutions for the specific cases. Couldn't have
made any of my character animation work without that. In my bones
system, I have carefully decided for each bone how it should be aligned
dependent on the alignments on the other bones and the various input
data.
Rune
--
3D images and anims, include files, tutorials and more:
rune|vision: http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Fernando Gonzalez del Cueto
Subject: Re: Which ship would you rather ride in?
Date: 31 Dec 2002 02:34:28
Message: <3e114884@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I think it's pretty evident that the left reorientation scheme is much
smoother than the other one.
That might help you to choose.
Good luck,
Fernando
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Fernando Gonzalez del Cueto wrote:
> I think it's pretty evident that the left
> reorientation scheme is much
> smoother than the other one.
>
In the following, assume your plane/ body is facing the +z direction.
In aviation, they talk of pitch (rotate x), yaw (rotate y), and roll (rotate
z). Pitch and yaw are (over the long term) an inevitable consequence of
WHERE YOU'RE GOING. Roll is a factor of comfort. Even watching "Top Gun,"
you'll see that the pilots may go through all kinds of stunts with rolls
when changing direction, but for long term travel toward a destination
(once they've completed a turn), they choose the orientation of the craft
on the right: ZERO ROLL. Watch birds: they'll roll on a turn but choose
zero roll once they're pointed in the direction of choice. We also design
our roadways to minimize roll; yaw is an inevitable function of where
you're going; an effort is made to reduce pitch somewhat but it's rarely
eliminated.
http://liftoff.msfc.nasa.gov/Academy/ROCKET_SCI/SHUTTLE/ATTITUDE/PYR.HTML
http://www.bmfa.org/faq/flight_controls.htm
Similarly, if you're watching home videos, you're going to get more nauseous
with a camera that has done rotate z than you will with rotate x or y. A
common camera trick is to have the camera say no (yaw) or yes (pitch). In
a typical day, your head & waist go through hundreds of rotate x's of tens
of degrees, but rotating your waist about the z axis is *uncomfortable* to
say the least.
These are the intuitive, aesthetic reasons why I disliked the roll inherent
in the as-written Reorient macro. This is actually the reason I stopped
doing flocking animations a while ago: I knew that a bird or plane wouldn't
rotate in this fashion. I just this month figured out a solution when I hit
this wall with my camera reorientation. The solution is a two step one.
That NASA link suggested that the rotations are always done in order of
Pitch, Yaw, and Roll. My intuition is that one could tweak the macro
itself to affect the change I'm talking about-- perhaps even avoid the
abrupt change you noticed. While I'm tinkering, I'm publicly asking if
anyone else has figured this out.
Greg M. Johnson
>
>That might help you to choose.
>
>Good luck,
>
>Fernando
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I prefer the right ship's movement. It's more alive, but if you're just
using a 'simple' formula, then maybe the math is unstable. I think the
movement is 'intelligent', done on purpose by the ship's computer, in order
to fly in an atmosphere or ... something like that.. The left ship is
boring.
Regards,
Hugo
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
To get greatest comfort, you don't really want to minimize roll, you
want to make sure that the total force vector that the pilot is
influenced by matches the downward direction of the ship. For example,
if the ship makes a sharp turn (to the side), then you actually desire
roll, because the centrifugal force is added to the regular gravity
force, and the total force is then not straight -y but some slanted
direction, and you want the roll of the ship to match that, so that the
pilot isn't thrown sideways in the cockpit.
You can't compute these kind of things with a simple transform. You have
to consider the force vectors influencing the ship, and based on those
find the optimal roll at the given time. Another thing to take into
account is that a too fast roll may not be very comfortable. The point
I'm coming to is that you need a dynamic simulation that for any given
time considers the direction, the speed, the curvature of the path, and
the current alignment and calculates the roll based on that. Of course,
this may be overkill for what you want to do.
Rune
--
3D images and anims, include files, tutorials and more:
rune|vision: http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
You're purely correct for a turn. You're right about needing to roll your
own macro.
But when you're beyond a region with any considerable "curvature to the
path"-- I said once you'd completed the turn-- I'd assert you always want
zero roll.
Interesting Q: Is there a way to compute instantaneous "sphere of
curvature" on a plain ol' pov 35. spline?
"Rune" <run### [at] runevision com> wrote in message
news:3e173498@news.povray.org...
> To get greatest comfort, you don't really want to minimize roll, you
> want to make sure that the total force vector that the pilot is
> influenced by matches the downward direction of the ship. For example,
> if the ship makes a sharp turn (to the side), then you actually desire
> roll, because the centrifugal force is added to the regular gravity
> force, and the total force is then not straight -y but some slanted
> direction, and you want the roll of the ship to match that, so that the
> pilot isn't thrown sideways in the cockpit.
>
> You can't compute these kind of things with a simple transform. You have
> to consider the force vectors influencing the ship, and based on those
> find the optimal roll at the given time. Another thing to take into
> account is that a too fast roll may not be very comfortable. The point
> I'm coming to is that you need a dynamic simulation that for any given
> time considers the direction, the speed, the curvature of the path, and
> the current alignment and calculates the roll based on that. Of course,
> this may be overkill for what you want to do.
>
> Rune
> --
> 3D images and anims, include files, tutorials and more:
> rune|vision: http://runevision.com (updated Oct 19)
> POV-Ray Ring: http://webring.povray.co.uk
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Greg M. Johnson wrote:
> I said once you'd completed the turn--
> I'd assert you always want zero roll.
And it is very easy to calculate the transformation that gives zero
roll.
> Interesting Q: Is there a way to compute
> instantaneous "sphere of curvature" on a
> plain ol' pov 35. spline?
I don't know. Anyway, you may have use of looking at the file in the
POV-Ray distribution
scenes/animations/splinefollow/splinefollow.pov
And maybe have a look at the Spline_Trans macro in transforms.inc - not
that it will perfectly fit your needs, but it can perhaps get you
started.
Rune
--
3D images and anims, include files, tutorials and more:
rune|vision: http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Greg M. Johnson" <gregj:-)565### [at] aol com> wrote in
news:3e1ad518$1@news.povray.org:
> You're purely correct for a turn. You're right about needing to
> roll your own macro.
>
> But when you're beyond a region with any considerable "curvature to
> the path"-- I said once you'd completed the turn-- I'd assert you
> always want zero roll.
>
> Interesting Q: Is there a way to compute instantaneous "sphere of
> curvature" on a plain ol' pov 35. spline?
...
I don't know what you really mean by "sphere of
curvature". But I guess that you are want to find
the radius of the curve at a specific point along
a spline.
You can solve that problem numerically by
finding two other points, on the spline, close
to the point that you would like to find the
curvature for.
You could for example find these points by
choosing one T-value a little below the T-value
for the point in question, and one T-value a
little above.
When you have these 3 points, and if they are
not co-linear, then there is only one cirlce
in 3D-space that will "pass through" them all.
And this circle is possible find analytically.
In this post you'll win find a macro I made
that does that job:
http://news.povray.org/povray.general/17701/114420
A reply I made to Mark M. Wilson's thread
"general geometry question" 21. Aug. 2001 to
povray.general.
This post may also be relevant. (Same thread)
http://news.povray.org/povray.general/17701/114421/
// Define problem
#declare t0 = 1.56;
#declare p0 = YourSpline(t0);
#declare H = 1e-5;
#declare p1 = YourSpline(t0 + H);
#declare p2 = YourSpline(t0 - H);
// Call macro to solve problem
#declare pCtr = <0, 0, 0>;
#declare Rad = 0;
#declare vN = <0, 0, 0>;
CircleTouches3Points(p0, p1, p2, pCtr, Rad, vN)
After the macro call, Rad will contain the
radius of the circle that "goes through"
these 3 points. pCtr and vN will also contain
info that may be useful.
Note that if the points are co-linear then:
vlength(vcross(p1 - p0, p2 - 0)) = 0
I.e. the radius will be infinite, and the
macro will fail if called with these points
as inputs. (So you better test for this first.)
Here is an image that shows how these circles
would be for different points along a spline:
http://news.povray.org/povray.binaries.images/12141/
This is just my "first thoughts" about this
problem. There are most likely other more
correct and/or simpler methods available.
Tor Olav
P.S. If you meant to find the sphere that
"fits best" beneath your curve at the
point YourSpline(t0), then here's a
suggestion for some code that I think will
work:
// Define problem
#declare t0 = 1.56;
#declare H = 1e-5;
#declare pA = YourSpline(t0 - H*2);
#declare pB = YourSpline(t0 - H);
#declare pC = YourSpline(t0 + H);
#declare pD = YourSpline(t0 + H*2);
// Call macro to solve problem
#declare pCtr = <0, 0, 0>;
#declare Rad = 0;
SphereTouches4Points(pA, pB, pC, pD, pCtr, Rad)
// This macro can be found in mentioned post.
Remember to check for co-planarity before
calling this macro. I.e. check if:
vdot(pB - pA, vcross(pC - pA, pD - pA)) = 0
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Greg M Johnson
Subject: Re: Which ship would you rather ride in?
Date: 8 Jan 2003 09:05:53
Message: <3e1c3041@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Rune" <run### [at] runevision com> wrote in message
news:3e1b6467@news.povray.org...
> Greg M. Johnson wrote:
> > I said once you'd completed the turn--
> > I'd assert you always want zero roll.
>
> And it is very easy to calculate the transformation that gives zero
> roll.
>
I found one that looks great in all situations , except for an abrupt filp
when you cross the z=0 plane while pointing downward. I'm pleased with it
but wonder if there's a more elegant, one-step solution out there that even
avoids this problem. Care to share yours?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |