Tutorial 29: Special effects - alpha, scrolltex, entquake



ALPHA=[value of alpha (0-1), alpha-type(1,2)]
ALPHALERP=[starting alpha(0-1), ending alpha(0-1), alpha-type(1,2), time in seconds]
COLORLERP=[r1],[g1],[b1],[r2],[g2],[b2],[time in secs]
SCROLLTEX=[x,y]
ENTQUAKE=[x,y,z]

SPECIAL EFFECTS!!!! Fffffuuunnnnn stuff

ALPHA=[value of alpha (0-1), alpha-type(1,2)]

Do you know what an alpha channel is? I’m really not the person who should explain this in detail, but to put it simply, it’s how much transparency an object has, OR how much ‘See-Through-Ness’ an object has.

There are 2 types: Additive and Non-additive
Rather than explain them, you can look at the difference
1 = additive
2 = non-additive

NOTE: non-additive has some weird ass bugs, but I will show you how to use it regardless

We will work with 2 objects for testing. A whitesphere and the Nuts cube.

Create a camera looking at 2 whitespheres and 2 nuts cubes. One in each quadrant. (upper-left, upper-right, lower-left, lower-right)

Newent=mys_whitesphere;floor=0
  (You MAY wanna scale this to .2) Newent=mys_nutscube;floor=0

At 2.0 put cmd for EACH object
Alpha=.5,2
This is half alpha non-additive
Play this

Change all the cmd nodes to
Alpha=1,2

Notice that they are whole again

Now change all the cmds to read
Alpha=.5,1
This is half alpha additive

Now change all the cmds to read
Alpha=1,1
This is full alpha additive

Notice they are NOT whole. Additive blends all the transparency and starts to look white hot in the center of the nuts cube. It looks great.

Some neat objects to use with alpha & alphalerp
newent=mys_fire4_sprite
newent=mys_Xplsn_C (scale over time with some scrolltex)
newent=cine_flarelens2

The flarelens is great for adding hot flares to a scene, put up to the camera for great effect.
Newent=cine_flarelens;floor=0;lighting=0=1=1=1;alpha=1,1
Scale it down to .08 and put it in front of the camera, maybe even move it around a bit to see what it does to the objects behind it. THIS is why additive is so great.

YOU CANNOT HAVE AN ADDITIVE OBJECT AND A NON-ADDITIVE OBJECT ON THE SCREEN AT THE SAME TIME, BECAUSE IT WILL BREAK THE NON-ADDTIVE-ness OF THAT OBJECT!
(So what this means if you want a non-additive effect, there can be no additive effects on screen)

As it happens, non-addtive effects only look neat when using alphalerp

ALPHALERP=[starting alpha(0-1), ending alpha(0-1), alpha-type(1,2), time in seconds]

When you want to change alpha values over time, this is the CMD for U!
Mystech owes many favors to this CMD.

Lets take the 2 white spheres & 2 nuts cubes and play with em.
Delete all nodes at 2.0

Place a cmd node at 2.0 for one of the whitespheres
Alphalerp=0,1,2,1

This will fade up (from nothing) the whitesphere to full additive alpha in 2 seconds.
Play this

Try
Alphalerp=1,0,6,1
Or
Alphalerp=0,.3,1,1
Play this.

Alphalerp=0,1,2,2
This will fade up (from nothing) the whitesphere to full non-additive alpha in 2 seconds. MAKE SURE THERE ARE NO OTHER ALPHA CMDS!
Play this

It goes solid

Now delete this node

Place a cmd node at 2.0 for one of the nuts cubes
Alphalerp=0,1,2,2
This will fade up (from nothing) the nuts cube to full non-additive alpha in 2 seconds. MAKE SURE THERE ARE NO OTHER ALPHA CMDS.
Play this.

This is what Non-additive is intended for, solid objects, kinda like a star trek transporter. You will notice that it looks different than the other nuts cube. This is the other bug with alphalerp non-additive. Once you make an object do non-additive tricks, it loses its alpha sorting, and looks all screwed up.

So basically additive is the way to go.

Alphalerp is a simple little command, but it creates amazing effects. REMEMBER TO USE LENS FLARES and DOUBLE UP EFFECTS.

NOTE: You cannot have a BLACK object with additive alpha.

COLORLERP=[r1],[g1],[b1],[r2],[g2],[b2],[time in secs]

To change an objects color over time. This CMD uses model lighting to function, so make sure you give it a lighting CMD at first.
Newscript
Newent=mys_whiteshpere;floor=0;lighting=0=1=1=1
A cmd node at 2.0
Colorlerp=1,1,1,0,1,0,3

This will take you white sphere and turn it green over 3 seconds.

Try
Colorlerp=0,0,0,.5,1,.1,2
The three zeroes make the whitesphere black.

SCROLLTEX=[x,y]

You can scroll the texture on an object.
Newscript
Newent=character_boots;floor=1
Put a cmd node at 2.0
Scrolltex=1,0
Play this

Change it to read
Scrolltex=0,1
Play this

Pretty weird hunh!? The way the texture scrolls is entirely dependant on HOW IT WAS TEXTURED in UV. If you don’t know what UV is, it is the way an artist applies a texture over a model. I, myself don’t know how to use UV, so….

But, three are many neat entities in Anox that can be scrolled to great effect.
Newscript
newent=mys_Xplsn_C;floor=0;alpha=1,1;lighting=0=1=1=1
Put a cmd node at 2.0
Scrolltex=0,-1.5
Scale it down to .4

Play this.

HONE YOUR SKILLZ
Now scale it up over time to create an expanding ring of fire. Awesome!
Maybe even add some colorlerp, to change its color as it expands (Wish I’d thought of that earlier)
NOW alphalerp it to zero near the end to fade it out!!
Now stick a LENS flare in front of the camera and Alphalerp That up FROM zero to 1 and then BACK to zero to enhance the effect.

Now you are ready!
Begin!

ENTQUAKE=[x,y,z]

Newscript
Place ob_automap on a path
At 2.0 put a cmd node
Entquake=4,0,0
Play this

The Travico came up with a neat idea and gave a super scaled squib some entquake values. And attached some beams to it for really neat effects. Look in the advanced tricks section later.