Go Back   Epic Games Forums > Unreal Tournament 3 > User Maps & Mods

Reply
 
Thread Tools Display Modes
Old 05-28-2009, 11:02 PM   #1
Spoondog
Senior Member
 
Join Date: Aug 2006
Location: New Zealand
Posts: 273
Service (PC) "Necrify" Effect Tutorial/Explanation

As promised, I've made a couple of example levels for anyone wanting to understand how I made the "Necrify" Effect for CDOM-CBP3-Enslaved.

I've basically cleaned up the material expressions and grouped them so that they are easier to look at and figure out. I'll explain it a bit here but not in great detail. You should hopefully be able to figure it out from these maps. This tutorial does assume that you are reasonably familiar with kismet, materials etc... it's not really suitable for novices.

Download: necrify_examples_dom.zip

Extract the levels to your Unpublished\CookedPC\CustomMaps dir.

PART A

1. Open the first map - "DM-NecrifyExample1_DOM.ut3".

2. First off, just try playing the map from the editor. You start off on a platform where you can see all three "DOM Points", and you can use the three triggers in front of you to Necrify/Un-Necrify each point, or you can jump down and trigger the points by walking into them.

3. Back in the editor, open Kismet. Note that basically the only things in here are 3 matinees (the other stuff is just to trigger them off for testing purposes). Double click on the first matinee to open the matinee editor. Note how you can preview the effect by moving the matinee timeline slider back and forth. Also note the single matinee track - it expands the Necrify effect outward from the point.

