Important! Please read the announcement at http://myst.dustbird.net/uru-account.htm
Also! Please read the retirement announcement at http://myst.dustbird.net/uru-retirement.htm

Difference between revisions of "Using The Details Feature"

From UamWiki
(Created page with '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. Thi…')
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
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.
+
Okay, so you're making your age, and are having a great time. You've got some cliffs, or a large wall, or a wide open ground, or even all of those.
  
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.
+
You texture them....and hit a problem!
  
But this will get you started in animating your materials.
+
If you UV map the texture so that it looks good from far away......it looks all blurry and smeared up close!
  
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.
+
[[File:KIimage0018.jpg]]
  
----
+
[[File:KIimage0019.jpg]]
  
 +
If you UV map it so it looks good up close, you have a very tiled looking object from far away!
  
===Getting Started......===
+
HELP!
  
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.
+
You go to Uru, and you link into places like Er'cana. You don't see that problem there. Like here on the cliffs in the canyon. They look good from afar, and keep looking good the closer you get!
  
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).
+
[[File:KIimage0043-1.jpg]]
I also then made a mesh that is located just above the water mesh:
 
  
[[File:KIimage0080.jpg]]
+
[[File:KIimage0044-1.jpg]]
  
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.
+
[[File:KIimage0045.jpg]]
  
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".
+
And when you go to the Cleft, the desert floor there has a lot of detail, but does not look tiled either! You even see mud cracks show up in places!
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:KIimage0046.jpg]]
  
[[File:NoZWrite.jpg]]
+
[[File:KIimage0047.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).
+
[[File:KIimage0049.jpg]]
  
That's all you have to do. Now Plasma will render the two textures (your water and your ripples) correctly.
+
So what is going on here? How did Cyan do this?
  
Moving along now....
+
They did this by using the "Detail" part of the material that you assign to your object.
  
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.
+
Basically, you have 2 textures, one that is the base texture that is UV mapped to look good from a distance, and another detailed texture, that has a alpha channel in it, that is the top layer texture of the material.
  
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).
+
From far away, the top texture is transparent. But as you get closer, it slowly becomes opaque until when you're very close, you see it, instead of the blurry base texture.
  
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):
+
I'll show you how to do that.
  
[[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:
+
===Getting Started......===
 
 
[[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]]
+
When you create your material for your object, you want to apply your base layer like you normally would. Use Plasma Standard as your material, and make your base layer the texture that the player will see from a distance:
  
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.
+
[[File:Details1.jpg]]
  
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
+
UV map it so it looks good from a distance:
  
[[File:Animtextmax7.jpg]]
+
[[File:Details2.jpg]]
  
You should see the Key marker in the time line, and it should be at frame 0
+
Now you want to go to the Top Layer (by putting a check mark next to it), and you want to use another texture. I would suggest a different texture, but most important is to use one that has a alpha channel in it (transparency).
  
[[File:Animtextmax8.jpg]]
+
Once you get your texture assigned, scroll down in that layer until you come to the box marked "Details"
  
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.
+
[[File:Details3.jpg]]
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]]
+
Make sure you place a check mark where it says: Use Detail
  
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.  
+
In the box that shows a person standing on one side, and mountains on the other, you'll see a blue line. This line represents how transparent the texture will be, based upon the distance that the player is from the object. You can see the numbers I'm using here, and they work good for me, but every situation is different and you may need to adjust these numbers to fit your needs.
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 have your detail numbers dialed in. You need to scroll up to the box called Coordinates. You need to adjust the numbers for the UV Tiling.
 +
