Category Archives: Palette Reference

PALETTE REFERENCE – 34 – THROWER – PART 30 – Ricochet

Ricochet

Abilities:

Thrower,on

This thrower function requires that on *thrower nc the following entries be made:

Boomerang,off
Ricochet,on

Gravity,0.01 (on Palette) – you can try slightly higher values but 0.10 is too much

It has predefined in-palette behavior in order to short-cut and simplify its operation.  It propels a throwable Palette using MoveToTarget,on only, both trips.  The only difference  between it and Boomerang is that it hasno (boom)  delay time and it does no automatic attach since its intent is to end up in the ‘world‘ somewhere.

It requires 2 contraption objects defined in the throwing object using:

ThrowerTarget,Both
ThrowerObjectTargetName1,HatTargetB1
ThrowerObjectTargetName2,HatTargetB2

Rotation can be specified using either AngularVelocity, or TargetOmegaTargetOmega causes a spurious change in spin direction if that is the effect you want.

It will automatically attach to the Palette owner upon return flight using AttachOnRange,off,5 body-part, REGARDLESS as to whether AttachOnRange is on or off.

NOTE: Best effect is to use this in a rezzer with a throw-animation. 

PALETTE REFERENCE – 33 – THROWER – PART 29 – Boomerang

Boomerang

 

IMPORTANT: Wait for ALL these message upon Reset or your rezzable will float, having not found a target:
[09:33:52] rezboom: [LDR] 14 – Artiste PALETTE is READY !!!
[09:34:07] rezboom: [ASS] 13 – Artiste Assets ->rezboom<- 71 lines read
[09:34:07] rezboom: [ASS] Found Thrower Target Object1: AlienTarget1
[09:34:07] rezboom: [ASS] Found Thrower Target Object2: ArtistePalette_03_D

Pre Attach Rezzable to Hand and adjust, prior to placing in Rezzer

Blue entries go in the rezzer palette, only
Green entries, below, go in the rezzable (embedded) palette, only
Orange entries are required in both rezzer and rezzable palettes.

Abilities:
Thrower, on
Attachable,on
Moveable,on — needed if using AutoReturn

This thrower function requires that on *thrower nc the following entries be made in the embedded rezzable palette and the rezzer palette:

Boomerang,on  ––  Rezzable palette
BoomHoverDelay,1.0 — Rezzable palette

Gravity,0.01 (on Palette in the Rezzable palette) – you can try slightly higher values but 0.10 is too much

It has predefined in-palette behavior in order to short-cut and simplify its operation.  It propels a throwable Palette using MoveToTarget,on only, both trips. ApplyImpulse is not available to it.

Rezzer
Rezzer,on

RezObjectName,rezboom
RezSource,BoomSource

Rezzable
IgnoreFirstCollision,off — as needed
RangePostActions,on

It requires 2 contraption objects defined in the
throwing object (rezzer palette) using:

ThrowerTarget,Both
ThrowerObjectTargetName1,TargetToReach
ThrowerObjectTargetName2,ReturnTarget near hand

Rotation can be specified using either AngularVelocity, or TargetOmegaTargetOmega causes a spurious change in spin direction if that is the effect you want.

MoveToTargetTau,2
/* Make MoveToTargetTau smaller for faster 
targeting
AtTargetRange,0.5 — how close before RangePost  is valid

SetAngularVelocity,on
AngularVelocity,<0.0,0.0,7.0>  — speed of rotation
AngularVelocity2,<0.0,0.0,0.0>
AngularVelocity3,<0.0,0.0,0.0>

RezMe,on
/*TempRezMe,on — (use instead of RezMe optional)
RangePostActions,on
ShowInMidFlightAfter,0.25

It will automatically attach to the Palette owner upon return flight using AttachOnRange,on,5 body-part, REGARDLESS as to whether AttachOnRange is on or off.

NOTE: Best effect is to use this in a rezzer with a throw-animation AND a catch-animation in a player-palette.

 

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