All posts by Yummy

Create of the Artiste System

Palette Reference – 32 – Thrower – Part 28 – Rezzer Throw Orientation

Rezzer Throw Orientation

When using the RezSource entry on the *thrower nc it is important to realize that the position and rotation for a ‘throw‘, as in Apply Impulse and AngularVelocity, must be based upon the RezSource object LOCAL setting (the edit of the object, unless you have chosen  WORLD as your DirectionalVector setting on the *thrower nc.  Then it should be based on the WORLD selection (the edit of the object).

The throw will orient and propel itself using a trajectory and rotation based upon the orientation of the RezSource at last time of Palette reset which must be refreshed with a Palette reset, should it change.

Palette Reference – 31 – Thrower – Part 27 – Target-Based Throwing – *thrower notecard

Target-Based Throwing – *thrower notecard

 

Introducing Target-Based throwing, useful for easier targeting, although the flight-path is  not respondent to mass/gravity like Impulse-based throwing.  It is a trade-off.

Below are some workable values to get you started:

*thrower nc

Motion: SetMoveToTarget,on
Motion: MoveToTargetTau,2.0
Rotation
: SetTargetOmega,on
Rotation: TargetOmega,<1,0,0>,6.283185,2.0
Termination: RangePostActions,on
Termination: AtRange,0.5
Termination: AttachOnRange,off,6
Termination: SetMatchPosAtTarget,off
Termination: SetMatchRotAtTarget,off
Termination: SetStopSpinAtTarget,on
Termination: SetNonPhysAtTarget,on

The MoveToTargetTau affects the speed and can NOT BE ZERO or the process will silently fail.  It is more of a damping/easing-in effect than pure speed.  The smaller this value, the faster will be the move towards the target.

SetTargetOmega will acknowledge a client-side-based rotation using TargetOmega that is constant and does not decay.  This is not good if you need universally seen precisions, but is good for performance.

TargetOmega takes 3 values:

1 – The axis(es) of the rotation
2 – the rate-of-rotation in radians
3 – the gain or multiplier of the rate-of-rotation

AtTarget specifies the range within which the post-targeting will trigger post actions.

 

 

Palette Reference – 30 – Thrower – Part 26 – Target-Based Throwing

Target-Based Throwing

We will now learn about Target-Based Throwing as opposed to Impulse-Based

Target-Based

Motion: MoveToTarget
Rotation: TargetOmega
Termination: AtRange

And yes you can mix choices from the 2 methods.  Feel free to experiment.

This MoveToTarget-based motion system is useful for easier targeting but gives a different motion-style that does NOT respond to gravity/mass in the same way that our ApplyImpulse method does.  There is extreme damping.

Palette Reference – 29 – Thrower – Part 25 – Impulse-Based Throwing

Impulse-Based Throwing

So far we have focused on Impulse-Based throwing; AngularVelocity-Based rotation with Collision-Based termination.

With our Impulse/Collision system, we used a gravity-dependent method of throwing so our throws had nice even rise/fall arcs that responded to gravity based upon their mass. (The rotation, however, was not mass-based, and by choice, as I felt it was easier to control and looked better.  I may add the mass-based rotation later if their proves to be demand for it.)

This means the rotation did not slow over time.

What we have been using:  Impulse-Based Throwing

MotionSetApplyImpulse,on
Motion: ApplyImpulse,<x,y,z>
Rotation: SetAngularVelocity,on
Rotation: AngularVelocity,<x,y,z>
Termination: CollisionPostActions1,on

/* Posts Collision
AttachOnCollide,off,5
ControlOnCollide,off,SoccerBall4,detach
ControlOnCollideDelay
DieOnCollide,off,1.5
MakePhysAfterPost,0
MaterialsOnCollide,off,0.2,10,10,0.1
SetMatchPosOnCollide,off
SetMatchRotOnCollide,off
SetStopSpinOnCollide,on
SetNonPhysOnCollide,on

 

Palette Reference – 28 – Thrower – Part 24 – Preparing the Source

Preparing the Source

 

The trick is to capture the release frame of the animations throwing gesture at the exact moment of its release.  You can use a recording device to record the animation.  Then step thru, frame by frame, determining which frame is the release frame.  It is what I did.

You can set a ruler up-and-down and across to create a guide for placement of the “source” object.  the Source object, if a Palette, can be easily moved to the show-site with accuracy by giving it a Moveable ability and an InitialOffset.

 

Palette Reference – 27 – Thrower – Part 23 – Thrower0123OnRez

Thrower0123OnRez


This value is set inside the REZZABLE.

This value should be 1, 2, or 3 for situations where you are creating  a Thrower-Rezzer.   The number determines which selection of ApplyImpulse, AngularVelocity, and CollisionPostActions will be used.

It should be zero (0) if you are rezzing a normal Palette with NO throwing capabilities.

Ex:

Thrower0123OnRez,1

The zero  (0) option uses the current position and rotation  of the rezzer.  i.e. no throwing of the Palette is used with this option.

The initial velocity of this option is always the same as the rezzer with is usually zero, so it rezzes static, non-moving, unlike 1,2, and 3.

Palette Reference – 25 – Thrower – Part 21 – AutoFX Sample Entry

AutoFX Sample Entry

1,r=p%02_A%move1%WAIT=0.6%r=p%HatRezzer%throw1

Here we start the throwing animation that is assumed loaded into Palette named ArtistePalette_02_A.  It should be allotted enough time to complete its cycle fully prior to the actual throw.  In the case above, we allowed for 0.6 seconds.  It should have a zero move vector (<0,0,0>).

Ex:
M_02_A_01,4.5,<0,0,0>,<0,0,0,1>,FrisbeeThrow,0

Along with RezInvisiDelay, you will also tweak the WAIT time here to time the throw to coincide with the release frame of the animation.  One controls the time of INVISIBILITY and the other controls the time of the appearance of the Rezzable

 

Palette Reference – 24 – Thrower – Part 20 – Preparing the Rezzer

Preparing the Rezzer

Since the Rezzer is attached, it needs no movement information but will serve as an anchor.  Ability Moveable,off.

It needs Throwable,on ability.  All other abilities need to be OFF.

Make the changes listed below, then reset the Palette.

*palette nc
Throwable,on
Alpha,1000
Color,none

*thrower nc
AutoReturn,0
Receiver,0
/* The most important entry that defines Palette as a Rezzer follows
Rezzer,on
RezSource,(name of  Source)
RezObjectName,(name of embedded(inside) throwable Palette)
Thrower0123OnRez,1

Once you specify Rezzer,on, most other entries are ignored.

Palette Reference – 23 – Thrower – Part 19 – Creating a Thrower-Rezzer

Creating a Thrower-Rezzer

This demonstrates how to give the illusion of throwing a Palette that is attached to an avatar.

There are many facets to this commonly-used approach of ‘throwing a held object‘.  The Palette Thrower-Rezzer method is the proposed method for throwing from inside of an animation.  Our Thrower provides very granular control over the degree of accuracy of the illusion of the ‘throw‘.

Basically, it is an illusion that is accomplished by rezzing a duplicate of the attached Palette and making the attached Palette go invisible at the same time as the new object is rezzed and propelled.

There are 4 main parts.  The Rezzer, the Rezzable, the Source, and the Target.

1 – Rezzer

The Rezzer is the Palette attached to the avatar that is doing the throwing, usually in a held position by one or both hands.

2 – Rezzable

The Rezzable is a Palette that is contained inside the Rezzer that should look identical but will have different Palette properties and is the object that will be SEEN propelling thru the air.

3 – Source

The Source is an INVISIBLE, unscripted, non-physical,  object that is placed at the point of release that dictates the position and rotation that the  rezzable Palette should use when it is rezzed

4 – Target

The Target is an INVISIBLE, unscripted, non-physical,  object that is used to dictate the final landing position and rotation of the Rezzable Palette for times when you want to ‘land’ a thrown Palette onto a receiving object like a hat on a hat rack.