Basically what you are doing here, is UV mapping this texture so that it is very tiled (you don't want to use the UV Editor, because that will mess up your UV mapping for the first texture).
  
Once you've set your offset, go back down and click on the Key button to set the key at this frame:
+
[[File:Details4.jpg]]
  
[[File:Animtextmax11.jpg]]
+
Again, these numbers will be something you'll want to play with. In my case setting them to 30 worked good. And as you can see, boy is that texture tiled!!!
  
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!
+
[[File:Details5.jpg]]
  
You're not quite done yet. You'll need to let the Material know WHEN to play this animation.
+
We do this because, we want the texture to look good when we get up close to the object.
  
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"
+
Now go back to your Material box and set the blending. I like to use Alpha, Multiply, None. You can mess with the middle one if you want, but the first one NEEDS to be Alpha, and I'd leave the base to None. Setting it to something else produces some weird effects for me.
  
[[File:Animtextmax12.jpg]]
+
[[File:Details6.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"
+
That's all there is too it. Export, and link in. You'll have to do this several times until you get how you want things to look right:
  
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).
+
[[File:KIimage0020.jpg]]
  
For now however, you have at least gotten started on how to animate a texture.
+
now up close:
  
Here's a video of the result:
+
[[File:KIimage0021.jpg]]
  
[http://www.youtube.com/watch?v=uQr0U2gqdVc Water Ripples Video]
 
  
 
----
 
----
  
 
Return To: [[Andy's Max Tutorials]]
 
Return To: [[Andy's Max Tutorials]]

Latest revision as of 01:07, 3 January 2011

Okay, so you're making your age, and are having a great time. You've got some cliffs, or a large wall, or a wide open ground, or even all of those.

You texture them....and hit a problem!

If you UV map the texture so that it looks good from far away......it looks all blurry and smeared up close!

KIimage0018.jpg

KIimage0019.jpg

If you UV map it so it looks good up close, you have a very tiled looking object from far away!

HELP!

You go to Uru, and you link into places like Er'cana. You don't see that problem there. Like here on the cliffs in the canyon. They look good from afar, and keep looking good the closer you get!

KIimage0043-1.jpg

KIimage0044-1.jpg

KIimage0045.jpg

And when you go to the Cleft, the desert floor there has a lot of detail, but does not look tiled either! You even see mud cracks show up in places!

KIimage0046.jpg

KIimage0047.jpg

KIimage0049.jpg

So what is going on here? How did Cyan do this?

They did this by using the "Detail" part of the material that you assign to your object.

Basically, you have 2 textures, one that is the base texture that is UV mapped to look good from a distance, and another detailed texture, that has a alpha channel in it, that is the top layer texture of the material.

From far away, the top texture is transparent. But as you get closer, it slowly becomes opaque until when you're very close, you see it, instead of the blurry base texture.

I'll show you how to do that.



Getting Started......

When you create your material for your object, you want to apply your base layer like you normally would. Use Plasma Standard as your material, and make your base layer the texture that the player will see from a distance:

Details1.jpg

UV map it so it looks good from a distance:

Details2.jpg

Now you want to go to the Top Layer (by putting a check mark next to it), and you want to use another texture. I would suggest a different texture, but most important is to use one that has a alpha channel in it (transparency).

Once you get your texture assigned, scroll down in that layer until you come to the box marked "Details"

Details3.jpg

Make sure you place a check mark where it says: Use Detail

In the box that shows a person standing on one side, and mountains on the other, you'll see a blue line. This line represents how transparent the texture will be, based upon the distance that the player is from the object. You can see the numbers I'm using here, and they work good for me, but every situation is different and you may need to adjust these numbers to fit your needs.

Once you have your detail numbers dialed in. You need to scroll up to the box called Coordinates. You need to adjust the numbers for the UV Tiling. Basically what you are doing here, is UV mapping this texture so that it is very tiled (you don't want to use the UV Editor, because that will mess up your UV mapping for the first texture).

Details4.jpg

Again, these numbers will be something you'll want to play with. In my case setting them to 30 worked good. And as you can see, boy is that texture tiled!!!

Details5.jpg

We do this because, we want the texture to look good when we get up close to the object.

Now go back to your Material box and set the blending. I like to use Alpha, Multiply, None. You can mess with the middle one if you want, but the first one NEEDS to be Alpha, and I'd leave the base to None. Setting it to something else produces some weird effects for me.

Details6.jpg

That's all there is too it. Export, and link in. You'll have to do this several times until you get how you want things to look right:

KIimage0020.jpg

now up close:

KIimage0021.jpg



Return To: Andy's Max Tutorials