Difference between revisions of "Max:Basic Material Animation"

(Change categories.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Wikify}}
+
{{Tutorial|Basic Material Animation|Max}}
 +
The purpose of this tutorial is to help you implement basic animation as a texture layer using the [[MOULa 3DSMax Plugin]] in your Ages. This process can be observed in MO:ULa when water bodies come into contact with solid objects, as the water can be seen rippling near the edges of said objects; the same technique is used for waterfall texture animations.
  
This tutorial will show you how to do a basic animation for a texture layer. You see this in MOUL:a as the water ripples next to the edges of objects in and around the water. This is also how the waterfall textures are animated.
+
Please note that this is but one of many animation techniques. It is used throughout MO:ULa, providing Eder Gira with a night and day version, Gahreesen with a flashing door light, and so on.
  
However, please note, there are MANY, MANY different ways to animate your Materials. This is also used throughout MOUL:a, it's what helps give Eder Gira a night and day, the door light that flashes in Gahreesen, etc, etc. I'm not going to cover all those in this tutorial, as one could write a whole book on how to do all these things.
+
== Prerequisites ==
 +
It is assumed you know how to set up the Cyan Plugin for use in Max and that you are ready for Age Creation. It also assumes that you know you must attach the PageInfo component to your objects. Lastly, it assumes you know how to apply a Plasma Standard material and textures to your objects as well as how to UV Map them.
  
But this will get you started in animating your materials.
+
=== Tutorials ===
 +
You will need to have read and understood the following tutorials:
 +
* [[Max:Getting Started]]
 +
* [[Max:Materials and UV Editing]]
  
This tutorial assumes that you know how to set up the Cyan Plugin for use in Max, and that you've set up for Age Creation. It also assumes that you know you must attach the PageInfo component to your objects. And last, it assumes you know how to apply a Plasma Standard material and textures to your objects and UV Map them. If you don't know how to do these things, then you need to go read those tutorials first.
+
== Getting Started ==
 +
For the animation of a texture such as "Water Ripples" or "Waterfalls", all that is needed is to have the UV coordinated that have been mapped to the texture offset themselves.
  
----
+
=== Preparation ===
 +
[[File:KIimage0080.jpg|thumb|right|160px|The "well" model used for this tutorial.]]You will evidently require a model to work with for your animations. For this tutorial, we will be using a simple-looking well for demonstration purposes with a mesh added that has a "water" texture for the surface of the well's water. A mesh has also been added just above the water mesh.
  
 +
'''NOTE:''' in this case, the water is ''NOT'' a waveset. Just like the small puddles in Er'cana, not all of your water will be a waveset. However, you ''CAN'' have ripples for waveset water too, and not just shore foam.
  
===Getting Started......===
+
Note before proceeding that, in the picture provided here, you can look through the "ripples" mesh straight to the bottom of the well. In other words, wherever the ripple mesh is, the water mesh's texture appears to be gone. This is because the Plasma game engine is a bit confused as to how to handle the transparencies of both textures when one mesh is over another mesh; it needs to be explicitly told what to do. Whereas in Blender, something called "Passindex" is used, in Max, you will use something called "No Z Write":
 +
# Open the Material Editor.
 +
# Select the Material assigned to your Ripple mesh.
 +
# Open up the roll out box called "[[Media:NoZWrite.jpg|Advanced Parameters]]".
 +
# Under "Z Properties" box, check the "Z No Write" box. Ignore the warning at the top (Cyan uses these settings for such animations).
 +
Now the two textures will render correctly under Plasma.
  
Animation of a texture such as Water Ripples or Waterfalls, we are simply having the UV coordinates that we mapped our texture with offset themselves. The direction that the texture moves will depend on how we mapped the UV faces, and what offsets we use.
+
'''NOTE:''' this tutorial's model uses Cyan's ripple texture here for the tutorial. You will need to make your own ripple textures (one suggested technique is to create a texture with a transparent background and spray paint some wavy white lines onto it).
  
