Environment mapping dts models
by Benjamin Wilson · in General Discussion · 01/14/2003 (8:53 am) · 9 replies
Hi all,
I've gotten environment mapping to work on models to reflect a texture I choose.
1) For a particular level, how do I produce the correct environment map?
2) Is there a way to reflect objects not originally in the map? (Ex. DTS model walks up to a mirror and now the mirror reflects him.)
Thanks,
Ben
I've gotten environment mapping to work on models to reflect a texture I choose.
1) For a particular level, how do I produce the correct environment map?
2) Is there a way to reflect objects not originally in the map? (Ex. DTS model walks up to a mirror and now the mirror reflects him.)
Thanks,
Ben
#2
everything is set up correctly and the player and vehicle
models that come with head are environment mapping for me,
but my own models will not in the same code setting.
I've been spending hours trying to determine what i'm doing wrong
in max.
anyway, to do the mirror trick, you'd be better off looking into
portals in the scenegraph to do what you want rather than
using environment mapping.
02/27/2003 (11:33 pm)
help! how did you get your models to emap... i still can'teverything is set up correctly and the player and vehicle
models that come with head are environment mapping for me,
but my own models will not in the same code setting.
I've been spending hours trying to determine what i'm doing wrong
in max.
anyway, to do the mirror trick, you'd be better off looking into
portals in the scenegraph to do what you want rather than
using environment mapping.
#3
03/03/2003 (2:33 am)
how did you do that mirror thing you said?
#4
03/05/2003 (7:29 pm)
i haven't done it myself, but i'm fairly sure that the scengraph portions of torque should be able to do mirrors that reflect objects by using portals. look around the forums for info on portals maybe.
#5
Create a copy of the file I want to emap. Now I grayscale that puppy, or actually colorize with a saturation of 0. Now I have a grayscale to work with. The "whiter" a section, the more "mirror-like" it becomes. The "blacker" the less reflective.
Now I create a mask off of this new image, and save it to alpha channel. In the original image... the one you actually want to use, create a mask from alpha channel, and use the channel you created in the other image. Now save THAT mask to an alpha channel within the skin, and then delete the mask, do NOT merge it with the image, just delete it outright.
Now when you save the image as a *.png, you will have a proper alpha channel to utilize emaps. Incidentally, the emap is derived from the sky texture, so unless you want special things, like ground/ terrain reflections, there's no more work involved.
Also, and this is just a note to MilkShape Users, but one of the sliders (specular I think) controls the reflective nature of the model as a whole. If this setting is not set properly (and it is just an on/ off type thing) then nothing on the model will emap at all. When set properly, the alpha channel now gets read by the engine.
Hope this helps...
03/06/2003 (7:36 am)
Emaps can be implemented very easily. First you have to have an image with an alpha channel. I am a PSP user, so here's what I do.Create a copy of the file I want to emap. Now I grayscale that puppy, or actually colorize with a saturation of 0. Now I have a grayscale to work with. The "whiter" a section, the more "mirror-like" it becomes. The "blacker" the less reflective.
Now I create a mask off of this new image, and save it to alpha channel. In the original image... the one you actually want to use, create a mask from alpha channel, and use the channel you created in the other image. Now save THAT mask to an alpha channel within the skin, and then delete the mask, do NOT merge it with the image, just delete it outright.
Now when you save the image as a *.png, you will have a proper alpha channel to utilize emaps. Incidentally, the emap is derived from the sky texture, so unless you want special things, like ground/ terrain reflections, there's no more work involved.
Also, and this is just a note to MilkShape Users, but one of the sliders (specular I think) controls the reflective nature of the model as a whole. If this setting is not set properly (and it is just an on/ off type thing) then nothing on the model will emap at all. When set properly, the alpha channel now gets read by the engine.
Hope this helps...
#6
03/06/2003 (11:18 pm)
when I make a weapon emapped, it only chnages whne the model animation does and not when i turn around etc... is this due to the offset?
#7
03/06/2003 (11:32 pm)
emaps are based off of your camera view's rotation relative to the object... since the view weapon model rotates with your character , you won't see it change.
#8
Does anyone know how to change this?
So if i have a emap on my gun and move, the emap changes?
03/11/2004 (3:11 am)
Quote:emaps are based off of your camera view's rotation relative to the object...
Does anyone know how to change this?
So if i have a emap on my gun and move, the emap changes?
James "Nycto" Frasca
As far as mirrors, I don't believe this is currently possible.