Rhino Posted December 29, 2005 Report Share Posted December 29, 2005 (edited) First before you start this Tutorial you should have crated a basic map and have generated you Lightmaps. I've made this Tutorial by reading and trying to understand a few posts but by putting a load together i have finally got id and then thought i would make a detailed tutorial seeing that i could not find any By Generating your Envmaps you will get water that will look like normal BF2 water which will reflect from any angle and reflections off objects in your map like Sniper Scopes, Car mirrios, water puddles, ect. It also shows the reflection of hills and the terrain around where u generate the envmap in the water 8) 1. Open your map in the Level Editor in the BF2 Editor. Here is my map i made for this: http://img92.imageshack.us/img92/5474/untitled2ck7.jpg Notice the Hotel in the left sunk in the water, there is a reason for that which we will go into later 2. In the Resources box expand bf2>content>object>common> In the "common" folder you should see DefaultEvnMap Note. If you are making a map in a mod the "content" folder will be under your mod name. 4. Now lets drag and drop the first DefaultEvnMap into your map like you would to any other object. It looks rather much like a white cube, with 1 side which is very white and the other sides a ligth gray. You MUST make sure its ABOVE the water / terrain or its going to look really horribal! The first ENVmap I allways use as the ENVmap for the water reflections. So you will want to place this ENVmap somewhere in the middle of your sea / river so that you will get the terrain around your sea/river reflecting off it. So place it wiseley. As my map has a big island in the middle, i can only really place it on 1 side of the island to get the reflections of it. Now after you have placed your first ENVmap, you will want to maybe, but you do not have to, place more ENVmaps around so that when ppl walk around with the M24, they will see the refelction of the ENVmap they are closeest too. So if you are in a city, and u have a ENVmap in that city, they will see a refelction of the city around them in there scope, if they move out into the desert, and you have a ENV map in the desert aswell, when they get close to that desert ENVmap, they will see the desert in there scope. If you do not put a desert ENVmap out there, and you still have the 1 inside the city, they will still see the city in there sniper scope even thou they are way out in the desert. This is not a huge detail but every small detail counts so you choose, ENVmap files are not that big So now lets place our other ENVmaps around, to show you want i mean about the sniper scope refelctions, im going to put 1 ENVmap ontop of my island, and anouther on the hotel way out in the see ENVmap on the island: ENVmap on the Hotel: 5. Now that we have the DefaultEvnMap in your map you can now generate them. Go to the Compile>Envmaps>Generate Envmaps After u have clicked on Generate Envmaps you should see this bit of code in your output window which tells you it has compiled them. 6. Now Save your map and quit the editor 7. Now go to your Levels Folder in EA GAMESBattlefield 2modsbf2Levels*YOUR MAP* In there crate a folder called "water" Now go into your "Envmaps" Folder and copy the file called "EnvMap0.dds" (which is the ENVmap you did for your water refelctions) Paste that file in your water folder which you just crated. Now Rename "EnvMap0.dds" TO "EnvMap.dds" 8. Your done, now you should have ENVmaps in your map now Here is what your map should look like: what the water looks like before and what the water looks like After Also now i can show you what im on about with the sniper scope reflections in areas. The first pics is of the refelction i got when on the island: And the 2nd is of the pic i got when on the hotel roof. The pics aint grate as i didnt have fog and the outside terrain enabled which i would need to do to get my ENVmaps looking just right so bear thous things in mind when doing yours. Enable things like over and under growth and make sure its on detail texture mode and things like that to make them look as good as possibal Hope this helps (Last Updated: 18-7-06) Edited July 18, 2006 by Rhino Quote Link to comment Share on other sites More sharing options...
ArYeS Posted December 29, 2005 Report Share Posted December 29, 2005 Cool, this will help us a lot.. great job, Thanks! Quote Link to comment Share on other sites More sharing options...
Flubber Posted December 30, 2005 Report Share Posted December 30, 2005 TY Quote Link to comment Share on other sites More sharing options...
Bdbodger Posted December 30, 2005 Report Share Posted December 30, 2005 One thing if you drag it to your water it will snap to the terrain and be underwater so drag it up so that the cube is above the water Quote Link to comment Share on other sites More sharing options...
CheetahShrk Posted December 30, 2005 Report Share Posted December 30, 2005 Also env maps are needed for puddle effect on the terrian. Quote Link to comment Share on other sites More sharing options...
[RoK]LexLuther Posted December 30, 2005 Report Share Posted December 30, 2005 BF2 supports more than one evnmap, place as many as you'd like with in reason. If you have a city area make one there, one for forest, ect... o2car]This is how you do it:1. Place a DefaultEnvMap box in your level. [contentobjectscommon] 2. Run Compile>Envmaps>Generate Envmaps 3. Copy ...modsbf2LevelsYour_LevelEnvmapsEnvMap0.dds to ...modsbf2LevelsYour_LevelWaterEnvMap.dds (Note: You must rename it for it to work) They are separated so you can tweak the envmap for the water without changing the look of the cockpitglass. If you place several DefaultEnvMap boxes in your level, it will use the closest one when you move around. For example one placed in the desert and one in the city -> when you drive into the city, houses will be reflected in the glass and rearview mirrors instead of a desolated landscape. Quote Link to comment Share on other sites More sharing options...
PanCake404 Posted December 30, 2005 Report Share Posted December 30, 2005 Thanks Bra...Both ur tuts Worked for me. GJ Quote Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2005 Report Share Posted December 30, 2005 niice i guess thats all I need to know about lighting. Wondering if its possible to make bridge reflections look correct? mine drift off into the distance as i get closer under the bridge :> Quote Link to comment Share on other sites More sharing options...
a2k Posted March 6, 2006 Report Share Posted March 6, 2006 Hmmm... I'm assuming you also need to set up your static/bundle geometry to reflect the environment map. I couldn't get reflections to work on my bundledmesh that i'm using for my alpha transparent windows for my static model. I appreciate the tutorial regardless, but I hope someone has some clue as to how to set up bundle geometry to reflect the environment map. I have seen some flags that can be used for 3ds max, but the alpha||alphaenvmap flags do not directly translate into something that I can put into Maya. EDIT: I've tried alphaenvmap_<texture name> in Maya, and it "sorta" works. I don't see any real reflections, but it's behaving to the light correctly, at least Quote Link to comment Share on other sites More sharing options...
[BF:A] Croupier Posted March 6, 2006 Report Share Posted March 6, 2006 Hey a2k you can use rexmans bf2Materials.exe to change the technique. Shader: BundledMesh.fx Technique: AlphaEnvMap Type: 1 Texture: objects/vehicles/xpak_vehicles/xpak_common/glass_cracked_c.dds Texture: CommonTexturesSpecularLUT_pow36.dds Quote Link to comment Share on other sites More sharing options...
a2k Posted March 6, 2006 Report Share Posted March 6, 2006 hmm, I'm using Maya. (would rexman's tool work with maya as well?) Why is it that DICE used Maya to create the assets for this game, yet the support for max seems to be much better? Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted March 7, 2006 Report Share Posted March 7, 2006 Although Rexman's material tool comes with the 3DS tools, its a CLI program and works standalone. And Rexman is also the reason for the good 3DS support His tools and tutorials are really a great achievement... Quote Link to comment Share on other sites More sharing options...
uberduck13 Posted April 2, 2006 Report Share Posted April 2, 2006 when i put in like 9 different envmaps and i was wondering in my envmaps folder there is EnvMap0.dds all the way through EnvMap8.dds do i only copy the envmap0.dds or what do i name all the others? thanks Quote Link to comment Share on other sites More sharing options...
Rhino Posted April 2, 2006 Author Report Share Posted April 2, 2006 just copy 1 of them (the best 1 possibal that would repsent reflections in the water) and rename that 1 in the water folder. Quote Link to comment Share on other sites More sharing options...
uberduck13 Posted April 3, 2006 Report Share Posted April 3, 2006 k thank you ! Quote Link to comment Share on other sites More sharing options...
uberduck13 Posted April 3, 2006 Report Share Posted April 3, 2006 ive narrowed it down to two of them which looks better to you guys?! also is there a way to get the editor to load straight into bf2 mod? Quote Link to comment Share on other sites More sharing options...
uberduck13 Posted April 3, 2006 Report Share Posted April 3, 2006 hmmm i just generated again and now the trees arent showing up and their really poor quality i accidently clicked create default envmaps.... does this have anythign to do with it>? Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted April 3, 2006 Report Share Posted April 3, 2006 also is there a way to get the editor to load straight into bf2 mod? Yes Change your shortcut to the editor to read : "C:gamesBattlefield 2BF2Editor.exe" +loadMod XWW2 Adjust path and Mod, cause i don't think you have XWW2 running Its even possible to launch directly into a map: "C:gamesBattlefield 2BF2Editor.exe" +loadMod XWW2 +loadLevel XWW2_Bizerta Quote Link to comment Share on other sites More sharing options...
Rhino Posted April 3, 2006 Author Report Share Posted April 3, 2006 ]also is there a way to get the editor to load straight into bf2 mod? Yes Change your shortcut to the editor to read : "C:gamesBattlefield 2BF2Editor.exe" +loadMod XWW2 Adjust path and Mod, cause i don't think you have XWW2 running Its even possible to launch directly into a map: "C:gamesBattlefield 2BF2Editor.exe" +loadMod XWW2 +loadLevel XWW2_Bizerta ahh cool didnt know that 8) Quote Link to comment Share on other sites More sharing options...
uberduck13 Posted April 3, 2006 Report Share Posted April 3, 2006 wait hmm i dont know what i did wrong with the envmaps im gonna try and make them again cuz they are poor quality :? Quote Link to comment Share on other sites More sharing options...
uberduck13 Posted April 3, 2006 Report Share Posted April 3, 2006 see here is what they look liek now i have no clue what i did :evil: Quote Link to comment Share on other sites More sharing options...
[RoK]LexLuther Posted April 4, 2006 Report Share Posted April 4, 2006 k thank you ! Make sure to take an envmap over your water. Best to guess what the flow of players will be and get an envmap that will best match that path, it will look off in some places, but look great for players major path across your water. Quote Link to comment Share on other sites More sharing options...
[BF:A] Croupier Posted April 4, 2006 Report Share Posted April 4, 2006 Hey Lex you can make several envmaps for the one map, say you have a map with ocean, city/town and rural/farmland. You can drag say 3 envmap cubes into your map, position 1 over the water, 1 over the city/town and one over the farmland, generate the maps and test it out. Whatever envmap is closest to you in game will be the one that is reflected, that way the vehicles in the city will reflect buildings rather than tree's ect..... I dont know if there is a limit on the amount of envmaps but I have seen some Dice maps with at least 3. EDIT: I just read on page one that you said you can place more than 1, lol..... Quote Link to comment Share on other sites More sharing options...
[RoK]LexLuther Posted April 4, 2006 Report Share Posted April 4, 2006 Yeah, I haven't tried, but in theory maybe water could have more than one. It's not important for me right now as I have a lot on the plate, but the theory is if you see how the envmaps are read in game, namely the EnvironmentMapInfo.emi file and copied how it's read but while over water it maybe possible to have you water better reflect the terrain. Again, just a therory. Quote Link to comment Share on other sites More sharing options...
Rhino Posted April 4, 2006 Author Report Share Posted April 4, 2006 from all my testing, it looks like water can only have 1 env map.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.