MTM2.com

A forum for mtm2 discussion
FAQ :: Search :: Members :: Groups :: Register
Login
It is currently Thu Nov 21, 2024 9:57 pm



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Repost : Environment Mapping ? (this was a fun one ;-)
PostPosted: Sun Dec 14, 2003 2:18 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>A truck maker also has to be mindful of the "1000 vertex limit". Basically what happens here is that most 3D-accelerator hardware cannot create the nice shiny faces on models whose vertex count is higher than 1000; instead you get an error about being unable to environment map the model, and the game crashes. Making the faces look shiny is called "environment mapping". This is because the game takes the truck, looks at the environment (ie track) it is in, then makes the truck's faces shiny according to the direction of the light source and makes them reflective according to the terrain they are facing at the time.

- from <a href="http://cownap.com/~d2s/binedit/tute/bined_tute2b1.html" target="_blank">Notes on truck .BIN models</a> by Drive2Survive <HR></BLOCKQUOTE>

The above paragraph prompted me to enquire further of D2S.

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>[Environment Mapping] probably means something closer to 'reflecting the environment onto the shiny surfaces of the truck' (which's something like you've got) or 'reflecting the shiny surfaces of the truck onto other reflective surfaces in the environment, such as water, that must, in turn, display these additional reflections' (which is just as likely the issue since it can reflect non reflective surfaces, otherwise it might be known as can't truck map environment) <HR></BLOCKQUOTE>

But all we have now are more questions than we had before.

Encouraged by evo2, I suspected it was the track reflected on the parts of a truck but I don't recall ever seeing something quite so clearly in mtm2. I set out to experiment. I made a box-like model and set it on wheels. Painted it the most chrome-like color I could find. Set all faces to shiny. And ran it in the game with graphic options on high. The aim was to try and create a mirror in/on the side of the box-model. The result was that the truck offers some shininess, and some reflection (but, of what, I'm not sure). Then I encountered a problem with the faces themselves. In an effort to eliminate visible seams on the truck, I remade three vert faces into four vert faces and lost shininess and reflection altogether. After long thought I have to wonder if binedit isn't messing with the face types somewhere along the line. But even this is unsure because some faces reflect and others don't. So, after all this, I'm still no closer to an answer. The question is, what does environment mapping mean in mtm2? and what part is played by a truck's shiny faces? And lastly, what's wrong with the faces on the test truck?

<a href="http://cownap.com/~forum/zips/EnviroTruckmtm2.zip" target="_self">Enviro-test truck</a>

Ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:19 am 
You Gonna Eat That?
User avatar

Joined: Tue Mar 27, 2001 2:01 pm
Posts: 923
Location: Nebraska
As everyone should know by now, I am as guilty as anyone could be for this situation, with some of my trucks. This is a topic that has been bugging me for awhile. I have never thought about it much, but I would like some more info about it. As far as the faces go, you can take a shiny model, and work with it till you get it how you like it, and just to add some realism to it, you flip all faces and insert it into itself, to create an inner skin. That all good and fine, but if the model is even at least a little detailed, you've just doubled the vert. and face count. In order to remedy this, you merge all close verts., soon as you do that, the black that you made the inner panels, has now "soaked" through the outside, and has made the outside dark and a dull color. That bugs me. So somewhere you you have to make compromises. I love realism, and it seems that as soon as I try to make a less detailed truck, someone always says... "You forgot this" "It's not accurate". I for one could care less what others think. But I hear it all the time from the kids, "Put the vert count for it in the read me, so we know if we can use it in drag leagues". I hate drag racing, more than Rumbles. So that is a non-issue with me, in fact, I'm glad no one uses my trucks for this. I'm straying from the point, but I can provide what info I can to help figure this out. I'd like some answers too.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:20 am 
Member
User avatar

Joined: Wed May 15, 2002 2:01 pm
Posts: 39
Location: Brampton, Ontario, Canada
I have noticed that when working in Binedit the light source is fixed within the environment and although you can rotate the model to see different angles, what your really doing is rotating the entire environment. The light source maintains the same point in space relative to the model. The light source does not cast shadows, so it is less than a prefect "sun" clone in its interaction with the environment. It also appears to be equal across the entire surface of the area being lit, so it is not in fact a point of light but more like a 'wall of light'.

The point to all this is that since the source of light seems to be "part" of the environment rather than independent from, and shining into, the environment. If this is so then its location (XYZ components) may become part of the coding when you create the first 2d surface. Since all 3d models are really lots of 2d surfaces put together, this "from birth" effect could very much affect how it looks and each surface interacts with the affect of the light source within the game. (It does not act much like the sun either by the way).

