| 04-08-2006, 01:59 PM | #1 | ||||||||
This "tutorial" illustrates alot of tricks cinematic makers can use to spice up their cinematic visually. I've collected alot of the older and newer tricks and placed them into 1 tutorial. This tutorial currently holds:
Black Cinematic Borders Thanks go to Hyarion
This requires no imported files. To make the borders black simply go to Advanced > Game Interface... And change these things: Table:
Basic Initialization Triggers
I often see cinematics where the music is running trough the custom music played as a sound, simply because the maker didnt have music on and didnt notice. I also very often see a cinematic where there still are ambient sounds, which brings down the mood. Ambient sounds and music should both be triggered, not left to the game randomly. This trigger will make the game start in a faded out cinematic mode with no sounds at all: Trigger: Example Init
![]() Conditions
![]() Actions
![]() ![]() Cinematic - Turn cinematic mode On for (All players)
![]() ![]() Cinematic - Fade out over 0.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
![]() ![]() Sound - Stop music Immediately
![]() ![]() Sound - Clear the music list
![]() ![]() Sound - Stop music Immediately
![]() ![]() Sound - Disable dawn and dusk sounds
![]() ![]() Custom script: call StopSound(bj_nightAmbientSound, true, true)
![]() ![]() Custom script: call StopSound(bj_dayAmbientSound, true, true)The last 2 actions turn off the ambient sounds, be sure to copy them right, else you will get an error. Lights (ambient light and omnilights)
An often overlooked feature warcraft brings are lights. Tho they seem not highly usable they are in fact quite usable. Let's start with ambient lighting. Ever noticed how the lighting goes a little blue when it gets to nighttime? That lighting is actually created by a model and it is changable by triggers! The syntax is: JASS:call SetDayNightModels("TerrainLightModelHere","UnitLightModelHere") JASS:call SetDayNightModels("","") To create a model, you should either get into some easy .mdl editing, or use any of these programs: iNfraNe's Ambient Light Creator ghEEd's LightModel Creator Once you have created a model with any of these tools you should convert it to .mdx using this tool (or any other): Yobgul's Warcraft III File Converter After this, import the file (as .mdx) and give it a name, for example my name will now be "Light.mdx". If I want to use this model for lighting this is the syntax: JASS:call SetDayNightModels("Light.mdl","Light.mdl") Next you will think, why the **** would I want a pitch black surrounding? The answer is simple. You can now use omnilights to light the environment, like glowing torches. This will give a really nice effect, you can use ghEEd's program to create a lightmodel yourself. Setting specific animations for units
Ever wanted to make a unit play a specific animation, like "Stand - 2" but then found out the unit still played a random animation? There is a way out. You should be using the animation native: JASS:native SetUnitAnimationByIndex takes unit whichUnit, integer whichAnimation returns nothing First, you should store the unit you want to play the animation in a variable, like... tempUnit. In jass, this variable is then called udg_tempUnit (jass is case sensitive, note). After this, extract the sequences list from the model, and check which number is the animation you want to play (look under the chapter "Getting Model Data" on how to do this). When u have found the animation number, simply input it in the call: JASS:call SetUnitAnimationByIndex(udg_tempUnit, 2) There, u've let the unit play a specific animation. Getting Model Data
Often you will want to get something from a model. Like:
Attachment Points First, get Yobgul's Warcraft III File Converter to convert the model to .mdl (also, get Prophet's Warcraft III Viewer or something similar to extract your model from the mpq). Once you have extracted and converted the model, simply open it with notepad. Now search the file for "Attachment". You will find something like this first: Code:
Attachment "Head Ref" {
ObjectId 13,
Parent 1,
}Most common attachment points are:
Animation Sequences This is quite easy to find. You can use this to play a specific animation (as I talked about before). Go to the top of the model file and you will see something like Code:
Sequences 12 {
Anim "Stand" {
Interval { 167, 1167 },
MinimumExtent { -25.0869, -29.3512, 5.52004 },
MaximumExtent { 35.6949, 29.3513, 18.8083 },
BoundsRadius 36.2281,
}
...For other usefull things you can get from the model visit the .mdl editing section. Turning heads/torsos (Locking body part facing)
It is possible to lock a unit's head OR torso by triggers. You can find the action under "Animation": Trigger: Animation - Lock (Last created unit)'s Head to face (Last created unit), offset by (0.00, 0.00, 90.00)It is possible to lock the facing to the unit itself, making only the offset factor matter (this way you can make a unit always look in the same direction). Timing
Most cinematics time their events with WAITS. Tho it might seem handy to use this at the time it is VERY inaccurate and will differ on each computer. Even gametime waits dont work well. You have two options in this case: Use a periodic timer to run events (this is hard, and therefore Anitarf has created a system based on this, with ALOT of good stuff in it, I suggest taking a look at it Cinematic System) or use timers. This will make your cinematic have ALOT of different triggers but the increase in accurate timing is definately worth it. Another possibility is the use of the event "elapsed game time" which is also accurate. Last words
I hope you found usefull stuff in this tricks tutorial. If you have questions about a certain subject, just make a new thread, dont ask in this one. If you have got more tricks to share please share here (i will add them to this list of tricks). |
| 04-08-2006, 02:43 PM | #2 |
Great! I think this should have been in the "--Submit a Tutorial--" section though... |
| 04-08-2006, 02:56 PM | #3 |
its not really a tutorial, more like general tips/tricks, so I dont think so. |
| 04-08-2006, 03:46 PM | #4 |
Well my 'tips' topics got relocated there too :(. This is a tutorial AFAIK. |
| 04-08-2006, 06:12 PM | #5 |
That thing about the lighting models... I love you for it. You are a genius. |
| 05-28-2006, 04:40 AM | #6 |
The light thing is awesome, but is it possible to change ONLY the Night ambient light or ONLY the day ambient light? Also, does anyone know what the default models are and where to find them? |
| 05-28-2006, 09:44 AM | #7 | |
Quote:
The normal models can be found in: Environment\DNC\ Each tileset has its own model. |
| 05-28-2006, 10:02 PM | #8 |
This is really useful. I found some useful things that were new to me, too, although I think I'm a quiet experienced cinematic maker. I think it's very nice of you Infrane, that you are so open with your technical secrets of cinematic-making and present them to anybody who wants to know something about them! That's not the case with everybody if I think about this thing called map-protection... |
| 05-29-2006, 07:29 AM | #9 |
Notice that he waited until after he won the cinematic contest to tell us this stuff :P Anyway, cheers, now i can just alter the base one in MDL to make night combat a reality! Woo! |
| 01-01-2007, 09:16 PM | #10 |
I noticed the links for the Light model creators have perished... Can someone please post it somewhere else, or refer me to a place where I can get either of them? Edit: Don't feel like posting again. Merci Beacoup! |
| 01-01-2007, 10:00 PM | #11 | |
Quote:
Here they are. |
| 07-16-2007, 12:48 AM | #12 |
I know this is a 1+year post, however Infrane, the LightModelCreator is not working, and the error "Component 'comdlg32.ocx' or one of its dependencies not correctly registered: a file is missing or invalid" - any ideas on fixes? |
| 04-08-2008, 04:35 AM | #13 |
hmmm. the jass specific animation is surprisingly simple. ill try this out. if all goes well.. |
| 08-18-2008, 02:51 PM | #14 | |
Quote:
|
