ShootersForever.com Forum Index

GoldenEye 007 Nintendo 64 Community, GoldenEye X, Nintendo 64 Games Discussion
GoldenEye Cheats, GoldenEye X Codes, Tips, Help, Nintendo 64 Gaming Community


How to - Env Mapping

 
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Q-Lab Hacking Department
View previous topic :: View next topic  
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6124

 PostPosted: Mon Dec 26, 2011 2:40 pm    Post subject: How to - Env Mapping Reply with quote Back to top

This has been requested often and now you can do it! For reference, env mapping is a technique used to simulate reflections off a surface, such as glass or metal. The N64/GoldenEye supports spherical environment mapping.

Here are steps, probably a bigger tutorial will follow later, along with Edit Model tutorial. GoldenEye only for now (well it might work PD too, just not got it working successfully)

1) For the env mapped section of your model, make sure the texture is an env mapping texture (such as image 0295 9A9CE0w20h200xC7COLORS.bmp - gold or 028E 9A8D3AOther38366D.bmp - glass). Don't bother changing u,vs or shading, they are ignored in env mapping. Also make sure the name of the material includes (if your modeller doesn't export the material names right you will need to fix manually) the words EnvMappingTexScaleS0.03TexScaleT0.03 for Gold and EnvMappingTexScaleS0.057TexScaleT0.057 for glass (you can play around with values, or for custom ones).
2) Export model to obj
3) Resave all bitmaps in output folder to 8-bit using a program (otherwise crash modelling tool, inexplicably) such as paint.net
4) Import model in anim8or tool (http://www.anim8or.com/) 0.97 by:
File->New
Object-Import, switch to obj, and import your obj. Note that group names are ignored, so if you had secondaries you will need to manually separate later.
5) Click the little circle with four small circles icon, rotate using mouse, then find your object. Double click it. Change angle to 91. Hit OK.
6) Object->Export, switch combo to obj, and save obj
7) Now import as normal in edit model tools or rooms. You may need manual tweaks to obj/mtl to add secondary back in.
Cool Note that the faces will look like they're crazily shaded in editor (env map is not shown), but this is because the RGB holds the normals for env mapping.

If you are curious the following material name (or as part of bitmap name also works are supported), which can be combined:
Transparent (black = transparent)
CullBoth (cull both sides, well, more accurately it will show triangle from both directions, not just the front)
MipMap (if specified, these are mipmapped, and ones not specified will not - recommended to not use this keyword)
TexScaleSX.XXX (where X.XXX is a floating point, texture scaling, must be between 0 and 1, used for env mapping)
TexScaleTX.XXX (where X.XXX is a floating point, texture scaling, must be between 0 and 1, used for env mapping)
EnvMapping - Turn on Env Mapping for material


Probably other modellers support a way to make normals not 0 degrees, please inform me if so, but this is only way I've found so far.

Examples



Your mesh must be connected that is being env mapped, if it is not the normals will be incorrect from anim8or.

You cannot use alpha. If you want to use alpha, there is only default glass alpha which is done by deleting manually all B9/FC commands from RoomIndices.bin and RoomIndices2.bin and the FB commands. In most cases, glass should be in secondary so that it is shown both sides properly.


Last edited by SubDrag on Wed Jan 11, 2012 9:33 pm; edited 2 times in total
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6124

 PostPosted: Tue Dec 27, 2011 12:16 am    Post subject: Reply with quote Back to top

It's not looking as good in PD, not sure why, but it seems to work in principle. Perhaps it's the way PD does RGBs special or the way I do it special, maybe not handling it right

Last edited by SubDrag on Fri Feb 22, 2013 6:03 pm; edited 1 time in total
 
View user's profile Send private message
radorn
007
007


Joined: 23 Sep 2007
Posts: 1424

 PostPosted: Tue Dec 27, 2011 5:20 am    Post subject: Reply with quote Back to top

Some internals for those curious about them

GE/PD format geometry consists of vertices and indices files.
vertices file contains vertice definitions, which contain it's coords in 3d space, the UV texture coords and RGBA shading.

in normal (non env) mapping, UV coordinates are used to position the texture in the tri and RGBA values "paint" that vertice.
but when environment mapping is activated, UV coordinates found in the file are no use, as they are static (which is why they are zeroed in original models). instead, RGB (without A, apparently) are used as part of the input of an algorithm that calculates new UVs in real time (each frame) for the verteices using RGB as what seem to be altered vertex normals AND the angle between the viewer and that normal to calculate new UVs for the affected vertices during that particular frame.
 
