OBWANDO@Posted: Fri Jan 28, 2005 11:23 pm :
I have read a ton of the tutorials in here, and the effort put forth by the people in here is fantastic. If there is another one of these in here, then I simply couldnt find it (and I spent quite a bit of time looking for it). There are a lot of tutorials on how to apply a material texture, blend / etc... but nothing that really helps in regards to applying special effects like adding a torch light, or a smoldering staff. So I figured I would throw my hat into the ring on what I have learned by tearing everything apart. It has worked for me, so here we go.

I am assuming you know how to work with meshes, export them, understand material files (but i will brush it some), and particles. If you dont, look at some of the tutorials around here, they are very good, and I dont want to irritate people by repeating their good work.

First, when you create a model (I used 3ds / ase) you need to look at what you are going to have do what. I created a torch that mounts on the wall for my Quake 1 conversion. Problem is that I want the torch to light and animate correctly. We know there are shaders and effects to do this, but figuring out how to get them to all tie together is another issue.

I will add pictures later on when I figure out how to post them.

When you create your model, name each object and group it so it will accept the texture you will be using for it. In this case, I called the base: "Torch", and the actual flame "WallTorch_Flame"

Now, this is important. your object that is going to be used to represent the point where the special effect is going to go must only have the texture on 1 side. Why?? Because it will cause doom 3 to put a copy of each effect on each side / plane like so (I pushed the particle +30 on z axis as an example but pay attention to the haze effect, its on the wrong axis):

Image

So if you use a cube, you will get 6 effects (below, top, left, right, front and back).

Image

If you draw a plane, you will get 2 sides.

Image

This is consistent with how you work with particles. I use 3ds, so I used the line tool, and drew a small box, and close it. Then I used the modifier 'Turn to Poly' to create a poly out of it. Once that was done, I had a 1 sided polygon.

Image

It is important that you point the face you want the effect to apply to in the correct direction.

Image

In this case, I pointed the face Z-UP. I painted a different texture onto that surface (doesnt really matter since you will be changing it anyways further below).

Image

Once done, I exported to .ase

Next, we need to check to see what we want to use for a special effect. I decided to use the Torso_Flame particle, but it was too big, so I made a few size adjustments, and all was well. I created a new particle called "WallTorchFlame". At this point, I need to make sure i'm cool with my material that will represent my effect. So I went into my material file and added a new entry:

Code:
models\Quake1\WallTorch
{
    diffusemap  models\Quake1\WallTorch.tga
    bumpmap     models\Quake1\WallTorch_local.tga
    specularmap models\Quake1\WallTorch_s.tga
}

models/Quake1/WallTorchFire
{
   noselfShadow
   noshadows   
   translucent
   deform particle2 walltorchflame
   {
         blend    add
         map models/Quake1/WallTorchFire
   }
}


Nothing earth shattering. This is the same as the torso material, just has my particle name in place.

Now we need to go into the .ase file and make some changes. Remember, I have 2 textures in my file that were assigned. The first is my metal effect for the base, second is the placeholder for my particle effect.

So I changed the first object in my .ase file from
Code:
*BITMAP "c:\games\sample\metal.jpg"
to
*BITMAP "\\purgatory\purgatory\base\models\quake1\WallTorch"


and the second item

Code:
*BITMAP "c:\games\sample\fire.jpg"
to
*BITMAP "\\purgatory\purgatory\base\models\Quake1\WallTorchFire"


Now, that I have those both in place, Fire up your doom 3, and test your model. "testmodel models/quake1/walltorch"

Image

If you use other packages, you get the idea. I hope this helps some, and I'll try to answer any questions if I can.

--OBWANDO



kat@Posted: Sat Jan 29, 2005 4:43 am :
Nice walk through. You might want to add an image or two of shots from 3DS so people can see what's going on from that point of view as well.



OBWANDO@Posted: Mon Jan 31, 2005 5:30 pm :
Couple of shots of the torch being used as a light.

Image

Also, depending on where you center your model will dictate where the light source's center will come from.

Image

--OBWANDO