First we need something to work with. I made a simple looking well, added a mesh that has a "water" texture that's the surface of my water ('''NOTE:''' In this case, the water is NOT a waveset. Just like the small puddles in Er'cana, not all of your water will be a waveset. However you CAN have ripples for waveset water too, not just shore foam).
+
=== Animating ===
I also then made a mesh that is located just above the water mesh:
+
Now that the ripples mesh with its material and texture applied and correctly UV mapped, the actual process of animating them can begin.
 +
# Tell the unwrapping tool to "Flatten" your faces.
 +
# Select one of the faces and make it a full square on your texture.
 +
# Select "Copy" for that face, select the other faces and click on "Paste".
 +
# Make sure your Ripple mesh is [[Media:Animtextmax2.jpg|selected]].
 +
# Call up its Material.
 +
# Select the layer that is your ripple texture (the picture provided here demonstrates for the Alpha Blend texture). You will be using the "Coordinates" roll out box for what follows.
 +
# Go down in Max where the Animation Controls are and where Keys are set.
 +
# Click on the [[Media:Animtextmax3.jpg|Keys Filter]].
 +
# In [[Media:Animtextmax6.jpg|the little box that appears]], remove all the checks and make sure a checkmark is applied where it reads Materials.
 +
# Click on the Set Key box in order to start setting the Keys for your texture's animation.
 +
# Go to the animation timeline bar and make sure it is sitting at [[Media:Animtextmax5.jpg|frame 0]]
 +
# Go back to the [[Media:Animtextmax7.jpg|Material Editor]] and make sure your U and V coordinates for Offset are both set to '''0.0'''. Note the little red brackets. Each of the things they surround represent items you can animate. This tutorial will limit itself to UV Offsets for now.
 +
# Go back down and click on the [[Media:Animtextmax4.jpg|button]] with the picture of a key on it. Doing so will set the first Key at frame 0.
 +
# You should now see the [[Media:Animtextmax9.jpg|Key marker]] in the time line, and it should be at frame 0.
 +
# [[Media:Animtextmax10.jpg|Move your timeline bar]] to the next frame you will set a key at (your choice). Default setting for Max: 30 frames equals 1 second. Moving it to frame 45 (1.5 seconds) seems to work well with ripples. If you have a texture that you need to appear to move faster, you would set the key to a lower frame number, and vice versa. '''Note:''' in Max, once the keys have been set, the animation player at the bottom of Max can be used to watch the current animations in real time.
 +
# Go back up to the Material Edit and to the [[Media:Animtextmax11.jpg|Coordinate roll out box]]. The offsets need to be changed. Once more, what you change them to, and which one you change, will depend upon what you are doing and how you mapped your texture. Changing either setting to 1.0 will be like scrolling the texture fully, which is the desired effect. In Max, the U coordinate is the same as the X coordinate in Blender and the V the same as the Y. Because of how the ripple texture was UV Mapped, you'll want to scroll it fully along the V coordinate. So the offset is changed to 1.0 there.
 +
# Go back down and click on the Key button to set the key at this frame. The animation will now play when you move your timeline back and forth, or should you press the "Play" button on your animation player. However, you still need to let the material know WHEN to play this animation.
 +
# Under Material Editor, make sure you are in the Material and not the Plasma Layer. Look for a roll out box labelled "[[Media:Animtextmax12.jpg|Animation Parameters]]".
 +
# Put check marks next to "Autoplay" and "Loop".
 +
Your animation is now complete. No extra Plasma Components need to be attached to this kind of animation, unlike other types of texture animations (e.g. a flashing symbol for a player when they get close to the object, which would involve a sensor region and a trigger to play the texture animation only when the avatar enters the sensor region).
  
[[File:KIimage0080.jpg]]
+
=== End Result ===
 
+
The end result for the tutorial's example can be viewed here:
Now, before we go any further, I'd like to point something out. If you look at the picture above, you'll see that it appears you can look through the "ripples" mesh straight to the bottom of the well. In other words, where ever my ripple mesh is, the water mesh's texture appears to be gone.
+
 
+
This is because the Plasma game engine is a bit confused as to how to handle the transparencies of both textures when one mesh is over another mesh. We need to tell it what to do. In Blender and the GoW Plugin, we used something called "Passindex".
+
In Max with the Cyan plugin, you are going to use something called "No Z Write"
+
 
+
Open up your Material Editor and call up the Material you assigned to your Ripple mesh. Open up the roll out box called "Advanced Parameters"
+
 
+
[[File:NoZWrite.jpg]]
+
 
+
In the box that says "Z Properties" place a check where it says "Z No Write" (yes, I know what it says at the top of the box, but Cyan does uses these settings with things).
+
 
+
That's all you have to do. Now Plasma will render the two textures (your water and your ripples) correctly.
+
 
+
Moving along now....
+
 
+
So here I have my ripples mesh with the material and texture applied, and UV Mapped correctly. For ripples like this, the way you want to UV map it, is by telling the unwrapping tool to "Flatten" your faces. Then select one of the faces and make it a full square on your texture. Then select "Copy" for that face, select the other faces and click on "Paste". All the other faces will line up with the first face.
+
 
+
Note: I'm using Cyan's ripple texture here for the tutorial. You'll need to make you're own ripple texture (a texture with a transparent background, and spray paint some wavy white lines on to it works pretty good).
+
 
+
Make sure you have your Ripple mesh selected and call up it's Material. Then select the layer that is your ripple texture (in the pic below, I accidently have the Alpha Blend texture called up, oops):
+
 
+
[[File:Animtextmax2.jpg]]
+
 
+
We are going to be using the "Coordinates" roll out box for this.
+
 
+
Next, go down in Max, where our Animation Controls are, and where we set Keys. Click on the Keys Filter box:
+
 
+
[[File:Animtextmax3.jpg]]
+
 
+
This will call up a little box, remove all the checks and make sure you have a checkmark where it says Materials.
+
 
+
Then click on the Set Keys box so we can start setting the Keys for our texture animation:
+
 
+
[[File:Animtextmax4.jpg]]
+
 
+
Go to the animation time line bar. Make sure you have it sitting at frame 0:
+
 
+
[[File:Animtextmax6.jpg]]
+
 
+
Now go back to the Material Editor and make sure your U and V coordinates for Offset are both set to 0.0
+
 
+
[[File:Animtextmax5.jpg]]
+
 
+
Note how you have those little red brackets around things. Each of these are things you can animate. For now, we're just going to mess with the UV Offsets.
+
 
+
Now go down and click on the button with the picture of a key on it. This will set our first Key at frame 0
+
 
+
[[File:Animtextmax7.jpg]]
+
 
+
You should see the Key marker in the time line, and it should be at frame 0
+
 
+
[[File:Animtextmax8.jpg]]
+
 
+
Now you need to move your time line bar to the next frame that you're going to set a key at. Where you move this to is going to be up to you. Default setting for Max is: 30 frames equals 1 second. I've found that moving it to frame 45 (1.5 seconds) works well with ripples. If you have a texture that you need to appear to move faster, you would set the key to a lower frame number. If you need the texture to appear to move slower, you'd use a higher frame number.
+
One thing to remember here: in max, once you've set your keys, you can use the animation player at the bottom of Max to watch your animation. It will play it in real time, so you'll be able to see if you have your timing set right.
+
 
+
[[File:Animtextmax9.jpg]]
+
 
+
Now go back up to the Material Edit to the Coordinate roll out box. You need to change your offsets. Now, again, what you change them to, and which one you change will depend upon what you are doing, and how you mapped your texture.
+
Changing either setting to 1.0 will be like scrolling the texture fully. This is what you will want to do. In Max, the U coordinate is the same as the X coordinate in Blender. The V coordinate is like the Y coordinate in Blender.
+
Because of how I UV Mapped my ripple texture, I want to scroll it fully along the V coordinate. So I change the offset to 1.0 there.
+
 
+
[[File:Animtextmax10.jpg]]
+
 
+
Once you've set your offset, go back down and click on the Key button to set the key at this frame:
+
 
+
[[File:Animtextmax11.jpg]]
+
 
+
There you go! Now you can either move the time line bar back and forth to see your texture move in the 3D window, or you can press the "Play" button on your animation player and see how it looks!
+
 
+
You're not quite done yet. You'll need to let the Material know WHEN to play this animation.
+
 
+
In your Material Editor, make sure you are now in the Material and not the Plasma Layer. Look for a roll out box that is called "Animation Parameters"
+
 
+
[[File:Animtextmax12.jpg]]
+
 
+
As I'm doing Ripples, I want the animation for them to start the moment a person links in. I also want the animation to play over and over. So I need to put check marks where it says "Autoplay" and "Loop"
+
 
+
Once you've done this. You are done! There are no extra Plasma Components to attach to this kind of animation. There will be other texture animations that you WILL have to have Plasma Components (like you want a symbol to flash at a player when they get close to it only.....you'd use a sensor region for that, and have the texture animation play only when triggered by the avatar entering the region sensor).
+
 
+
For now however, you have at least gotten started on how to animate a texture.
+
 
+
Here's a video of the result:
+
  
 
[http://www.youtube.com/watch?v=uQr0U2gqdVc Water Ripples Video]
 
[http://www.youtube.com/watch?v=uQr0U2gqdVc Water Ripples Video]
 
----
 
 
Return To: [[3DS Max and Plasma Plugin tutorials]]
 

Latest revision as of 14:09, 14 May 2012

Disambig gray.png

This is a tutorial page.Versions available: PyPRP; 3ds Max; Korman.
 

The purpose of this tutorial is to help you implement basic animation as a texture layer using the MOULa 3DSMax Plugin in your Ages. This process can be observed in MO:ULa when water bodies come into contact with solid objects, as the water can be seen rippling near the edges of said objects; the same technique is used for waterfall texture animations.

Please note that this is but one of many animation techniques. It is used throughout MO:ULa, providing Eder Gira with a night and day version, Gahreesen with a flashing door light, and so on.

Prerequisites

It is assumed you know how to set up the Cyan Plugin for use in Max and that you are ready for Age Creation. It also assumes that you know you must attach the PageInfo component to your objects. Lastly, it assumes you know how to apply a Plasma Standard material and textures to your objects as well as how to UV Map them.

Tutorials

You will need to have read and understood the following tutorials:

Getting Started

For the animation of a texture such as "Water Ripples" or "Waterfalls", all that is needed is to have the UV coordinated that have been mapped to the texture offset themselves.

Preparation

The "well" model used for this tutorial.
You will evidently require a model to work with for your animations. For this tutorial, we will be using a simple-looking well for demonstration purposes with a mesh added that has a "water" texture for the surface of the well's water. A mesh has also been added just above the water mesh.

NOTE: in this case, the water is NOT a waveset. Just like the small puddles in Er'cana, not all of your water will be a waveset. However, you CAN have ripples for waveset water too, and not just shore foam.

Note before proceeding that, in the picture provided here, you can look through the "ripples" mesh straight to the bottom of the well. In other words, wherever the ripple mesh is, the water mesh's texture appears to be gone. This is because the Plasma game engine is a bit confused as to how to handle the transparencies of both textures when one mesh is over another mesh; it needs to be explicitly told what to do. Whereas in Blender, something called "Passindex" is used, in Max, you will use something called "No Z Write":

  1. Open the Material Editor.
  2. Select the Material assigned to your Ripple mesh.
  3. Open up the roll out box called "Advanced Parameters".
  4. Under "Z Properties" box, check the "Z No Write" box. Ignore the warning at the top (Cyan uses these settings for such animations).

Now the two textures will render correctly under Plasma.

NOTE: this tutorial's model uses Cyan's ripple texture here for the tutorial. You will need to make your own ripple textures (one suggested technique is to create a texture with a transparent background and spray paint some wavy white lines onto it).

Animating

Now that the ripples mesh with its material and texture applied and correctly UV mapped, the actual process of animating them can begin.

  1. Tell the unwrapping tool to "Flatten" your faces.
  2. Select one of the faces and make it a full square on your texture.
  3. Select "Copy" for that face, select the other faces and click on "Paste".
  4. Make sure your Ripple mesh is selected.
  5. Call up its Material.
  6. Select the layer that is your ripple texture (the picture provided here demonstrates for the Alpha Blend texture). You will be using the "Coordinates" roll out box for what follows.
  7. Go down in Max where the Animation Controls are and where Keys are set.
  8. Click on the Keys Filter.
  9. In the little box that appears, remove all the checks and make sure a checkmark is applied where it reads Materials.
  10. Click on the Set Key box in order to start setting the Keys for your texture's animation.
  11. Go to the animation timeline bar and make sure it is sitting at frame 0
  12. Go back to the Material Editor and make sure your U and V coordinates for Offset are both set to 0.0. Note the little red brackets. Each of the things they surround represent items you can animate. This tutorial will limit itself to UV Offsets for now.
  13. Go back down and click on the button with the picture of a key on it. Doing so will set the first Key at frame 0.
  14. You should now see the Key marker in the time line, and it should be at frame 0.
  15. Move your timeline bar to the next frame you will set a key at (your choice). Default setting for Max: 30 frames equals 1 second. Moving it to frame 45 (1.5 seconds) seems to work well with ripples. If you have a texture that you need to appear to move faster, you would set the key to a lower frame number, and vice versa. Note: in Max, once the keys have been set, the animation player at the bottom of Max can be used to watch the current animations in real time.
  16. Go back up to the Material Edit and to the Coordinate roll out box. The offsets need to be changed. Once more, what you change them to, and which one you change, will depend upon what you are doing and how you mapped your texture. Changing either setting to 1.0 will be like scrolling the texture fully, which is the desired effect. In Max, the U coordinate is the same as the X coordinate in Blender and the V the same as the Y. Because of how the ripple texture was UV Mapped, you'll want to scroll it fully along the V coordinate. So the offset is changed to 1.0 there.
  17. Go back down and click on the Key button to set the key at this frame. The animation will now play when you move your timeline back and forth, or should you press the "Play" button on your animation player. However, you still need to let the material know WHEN to play this animation.
  18. Under Material Editor, make sure you are in the Material and not the Plasma Layer. Look for a roll out box labelled "Animation Parameters".
  19. Put check marks next to "Autoplay" and "Loop".

Your animation is now complete. No extra Plasma Components need to be attached to this kind of animation, unlike other types of texture animations (e.g. a flashing symbol for a player when they get close to the object, which would involve a sensor region and a trigger to play the texture animation only when the avatar enters the sensor region).

End Result

The end result for the tutorial's example can be viewed here:

Water Ripples Video