View user's profile Send private message
Dragonsbrethren
Hacker
Hacker


Joined: 23 Mar 2007
Posts: 3058

 PostPosted: Sun Jan 08, 2012 12:01 pm    Post subject: Reply with quote Back to top

Really nice to see this supported. (On an unrelated note, this mapping was one of the things I used to think really make GE and PD stand out over FPS games on PCs at the time; I can't think of any game that did anything similar on the PC until after PD was out.)
 
View user's profile Send private message
Dragonsbrethren
Hacker
Hacker


Joined: 23 Mar 2007
Posts: 3058

 PostPosted: Fri Feb 22, 2013 3:10 pm    Post subject: Reply with quote Back to top

Might play around with this a bit. Do we need to include "EnvMappingTexScaleS0.057TexScaleT0.057" in our materials if we're using the stock envmap textures? If so, where in the filename does it go?

(I know I said I wasn't interested in working on backgrounds/models anymore, but ehh, inspiration struck.)


Last edited by Dragonsbrethren on Fri Feb 22, 2013 8:05 pm; edited 1 time in total
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6124

 PostPosted: Fri Feb 22, 2013 3:22 pm    Post subject: Reply with quote Back to top

Yes. Anywhere in bitmap filename or material name. GE only pd seems to do environment mapping differently. The zoom does depend on texture. Use rares values.
 
View user's profile Send private message
Dragonsbrethren
Hacker
Hacker


Joined: 23 Mar 2007
Posts: 3058

 PostPosted: Fri Feb 22, 2013 3:28 pm    Post subject: Reply with quote Back to top

Ah, damn, I was hoping to do it for PD. Thanks for the quick answer.
 
View user's profile Send private message
Wreck
Administrator
Administrator


Joined: 14 Dec 2005
Posts: 7198
Location: Ontario, Canada

 PostPosted: Fri Feb 22, 2013 6:52 pm    Post subject: Reply with quote Back to top

It seems like PD does do something differently with the environment mapping, and Zoinkity has gone into some detail elsewhere. But it appears as though props are the same between games. I had to convert the eye from Bunker's main control room into a prop, and set some of the special glass window bitflags on the object in order to get it to display properly. The weapon models (like Cougar and special PP7s) look fine in your hand, but are screwy in the inventory screen. Backgrounds also have some issues. You should still be able to have environment mapped things in PD, but you're better off making them into props and placing them in the background in a setup file.
_________________

YOUTUBE | FACEBOOK | VAULT | MOD DB | RHDN
 
View user's profile Send private message Visit poster's website
SATURN_81
00 Agent
00 Agent


Joined: 06 Jun 2010
Posts: 423
Location: spain

 PostPosted: Fri Feb 22, 2013 7:35 pm    Post subject: Reply with quote Back to top

once applied the texture of golden guns GE Falcon2 Weapons and CMP150 and the result is impressive. they look great when you hold the gun in your hand, but do not look so good when these weapons are down or see them in the menu. anyway this texture also try to apply it to the Magnum PD and could not. however apply CMP150 black texture on a Magnum and it worked.

the funny thing is that when you try to change the color of the texture editor does not recognize it despite having the same name or change the accepted but then the game does not appear.

I like this kind of textures with effects like eg reflectivity or any other effects may also like it. know how many effects you have practiced with different reflectivity editor?
 
View user's profile Send private message MSN Messenger
Dragonsbrethren
Hacker
Hacker


Joined: 23 Mar 2007
Posts: 3058

 PostPosted: Fri Feb 22, 2013 8:15 pm    Post subject: Reply with quote Back to top

Wreck wrote:
You should still be able to have environment mapped things in PD, but you're better off making them into props and placing them in the background in a setup file.

Unfortunately, I don't think that's really practical for what I had in mind. I'm going to have to find another suitable texture to use, for the time being at least. Not a big deal, I just figured some excessive shininess would make it look more like an authentic PD level.
 
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Q-Lab Hacking Department All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

Cobalt 2.0 BB theme/template by Jakob Persson.
Copyright © 2002-2004 Jakob Persson


Powered by BB © 01, 02 BB Group

 


Please Visit My Other Sites: GoldenEyeForever.com | GrandTheftAutoForever.com

Got kids? Check out my Dora The Explorer site with games and coloring pages!

Our forums feature Nintendo 64 games, GoldenEye 007 N64 New Maps and Missions, GoldenEye Cheats, N64 Emulator, Gameshark, GoldenEye Multiplayer and more!

[ Privacy Policy ]