February 7, 2011

UDK Fluid Surface Actor Tutorial

I have been working on my senior project tonight, but I'm gonna switch gears and write a tutorial concerning the work I have been doing for my prototyping team. So here is a tutorial on the Fluid Surface Actor in UDK.

First off, what is it? Well essentially it is a plane with a large number of divisions which is designed to behave like the surface of a liquid, hence the name. This actor reacts by creating deformations in it's geometry which appear as ripples when the player enters it, weapons fire through it, or the Fluid Surface Influence Actor has an effect on it, but we will get to that later. Its time to get started!

First start by making a simple environment.  I simply created a hollow block of BSP with a light and it's walls textured with one of the materials from UDK's default packages. Open up the generic browser and go to the actor classes tab. Expand the Fluid menu option and select the FluidSurfaceActor. Now go back into your level and right click in your level and select add FluidSurfaceActor Here. The actor will appear with the default checker texture.

Now nobody wants to see that checkerboard texture, so lets make a simple material to spice it up. Lets make something that reflects the environment and also has a panning water texture on it to give it the appearance of flowing water. First we will need to set up reflection. Go into the generic browser and pull up the actor classes tab. Find and select the SceneCaptureCubeMapActor under the Uncategorized menu option. Go back into your level, right click and add SceneCaptureCubeMapActor Here, on the Fluid Surface actor. Its going to look like a sphere.

Now back into the generic browser. Within your package right click in an empty space and select new RenderTextureTargetCube. Give it a name and while you still have it selected go back into your level and select the Cube Map actor and open it's properties by pressing F4. Expand the Scene Capture Actor and then expand capture. At the top you will see Texture Target. To it's right click the green arrow the points to the left. That will assign the render texture target cube. At this point the cube should reflect the world around it in a chrome like fashion. If it isn't reflecting enough of the level you can open up the cube map actor's properties to fix that. Adjust the value for the far plane to the unreal units of the farthest item you want reflected. Also, be sure to enable post process, and select SceneCapView_LitNoShadows as the view mode.

Now its time to make that material. While in the generic browser with the RenderTextureTargetCube selected create a new material. When the material editor opens up hold T and left click in an open space to drop the texture sample into the editor. Also be sure to set the material mode to Translucent. This will give the water a level of opacity that you can control. Now drop in a constant by holding 1 and left click. Give the constant a value of 1.5. Now drop in a multiply by holding M and left clicking. Plug the Texture sample and the constant into the multiply. Plug the result from the multiply into the diffuse. You'll get an error but we'll fix that right now.

Now add a refection vector as well as a component mask. On the mask be sure to enable R,G and B. Plug the reflection vector into the component mask. Now plug the component mask into the uvs of the texture sample and there goes the error.

Go ahead and drop in a constant of .75 and plug that into the opacity.

Almost done with the material :)

Search for the Fluid Normal and drop that in. Plug it directly into the normal. This will help smooth out your ripples for a more realistic look. Now add a Multiply along with a constant of 50. Plug the Fluid Normal into the Multiply as well as the constant of 50. Plug the result of the Multiply into the distortion. This will help distort the reflection as a ripple passes through it. Be sure to go back to the main material properties and select Use One Layer Distortion under translucency.

Now you need a seamless tileable water texture. You can use this one or one of your own.


Once you have your texture it import it into your package. Back in the material editor with your water texture selected drop it into your material editor. Now let's make this water flow. Drop a panner in behind the water texture and plug it into the uvs. You will have to play with the values to determine which way you want your water to flow. Now dependent on the size of the fluid surface actor and whatever texture you happened to use you may need to increase or decrease the tiling of that water. If necessary drop a texcoord node in behind the panner and plug that into the panner. Play with the values to get the tiling you need.

Now to make it all work together Drop in a multiply. Go to the diffuse input, right click and break the link. Take the output of the multiply from the reflection and the plug that into the multiply you just made. Plug the output of the water texture into the same multiplier. Now all you have to do is plug that output into the diffuse. Now you should have a panning water texture over a reflective surface that reacts to all sorts of stimuli.