4. In the Generic Browser, navigate to the DM-NecrifyExample1_DOM package and open the material "Necrify_Base_MAT". This is the material that other materials in the level are instanced from. The effect is created with a Lerp between the "Standard" material, and the "Necris" material (but in this example, I've just used simple colors to demonstrate). The complicated part lies in the mask for this Lerp. No maths lesson from me but basically, each point's XYZ location is set as a vector in the material, and the "max radius" you want the necrify effect to be is set as the alpha channel for that vector. There is a multiplier for each point called "RadiusMultiplyPointX". This is the multiplier that the matinee controls. If it is 0, then the Necrify effect doesn't appear. If it is -1.0 then the Necrify effect/mask will be at it's max radius (the one you set in the alpha channel for that point's vector). There is also some noise applied to the edges of the mask so that it appears "wobbly" (I wanted it to fade out but couldn't think of a non-expensive way). Anyway, the three masks for each point are multiplied together to create one big world-aligned mask that defines where the Necris parts are, and where the standard parts are.

5. Open the Material Instance "Necrify_Base_MAT_INST". This is the instance that will have its parameters changed by the matinee. All of the materials you apply to your level will be an instance of this instance (that means, when this instance changes, then so do all the ones that are based off it). It has a few parameters you can play with:


RadiusMultiplyPointA - Controlled by the matinee, the multiplier for the size of point A.
RadiusMultiplyPointB - Controlled by the matinee, the multiplier for the size of point B.
RadiusMultiplyPointC - Controlled by the matinee, the multiplier for the size of point C.
NoiseTiling - The size of the "waves" on the edge of the effect.
NoiseStrength - The amplitude of the "waves" on the edge of the effect.
NoiseSpeed - How fast the "waves" on the edge of the effect move.

PointA - The location of point A.
PointB - The location of point B.
PointC - The location of point C.

Note that the PointA, PointB, PointC vectors in the example are set to the XYZ location of the "DOM Points" in the level (the triggers). These should be set in this material instance and never changed, unless you change the location of your DOM points.

RadiusMultiplyPointA, B, C shouldn't be changed, as the matinee controls their values anyway.

You can play with the noise settings to get the desired shape of your effect.

PART B

1. Open the second map - "DM-NecrifyExample2_DOM.ut3". In this one, the material is more like the finished effect, and shows how multiple materials are used (and you can copy paste it and use it as a template if you want to implement this effect - it should have everything you need).

2. Try playing this map from the editor. It works the same as the first map.

3. Back in the editor, open Kismet. Still the only things in here are the 3 matinees. Double click on the first matinee to open the matinee editor. Note the matinee now has 3 tracks - the additional two are for controlling the emissive edge color and whether it is on or off.

4. In the Generic Browser, navigate to the DM-NecrifyExample2_DOM package and open the material "Necrify_Base_MAT". Notice this one is a bit more complicated, but it's more complicated than it looks. It's the same as before, but with two main differences: 1. It has a few different Lerps for Diffuse, Specular, Normal etc (though all are controlled by the same mask, like before); 2. It has an additional part added to the mask which is just for the bright glowing edge effect (it's not important to know how it works, it's just some maths!). There are parameters for the standard and Necris versions of each component of the material.

5. Open the Material Instance "Necrify_Base_MAT_INST". Again, this is the instance that will have its parameters changed by the matinee. All of the materials applied in the level are an instance of this instance. It has a few parameters you can play with, but again the only ones you really want to touch in this material instance are NoiseTiling, NoiseStrength, NoiseSpeed, PointA, PointB, PointC.

6. Open the Material Instance "Necrify_Example_Changer_01_INST". This is the material instance that is applied to the floor of the level. The parameters that you want to change here are:

DiffuseTexture - The diffuse texture to use for the "standard" material.
DiffuseTextureNecris - The diffuse texture to use for the "Necris" material.
NormalTexture - The normal map texture to use for the "standard" material.
NormalTextureNecris - The normal map texture to use for the "Necris" material.
DetailNormalTexture - The normal map texture to use as a detail texture (you could change the material to have one for Necris and one for Standard, but it shouldn't be necessary and the material is already expensive enough.

SpecularMultiply - Multiplier for the specular channel of the "standard" material (specular is just a multiplied version of the diffuse texture).
SpecularMultiplyNecris - Multiplier for the specular channel of the "Necris" material.
SpecularPower - Specular power channel for the "standard" material.
SpecularPowerNecris - Specular power channel for the "Necris" material.

Remember the matinee doesn't do anything to this material instance - it changes the instance that this instance comes from!

7. Open the Material Instance "Necrify_Example_Changer_02_INST". This is the material instance that is applied to the boxes in the level. Notice how it just has different textures applied - the rest is the same as the other instance example, in this case.


Notes

  • So that's basically it. You just create your level like you would normally, using standard Epic textures, and then afterwards, for each material in your level you create an instance from the base "changer" instance, and set the textures that is uses in there.
  • There WILL be some exceptions - some stock Epic materials are quite complex, and use overlays and things like that. For these you will need to basically copy the Epic material and create a one-off material, copying the "mask" expressions from your base material and using them to Lerp the Epic expressions (it's hard to explain but most should know what I mean). Water is a good example - it has a distortion channel so you'll need to create a one-off material for that. Then you need to create an instance off it just so it can be changed, add a MaterialInstanceActor to your level and point it to that instance, then make an object variable in kismet and hook it up to your matinees. For an example of these one-off materials, you can see CDOM-CBP3-Enslaved (when CBP3 v3 is released). I had to make quite a few exceptions for that one.
  • This material doesn't really work on terrain unfortunately. Weird things seemed to happen like alpha layers all mixing up... and even if it did work, there are too many textures - you can only have 12 textures in a single terrain sector, so you'd only be able to have 1-2 layers. For the terrain I created a DecalMaterial version of the changing material, and added a decal at the DOM point that only affects terrain. It doesn't look as good, because it's modulated, but it was OK.
  • You will need to create a fallback for the material (and any one-off materials you create), which is basically a version that doesn't have this effect ) i.e. you delete the whole mask section and just have a normal material, like the standard Epic one. So anyone that's silly enough to play on a PC that requires these fallback materials just doesn't see the effect.
  • I am making a CTF version of the material at the moment, so stand by for that. It shouldn't need to be so complicated and hopefully won't need the fallbacks... might also fade out. WAR is a bit more difficult. The DOM version would work but it would end up being far too expensive for a WAR map with more than two nodes. I'll see if I can think of something involving matinee a bit more.
  • Oh yea - that's another thing - kismet isn't that reliable. It sometimes breaks, especially when you try to do lots at once. I tried to make it as robust as possible but due to the fast nature of DOM gameplay it can still, very rarely, break.
  • Big props to Zoltan Erdokovy (Metaball) - he came up with the maths behind this spherical mask. If I had not asked him, then it would not spread nicely up vertical surfaces etc like it does now - the mask would have probably been just a world aligned "flat disc".

Last edited by Spoondog; 06-19-2009 at 09:31 PM. Reason: remove ps3 icon
Spoondog is offline   Reply With Quote
Old 05-28-2009, 11:52 PM   #2
Vicious3745
Senior Member
 
Vicious3745's Avatar
 
Join Date: Nov 2008
Posts: 414
Default

This is fantastic, thank you So much for this!
__________________
Check out my latest Work:
Hang 'Em High [PC]
Kaufman Overpass [PC]
Vicious3745 is offline   Reply With Quote
Old 05-29-2009, 01:27 AM   #3
L1A
Member
 
Join Date: Apr 2009
Posts: 57
Default

I ****ing love that effect you threw on Enslaved. The electrical effect that goes along with the necrify effect makes it look epic in addition to the necris spines.
L1A is offline   Reply With Quote
Old 05-29-2009, 01:54 AM   #4
Cosmix
Senior Member
 
Cosmix's Avatar
 
Join Date: Jul 2006
Posts: 284
Default

Nice tutorial. Thx!
__________________
____Cosmix________________________________________
Cosmix is offline   Reply With Quote
Old 05-29-2009, 10:42 AM   #5
Cr4zyB4st4rd
Senior Member
 
Cr4zyB4st4rd's Avatar
 
Join Date: Dec 2007
Location: UK
Posts: 1,349
Default

Quote:
WAR is a bit more difficult. The DOM version would work but it would end up being far too expensive for a WAR map with more than two nodes.
Damnit!

Nah i might give it a shot on this current WIP war map, 4 nodes total. See if i can modify it to work well.

I had a look at it in Enslaved after searching the MSUC site ;x The one thing i didnt get then was the world co-ordinates but thats solved now.

Thanks Spoon
__________________
UT3 Nick - Cr4zy.jW - Admin for Multiplay|Epic
-- Homepage -- HOLP --
-- WAR-Valley -- vCTF-Defection_SE -- WAR-Downtown_Necris 2.0 -- DM-Restrict -- DM-Faze -- DM-Z -- WAR-Flux --
-- My Tutorials --
Creating a MiniMap for UT3 WAR and vCTF -- Setting up a Warfare Map
Cr4zyB4st4rd is offline   Reply With Quote
Old 05-29-2009, 01:18 PM   #6
*il_beppe*
Senior Member
 
Join Date: Jan 2007
Location: Milano - Italy
Posts: 139
Send a message via MSN to *il_beppe*
Default

thanks for sharing.
*il_beppe* is offline   Reply With Quote
Old 05-30-2009, 01:50 PM   #7
stevelois
Senior Member
 
Join Date: Mar 2007
Location: French Canadian, Montreal
Posts: 3,245
Default

Hey Spoon

That effect is very impressive

THX a lot for sharing this info & to provide very good example with the included maps
stevelois is offline   Reply With Quote
Old 05-30-2009, 10:17 PM   #8
crazyfingers
Senior Member
 
Join Date: Apr 2009
Location: San Diego
Posts: 204
Default

little over my head, but good stuff. I never knew the mat editor could be used to adjust a texture's location in the world.
crazyfingers is offline   Reply With Quote
Old 06-02-2009, 03:28 AM   #9
Vicious3745
Senior Member
 
Vicious3745's Avatar
 
Join Date: Nov 2008
Posts: 414
Default

This needs to stay on the front page xD
__________________
Check out my latest Work:
Hang 'Em High [PC]
Kaufman Overpass [PC]
Vicious3745 is offline   Reply With Quote
Old 06-04-2009, 02:49 PM   #10
ZixXer
Senior Member
 
ZixXer's Avatar
 
Join Date: Sep 2007
Location: Netherlands
Posts: 338
Send a message via MSN to ZixXer
Default

Now you are using a world X Y Z to make it apear on that spot, but is there also a way to make that world X Y Z the players position, only the player itself or all the players.

because the map i am making would look so mutch more kick ass if i had that effect. (not necri)
__________________
TriggerHappy!
Maps that I made, Some require a MOD te be downloaded.
Forum^: Download: PC/PS3 DM-Focus-SE
Forum^: Download: PC/PS3 CTF4-AnubisResurrection
Forum^: Download: PC/PS3 DM-Xiao
Forum^: Download: PC/PS3 DOM-Contrast + MOD Domination
Forum^: Download: PC/PS3 RenX-Islands + MOD RenegadeX
Mess with the best! Die like the rest! Boom HčadShøt!
ZixXer is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Video Game Voters Network
 
All times are GMT -4. The time now is 03:27 PM.


Powered by vBulletin
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2009-2010 Epic Games, Inc. All Rights Reserved.