anachronox-sdk/docs/planet/29.html

182 lines
6.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>Anachronox Editing Documentation</TITLE>
</HEAD>
<BODY BGCOLOR="#000000" TEXT="#EFEFEF" LINK="#00FFFF" ALINK="#FFFFFF" VLINK="#05F3D0">
<CENTER>
<P>
<FONT FACE="Helvetica">
<FONT COLOR="#0055DD"><B>Tutorial 29: Special effects - alpha, scrolltex, entquake</B>
</FONT>
</CENTER>
<P>
<HR>
<BR>
<FONT COLOR="#0055DD">
ALPHA=[value of alpha (0-1), alpha-type(1,2)]<BR>
ALPHALERP=[starting alpha(0-1), ending alpha(0-1), alpha-type(1,2), time in seconds]<BR>
COLORLERP=[r1],[g1],[b1],[r2],[g2],[b2],[time in secs]<BR>
SCROLLTEX=[x,y]<BR>
ENTQUAKE=[x,y,z]<BR>
</FONT>
<P>
<B>SPECIAL EFFECTS!!!!</B>
Fffffuuunnnnn stuff
<P>
<FONT COLOR="#0055DD">ALPHA=[value of alpha (0-1), alpha-type(1,2)]</FONT>
<P>
Do you know what an alpha channel is? Im really not the person who should explain this in detail, but to put it simply, its how much transparency an object has, OR how much See-Through-Ness an object has.
<P>
There are 2 types: Additive and Non-additive<BR>
Rather than explain them, you can look at the difference<BR>
1 = additive<BR>
2 = non-additive
<P>
NOTE: non-additive has some weird ass bugs, but I will show you how to use it regardless
<P>
We will work with 2 objects for testing. A whitesphere and the Nuts cube.
<P>
Create a camera looking at 2 whitespheres and 2 nuts cubes. One in each quadrant. (upper-left, upper-right, lower-left, lower-right)
<P>
Newent=mys_whitesphere;floor=0<BR>
&nbsp;&nbsp;(You MAY wanna scale this to .2)
Newent=mys_nutscube;floor=0
<P>
At 2.0 put cmd for EACH object<BR>
Alpha=.5,2<BR>
This is half alpha non-additive<BR>
Play this
<P>
Change all the cmd nodes to<BR>
Alpha=1,2
<P>
Notice that they are whole again
<P>
Now change all the cmds to read<BR>
Alpha=.5,1<BR>
This is half alpha additive
<P>
Now change all the cmds to read<BR>
Alpha=1,1<BR>
This is full alpha additive
<P>
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.
<P>
Some neat objects to use with alpha & alphalerp<BR>
newent=mys_fire4_sprite <BR>
newent=mys_Xplsn_C (scale over time with some scrolltex)<BR>
newent=cine_flarelens2
<P>
The flarelens is great for adding hot flares to a scene, put up to the camera for great effect.<BR>
Newent=cine_flarelens;floor=0;lighting=0=1=1=1;alpha=1,1<BR>
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.
<P>
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!<BR>
(So what this means if you want a non-additive effect, there can be no additive effects on screen)
<P>
As it happens, non-addtive effects only look neat when using alphalerp
<P>
<FONT COLOR="#0055DD">ALPHALERP=[starting alpha(0-1), ending alpha(0-1), alpha-type(1,2), time in seconds]</FONT>
<P>
When you want to change alpha values over time, this is the CMD for U!<BR>
Mystech owes many favors to this CMD.
<P>
Lets take the 2 white spheres & 2 nuts cubes and play with em.<BR>
Delete all nodes at 2.0
<P>
Place a cmd node at 2.0 for one of the whitespheres<BR>
Alphalerp=0,1,2,1
<P>
This will fade up (from nothing) the whitesphere to full additive alpha in 2 seconds.<BR>
Play this
<P>
Try<BR>
Alphalerp=1,0,6,1<BR>
Or<BR>
Alphalerp=0,.3,1,1<BR>
Play this.
<P>
Alphalerp=0,1,2,2<BR>
This will fade up (from nothing) the whitesphere to full non-additive alpha in 2 seconds. MAKE SURE THERE ARE NO OTHER ALPHA CMDS!<BR>
Play this
<P>
It goes solid
<P>
Now delete this node
<P>
Place a cmd node at 2.0 for one of the nuts cubes<BR>
Alphalerp=0,1,2,2<BR>
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.<BR>
Play this.
<P>
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.
<P>
So basically additive is the way to go.
<P>
Alphalerp is a simple little command, but it creates amazing effects. REMEMBER TO USE LENS FLARES and DOUBLE UP EFFECTS.
<P>
NOTE: You cannot have a BLACK object with additive alpha.
<P>
<FONT COLOR="#0055DD">COLORLERP=[r1],[g1],[b1],[r2],[g2],[b2],[time in secs]</FONT>
<P>
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.<BR>
Newscript<BR>
Newent=mys_whiteshpere;floor=0;lighting=0=1=1=1<BR>
A cmd node at 2.0<BR>
Colorlerp=1,1,1,0,1,0,3
<P>
This will take you white sphere and turn it green over 3 seconds.
<P>
Try<BR>
Colorlerp=0,0,0,.5,1,.1,2<BR>
The three zeroes make the whitesphere black.
<P>
<FONT COLOR="#0055DD">SCROLLTEX=[x,y]</FONT>
<P>
You can scroll the texture on an object.<BR>
Newscript<BR>
Newent=character_boots;floor=1<BR>
Put a cmd node at 2.0<BR>
Scrolltex=1,0<BR>
Play this
<P>
Change it to read<BR>
Scrolltex=0,1<BR>
Play this
<P>
Pretty weird hunh!? The way the texture scrolls is entirely dependant on HOW IT WAS TEXTURED in UV. If you dont know what UV is, it is the way an artist applies a texture over a model. I, myself dont know how to use UV, so….
<P>
But, three are many neat entities in Anox that can be scrolled to great effect.<BR>
Newscript<BR>
newent=mys_Xplsn_C;floor=0;alpha=1,1;lighting=0=1=1=1<BR>
Put a cmd node at 2.0<BR>
Scrolltex=0,-1.5<BR>
Scale it down to .4
<P>
Play this.
<P>
HONE YOUR SKILLZ<BR>
Now scale it up over time to create an expanding ring of fire. Awesome!<BR>
Maybe even add some colorlerp, to change its color as it expands (Wish Id thought of that earlier)<BR>
NOW alphalerp it to zero near the end to fade it out!!<BR>
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.
<P>
Now you are ready!<BR>
Begin!
<P>
<FONT COLOR="#0055DD">ENTQUAKE=[x,y,z]</FONT>
<P>
Newscript<BR>
Place ob_automap on a path<BR>
At 2.0 put a cmd node<BR>
Entquake=4,0,0<BR>
Play this
<P>
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.
<P>&nbsp;<P>
</BODY>
</HTML>