From here just apply the material to the Fluid surface actor and we can really get cooking.In order to put the finishing touches on this we need to make more than just the texture move. We will add some FluidSurfaceInfluence actors.

Go in the generic browser and find the actor underneath fluid and drop it in to a part of the water. Now there are 4 different options that I'll go over briefly to finish this up.

Fluid Flow does exactly what it says. Mess with the settings and get an effect you want.

Fluid Raindrops again does exactly as it says. Mess with those settings to get anything from light rain to a heavy localized downpour as if from a waterfall.

Fluid Wave creates an up and down motion of the water with a wave radiating outwards as per your instructions.

Fluid Sphere is really interesting to me.  It creates either a depression or rise in the water based on your settings. Great in combination with the other actors to create rapids.

Use these different actors together in different combinations to make all sorts of great effects.

One final word for those of you planning to use this as a large surface in a bigger level. Go into the Fluid Surface actor's properties and increase the values of Detail Resolution as well as Detail size to be sure that your water's deformation is visible from a greater distance.

I may make a video tutorial to accompany this, if I have time.

January 26, 2011

Photos at the San Diego Symphony

I recently got the chance to get a private tour of the San Diego Symphony. This offered me the chance to take photos of details that would be helpful as reference material.

There are going to be tons of these in the scene. I liked the end piece's ornamentals.

Even the EXIT signs were very intricate. If I have time I'd love to do this in Z-Brush





There is a lot more but these were just some details I liked and felt like sharing. I'll have to block out the actual architectural structure of the space in UDK a little later.

January 15, 2011

Undead Requiem Concept Book

I found my USB stick with my concepts. This is definitely not my strong suit, but hopefully this conveys the idea I'm working on.

 I can't take credit for this awesome illustration. If I can find the author's name again I will credit them here.

 This is the basic layout of the theater floor and stage.

 This is the paint over I made of the image I posted earlier. The idea I'm trying to convey here is that the survivors are using what they found in the theater as part of their defensive strategy. The music pit has been booby trapped with sharpened bits of the fallen lighting rig. The remains of the Romeo and Juliet stage are  part of their final fall back position as they retreat to the more heavily fortified box seats. In the foreground you can see a watch position that surveys the living area below.

 This is a very simple block out of the space.

 Some prop concepts.

 The Romeo & Juliet set on the ruined stage.

I'll be visiting the San Diego Symphony for a guided tour on Friday to take reference photos. Also, I have heard of an old theater that is for sale in the El Cajon area so I'll see if I can check that out for reference material too.

January 12, 2011

Senior Project Elevator Pitch

The basic concept for my senior project is a play on the zombie apocalypse scenario. The setting is a long abandoned theater somewhere in the southern United States. A small resistance group has chosen to fight the coming horde of zombies rather than evacuate. To this end they choose to use the local theater as a defensible position from which they can fight.


 This is the original image I used. I will replace it with my concept when I find my USB

I used this image as my main inspiration. I really like the layout and composition. Personally, I like the scale, but I have been cautioned by some that it may be a tad ambitious. For the duration of this quarter I'm aiming to complete the stage as well as all of the assets on it.

Ultimately I'd like to make this a playable level. I'm familiar with UDK but I'm interested in building the level in the Hammer editor as a level for Left 4 Dead or Left 4 Dead 2.  But that would require me to learn an entirely new engine so I'm a bit apprehensive about it.

I think the project would lend itself to the finale segment of one of the L4D campaigns. The survivors aren't going anywhere really, instead they are holding their ground against a massive onslaught.

New year, new opportunities

At the encouragement of one of my professors I'm making this blog as a way to keep myself motivated and to give myself some perspective as I work on my senior project. But I figure I can use it for other projects as well. In the coming weeks I'll be making updates and reflecting on my work.  Any feedback you can give is greatly appreciated!