PDA

View Full Version : Let's talk about changing textures/Visions



LennardF1989
12-17-2007, 01:45 PM
Hi all,

With Project Stealth we want to implent a Thermal Vision within our game.
I suppose most people know how a Thermal Vision looks like.

Well, to begin with, we thought that chanching materials for everything could be a possible solution (since the Engine is quite fast). Although changing materials for StaticMeshes and such isn't a problem (SetSkin, SetMaterial, etc.), it is for brushes (the BSP level stuff). Could someone explain to me how to change the materials of brushes that are around a player? Is this even possible?

I know it might sound insane, but don't think about any possible problems yet ;)

Though, if someone knows a way better solution to implent this kind of thing, then be my guest and tell me! :)
Please note, we do not want the player running around in a level to be seen through walls.

We want everything "cold" to be displayed like a ghost on the players screen (eg. walls, floors, dead pawns), while everything thats "hot" will be yellow/red on the screen (moving players, weapons etc.).

Mr Evil
12-17-2007, 01:49 PM
Can you do this with postprocessing?

LennardF1989
12-17-2007, 01:54 PM
Can you do this with postprocessing?

I tried, but I can't make walls look like ghosts with it, and it will make everything look like one color. Though, we will use PP for a noise effect.

I would love something cody though :P

Edit: Here's a nice example of what I would like: http://image.com.com/gamespot/images/2005/024/reviews/924556_20050125_embed002.jpg
As you can see, the Pawn is "hot" whiel other stuff are mostly "cold", but you can still see the shape of a level, which makes it possible to walk through it while the vision is activated.

If someone could put me on the right track to make something look like that, I would be very pleased :D

JaFO
12-17-2007, 01:55 PM
Indeed ... I was thinking that post-processing might be the solution.
Consider that all that 'bloom'-effect really does is enhance shadows and highlights.
It kind of looks like a starligh/nightvision if you look at levels where they've over-done the effect (complete with the blinding effect if you look at bright areas).

Perhaps you could fake thermal-vision by combining that with a properly calibrated team-shader effect ?

LennardF1989
12-17-2007, 02:01 PM
Indeed ... I was thinking that post-processing might be the solution.
Consider that all that 'bloom'-effect really does is enhance shadows and highlights.
It kind of looks like a starligh/nightvision if you look at levels where they've over-done the effect (complete with the blinding effect if you look at bright areas).

Perhaps you could fake thermal-vision by combining that with a properly calibrated team-shader effect ?

That still leaves the question, how to "ghost" the walls, since changing pawn material to a "hot" material isn't soo hard todo. I looked on the internet whole day, but all I found was a topic on 3D buzz describing something for Ut2003 (it is completely useless though).

Btw. The vision still has to show depth, but no detailed textures, cold things should be 2-colored.

Edit: Are there any PP Tutorials?

Tonester
12-17-2007, 03:13 PM
I haven't put much thought into it or tried anything like this at all, but does the material editor have some way to impliment if/then statements based upon pawn/world vars? If so, you could just tell the materials to render differently depending on some var that is set for each pawn/camera/whatever.

Shambler
12-17-2007, 03:16 PM
As far as I can tell, you can't get direct access to the materials on a brush; it isn't exposed to UScript, so you will have to find some other way of getting this to work.

JaFO
12-17-2007, 04:30 PM
I wonder if it is possible to build a material that effectively is 'transparent' to the player whenever the player is has a certain item active.

Look at these tutorials :
http://www.hourences.com/book/tutorialsue3mated.htm

Tonester
12-18-2007, 01:54 AM
yeah, that is what I was kind of referring to. the materials editor has pretty good support for conditionals. Just need to find conditionals that are accessible per player/var.

JaFO
12-18-2007, 03:49 PM
There may be another (if hideously complicated) way to get the effect.

AFAIK there was a CTF-map for UT2kx that managed to show 'ghosts' of the enemy team on your side of the base and vice versa (I think it was by Angelmapper, but I can't remember the name of the map it was a good/evil-mirror universe IIRC).

You could use a similar technique with the main difference being that only those players with 'thermal vision' are somehow allowed to switch their viewpoint to the other half of the map.

Xyx
12-20-2007, 02:52 PM
UT2004's particles had a ZTest property that controlled whether the particle gets drawn on top of everything else on your canvas. Mostly useful for displaying HUD indicators using particles. Would that help?