Think about how real world surfaces, painted or chrome, looks at Noon in bright light, at 3pm when the sun is hitting it at a different angle and 6pm when it is reflecting a relatively poor light source at yet a different angle again. What you're observing is the affect of the angle of the light source to the surface. (and also the amount of light too, but ignore this for the moment). If this angle were pre-determined when the surface was 'saved' during creation, then regardless of the angle from the 'sun' in the game, its shininess and reflectivity would be based on that pre-programmed angle. [By example: If a surface was created and saved with instructions that it is 'always' at 65 degrees to the sun, then regardless of what angle the sun really was to the surface or how bright the sun was, it would "always" reflect light and absorb light (these two would affect its brightness and its shininess) based on 65 degrees.]

Dam this is getting too deep for me. And I don't even want to get into the way the real world physics are distorted by the unreal world of 'game engines'.

I don't pretend to have a solution but perhaps this will give you a different way to think about the problem.

Mouse


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:21 am 
easy company
User avatar

Joined: Tue Feb 29, 2000 2:01 pm
Posts: 2036
far as I can tell environment mapping does nothing more than reflect the light source off the truck body.

truck reflections toggled on only gives us a more detailed "light" reflection.

to illustrate, I made a test track and took screen shots of a truck with the light source at all five positions, with reflections on, and off... the trucks are all facing north, and each shot is at the same distance, angle, and spot.

<A HREF="http://www.mtmc4fun.com/images/mtmg/Reflections.jpg" TARGET=_blank>Reflections.jpg</A>

<I>"what's wrong with the faces on the truck?"</I>

nothing as far as I can see.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:22 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
First: wow, great pic mal. That's a keeper for sure.

Then: indeed, this is an 'involved' topic. As for the light source in binedit, if I'm not mistaken that's on the todo list. Every generation of new technology sees improvements. I'm impressed by the evo2 model editor which allows you to move the light source on the fly. I actually think the best improvement between evo1 and evo2 is the editor. It would also be nice to get the moving light in the track editor (for mtm2). But anyway.

<a href="http://cownap.com/~forum/pics/envirotruck.jpg" target="_blank">Pic 1</a> - I tried to get a shot with the most reflective environment I could achieve. Using the test truck, I placed it in water. In the water reflection, we can see the terrain, start light, blimp, tires, and the sides and underneath of the truck. All of it, very clearly. Is this environment mapping? And whether or not it is, not much is reflected on the truck itself - even tho truck reflections are turned on.

<a href="http://cownap.com/~forum/pics/envirobigfoot.jpg" target="_blank">Pic 2</a> - I tried the same thing with a high vert truck. I used rep fan's bigfoot 14 with truck reflections turned off. Immediately we get the noah effect. That aside, the backdrop and sky are reflected fine in the water, as is the truck. This can't be environment mapping, can it? Despite the high vert count, it's reflected with remarkable clarity.

Warning: two large pics. You might want to right click and save as.

<a href="http://cownap.com/~forum/pics/envirotruck1.gif" target="_blank">Pic 3</a> - A three meg animated graphic that tries to show the reflections on the side of the truck as you pivot around it in chase view. All we see are squidgles. I resaved the same pic with lower color settings and it really highlights the meaninglessness of these squidgles (<a href="http://cownap.com/~forum/pics/envirotruck2.gif" target="_blank">Pic 4</a>). And it makes no difference if you locate the truck in the open, like this, or near a group of trees, or beside a billboard, or whatever. If this is environment mapping (i.e., reflections on the truck), then I really have to wonder what all the fusss and bother is about.

My apologies for the size of those last two pics but I didn't know how else to show what I was trying to say here. And it is this view that I was trying to get when I created the test truck in the first place. If truck reflections mean anything, then, at least in theory anyway, these reflections should have more substance than what we're seeing. After all, if shininess is the only issue, Mal's pic shows that we get some of that regardless of whether or not reflections are turned on in the game. Just not as pronounced when they're off.

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>"what's wrong with the faces on the truck?"

nothing as far as I can see.<HR></BLOCKQUOTE>

I'll continue with this later. For now, who's up next ?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:23 am 
Member
User avatar

Joined: Fri May 04, 2001 2:01 pm
Posts: 495
Location: Bathurst, NSW, Australia
The thing that made me wonder was the fact that most, if not all, games only seem to do shininess and reflections by means of a bitmap.

For instance:

<A HREF="http://cownap.com/~d2s/binedit/tute/images/falcon_djv8c.jpg" TARGET=_blank>http://cownap.com/~d2s/binedit/tute/images/falcon_djv8c.jpg</A>

The car looks shiny, it looks reflective... but look hard, and you see it's not really reflecting the world around it all. Check other games, like NFS, and you see that they use a similar technique. With later games it's become less noticeable, but I haven't seen many example (well, none come to mind at all really) of a player avatar reflecting the environment. If MTM2 did do this, then that would make it a very special case indeed!

