MTM2.com

A forum for mtm2 discussion
FAQ :: Search :: Members :: Groups :: Register
Login
It is currently Thu Mar 28, 2024 8:43 am



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Environment Mapping ?
PostPosted: Tue Aug 13, 2002 9:38 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 19
<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 Notes on truck .BIN models by Drive2Survive <HR></BLOCKQUOTE>

The above paragraph prompted me to enquire further of D2S.

Quote:
[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)


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?

Enviro-test truck

Ideas?



<font size=1>Edited by Phineus (07-12-2002)</font>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 14, 2002 2:25 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


------------------
<IMG SRC="http://www.smp-creations.50megs.com/mouse2tm.gif" border=0>

SMP-Creation's


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 14, 2002 3:30 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.

Reflections.jpg


"what's wrong with the faces on the truck?"

nothing as far as I can see.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 14, 2002 4:58 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 19
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.

Pic 1 - 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.

Pic 2 - 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.

Pic 3 - 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 (Pic 4). 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 ?



<font size=1>Edited by Phineus (07-12-2002)</font>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 15, 2002 1:02 pm 
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:
http://mtmx.cjb.net/~d2s/binedit/tute/images/falcon_djv8c.jpg

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 reflects 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...

------------------
Look, when I say things like that, what I obviously meant was "I'm an idiot, don't listen to me"...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 17, 2002 9:46 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 19
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. Pic. 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.


<font size=1>Edited by Phineus (07-12-2002)</font>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 19, 2002 4:27 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 19
>>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.


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


Who is online

Users browsing this forum: No registered users and 7 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group