Water is the only place that actually <i>reflects</i> what's around it. I would surmise that this is because the water is a flat plane, so it's easy to do the computation for making a mirror image of the scene. Also, when I first played the game under 3D acceleration with night settings, I was at first confused by what I saw as the headlights going funny when near water - I later realised that they programmed the light beams to bounce off the water too! So doing stuff with water is fairly easy, if you accept your water is flat.

On the other hand, a truck (or vehicle in another game) can have hundreds (or thousands) of vertices, and hence hundreds (or thousands) of faces, all of different shapes and angles. Doing the computation to map and reflect the surrounding terrain would be an enormous task, and would severely cut into the computing power that could be better used for other areas. So the shortcut is just to map a generic reflection bitmap onto the truck. Easy and stress-free in terms of processing to do, and after all, when you look at a real vehicle, you don't usually notice the reflections of the surrounds unless you're looking for it, so noone complains...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:24 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
Okay, I am really disappointed here. I thought for sure that evo2 had reflection on the truck the same way the mtm2 water reflects. But it doesn't look like it. <a href="http://cownap.com/~forum/pics/envirotruckevo.jpg" target="_blank">Pic</a>. Too bad too. D2S, I think you're right on the money with the bmp'd reflection. One thing the evo pic gives is a clearer indication of what those squidgles are: Looks like trees up on the hill. Just about the same shape as the mtm2 markings. But the camera angle belies that, and the fact that the markings are the same no matter where you are. Makes me wonder what all that environment mapping error nonsense is about...

But all is not lost. I've learned, if nobody else has, or maybe I'm the last to learn, that truck reflections aren't worth the fuss and bother. From now on I think I'll make it a blanket policy to recommend turning them off. They contribute nothing in appearance and risk errors and the noah effect.

Thanks all. At least now I/we have a better idea.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:25 am 
You Gonna Eat That?
User avatar

Joined: Tue Mar 27, 2001 2:01 pm
Posts: 923
Location: Nebraska
Well at least you tried to figure it out Phin. I don't really see what all the fuss about Reflections is anyway. The only thing I can see it would be good for, is to take some good looking screenshots. But I know some people actually drive with a different cam view, like Chase Near or Far. I for one always race from the Cockpit View. But to each his own I guess. It would be nice if MTM2 had the same graphics or game engine as NFS, those cars have thousands of vert's, and they have an excellent mirror shine on all the cars. This game is pretty old, but I still like it, and probably always will.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:27 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
>>Well at least you tried to figure it out Phin.

Actually, I think we did pretty good. I guess the biggest disappointment is that I allowed myself to be taken in by the reflection gimmickry. No doubt the mtm2 water played a role in that, but still... I should know better.

>>The only thing I can see it would be good for, is to take some good looking screenshots.

LOL, I've taken a few of those. Right Mal?

>>It would be nice if MTM2 had the same graphics or game engine as NFS

Do you have a good, reflective pic? As far as I've been able to tell, tho I'm prolly not the most objective person on this topic, but mtm2 has nothing to be ashamed of.

>>This game is pretty old, but I still like it, and probably always will.

This latest experiment has given me new and re-new'd respect for mtm2. I always imagined evo2 had better graphics. But I think I'm mistaken there too. It only has better art work. The viewing distance is lower, and that haze taints even the art. In the clarity of mtm2, the art work stands out brilliantly. It's almost wasted in evo.

[ Postscript ] Gee, I wonder why this one never converted to the new forum, lol.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2003 2:50 am 
Member
User avatar

Joined: Wed Nov 06, 2002 2:01 pm
Posts: 881
Location: Silicon Valley, California. USA
The truck reflection effect in MTM2 has never impressed me, and since turning off truck reflections allows you to make trucks larger than 1000 vertices, mine is always OFF anyway.


I don't think the graphics in MTM2 is better, due to the 8-bit 256 color limitation.....many EVO textures I have converted to MTM2 tend to look strange, as the transitions from one shade to another becomes much more pronounced......The trucks are also at the mercy of the tracks color pallette, so that a truck made to show one color on a stock track may look different when run on a custom track with it's own color pallette.

For example, here's FTR_Jeff's newest scratch-built Avalanche:

Image


....and heres a rough conversion to MTM2 8-bit textures. (reflections-OFF)

Image

I can make the details sharper by using multiple body RAWs rather then the single 256x256 raw I usedfor the visual test, but it won't help the color.

_________________
--> "Obstacles are those frightful things you see when you take your eyes off your goals." -- Henry Ford


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 20, 2003 9:35 pm 
Member

Joined: Thu Jul 24, 2003 7:23 pm
Posts: 6
Most games with reflections convince us with fixed position bitmaps, or other types of images, that seem to rotate when the object turns. Though recently, new games do have 'real-time' reflections, that reflect the world around to precision. Some of these include Max Payne 2 (just the mirrors in the bathrooms, basically), True Crime: Streets of LA, and the GTA pack for XBox.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group