Jump to content
Official BF Editor Forums

Envmaps Tutorial


Rhino
 Share

Recommended Posts

Okay, so I took the time to download and set up Rexman's bf2materials.exe as well as the accompanying GUI utility that someone was nice enough to write up, and although this tool is a great asset to development, it didn't really provide any additional clues as to what I'm doing wrong with my environment setup.

Let me break down exactly what I've done.

I created a bundledMesh object in Maya. The class texture is called AlphaEnvMap_glass, and the dds file has a semi-transparent gradient saved as DXT 5.

Okay, so I was able to successfully import this into the editor.

In the editor, I dragged a DefaultEnvMap near the object that I had just created. (My level also has surrounding static mesh objects) I generated my envmaps, and packaged it up

In game, I see that the alpha gradient is working, but I see no reflections whatsoever! And I've got an Apache sitting right next to the object, with its cockpit glass reflecting exactly as I want it to.

I've also dragged and dropped the Apache bundledMesh file on the bf2materials GUI and it seems to be using the same exactly Technique as my object.

//THIS IS THE APACHE

lod0

...

Shader: BundledMesh.fx

Technique: AlphaEnvMap

Type: 1

Texture: objects/vehicles/common/textures/us_vehicleglass_c.dds

Texture: Common\Textures\SpecularLUT_pow36.dds

...

//THIS IS MY OBJECT

lod0

Shader: BundledMesh.fx

Technique: AlphaEnvMap

Type: 1

Texture: objects/staticobjects/_geo_test/textures/alphaglass.dds

Texture: objects/staticobjects/_textures/dds/grayscale128.dds

Texture: Common\Textures\SpecularLUT_pow36.dds

What am I doing wrong?

Any insight would be helpful.

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Ha, you misunderstood me. :P

I mean, I have a map with no visible water (on purpose). I do not want, and I do not have any visible water. Do I then have to create the water folder, and start copying and renaming the envmap.dds files, or can I just skip it? Of course, I do generate the EnvMap in the editor for sniper scope reflections and stuff.

:)

Edited by Haxy
Link to comment
Share on other sites

  • 9 months later...

I have been playing with various envmap positions and trying various ones from ea's levels however Im not getting any sun reflection. Otherwise it looks good. For my map Im using the "skysunset11" sky texture. I know Im probably missing something entirely simple. Can anyone help a noob out?

Link to comment
Share on other sites

I have a curious problem... I don't have a 'content folder'.

It may be that it is because I'm now running the bf2 program from a 'Platinum Collection' install. I have noticed that the collection doesn't have things my original cd had, like Maya and sound engine. This may have been dropped as well.

I do have the 'content folder' in my bf2 editor and the has the DefaultEvnMap.con file in it. Is this the one I want? there is no tweak file. Can I use it?

If this is not right, how do I make a folder that will show up in my resource list for bf2?

I did make a folder bf2/content/object/common/DefaultEvnMap.con but I don't have a tweak file in there, wasn't supplied (don't I need the tweak file also.... or is that generated?). I also went to my BF editor settings/default/Content.config settings and added the line 'folder default content\object' to reference the folder I just added. It still does not show.

What am I doing wrong? Is there another way to get this to work from the default resource that I'm missing?

Thanks for an help.

Edited by Al B. Bach
Link to comment
Share on other sites

Nope, shoulda mentioned that.... that's the version I'm using.

Not running Vista either, XP pro 64 and I run 32 bit for modding. (have had probs compiling under 64 in past)

I even did a fresh install of the game and editor and still have same prob. I'm at a lose. The only place I see the content folder in the resource is in the editor and that only has the con file. Also, just out of curiosity, where does the content folder get pulled from? I don't recall a content.zip/folder in the original BF release.... may be wrong though. If there is one I'm missing it. Maybe a kind soul could could upload it for me and I can add back in.

Ideas.... anyone?

Edited by Al B. Bach
Link to comment
Share on other sites

AFAIK, as of 1.3 in the editor the only place to get the DefaultEnvMap is in bf2editor->content->objects->common

I can find it, and it puts the envmap object in the map..

Oh, while im in this thread.. the numbers generated on the envmap.. how do you get rid of those?

Link to comment
Share on other sites

AFAIK, as of 1.3 in the editor the only place to get the DefaultEnvMap is in bf2editor->content->objects->common

I can find it, and it puts the envmap object in the map..

Oh, while im in this thread.. the numbers generated on the envmap.. how do you get rid of those?

Yup, I just tried that out and it worked from the editor. I was confused cause all it had was the .con file in it. I don't know why it won't show up in the bf resource even though I put it there and forced load it from settings, only the editor resource shows.... anyway it worked.

In answering your question.... did you have the Singleplayer editor loaded, that may be the cause, that was what I was told. Make sure it doesn't load or is not selected in your manager, that happened to me the first go around. You can't have it loaded in the editor or it will show all the letters and AI pathing/strategic points. Best to have all that stuff turned off for the clearest DDS's. IE: AI or navmeshs. For some reason my second compile captured all the strategic points and letters as well because I had the Toggle Draw AI on in Render. I turned it all off, at least thats how I did it. Then it worked. Be sure your cube(s) are above ground or water level or nasty things show up. Hope that helps.

Edited by Al B. Bach
Link to comment
Share on other sites

Yup, I just tried that out and it worked from the editor. I was confused cause all it had was the .con file in it. I don't know why it won't show up in the bf resource even though I put it there and forced load it from settings, only the editor resource shows.... anyway it worked.

In answering your question.... did you have the Singleplayer editor loaded, that may be the cause, that was what I was told. Make sure it doesn't load or is not selected in your manager, that happened to me the first go around. You can't have it loaded in the editor or it will show all the letters and AI pathing/strategic points. Best to have all that stuff turned off for the clearest DDS's. IE: AI or navmeshs. For some reason my second compile captured all the strategic points and letters as well because I had the Toggle Draw AI on in Render. I turned it all off, at least thats how I did it. Then it worked. Be sure your cube(s) are above ground or water level or nasty things show up. Hope that helps.

The sp editor might help :) I havent tried that yet, but i havent even made my map SP-compatible yet?? Well.. gonna try it out.. thanks.. (and i think the editor is hardcoded regarding objects in bf2? and especially the EnvMap object..)

Link to comment
Share on other sites

The sp editor might help :) I havent tried that yet, but i havent even made my map SP-compatible yet?? Well.. gonna try it out.. thanks.. (and i think the editor is hardcoded regarding objects in bf2? and especially the EnvMap object..)

I understand, I thought that as well..... but if ou have the SP editor selected to autoload in your manager it will give you the weird DDS's. Best to deselect it from the manager and reload the editor after. Then you can just go in an regenerate your Eviros. PIA I know, but it works. When you need SP again, just turn the autoload back on.

On the other point... yes some things are hard coded, but you can tell the editor what to load for your resources via the settings in the BF editor settings/default/content .... as long as what you select is in your main or mod folder. For example here's mine:

folder default Objects\Common

folder default Objects\Effects

folder default Objects\Kits

folder default Objects\soldiers

folder default Objects\vehicles

folder default Objects\weapons

folder default Objects\staticobjects

folder default Objects\DynamicObjects

folder default Objects\water

folder default Objects\roads

folder default Objects\vegitation

folder default content\object

also remember you can put most anything in the root of those folders (make sure it is a BF copy and not your main BF your working from when in the editor! Don't mod from your Main BF) IE: I took all the ambient sounds from all maps and put them in my effects folder so I have access to all of them when I map.

Link to comment
Share on other sites

  • 1 year later...

Interesting stuff here. My question is, do i add multiple envmaps to my waterless map, or will just 1 be enough? My map is a very high mountain region with a winding road, sort of like a passage through the mountians. For good results, what do i do as far as how many do i place?

envmapquestion.jpg

Link to comment
Share on other sites

  • 11 years later...

I know this topic is 15 years old, but I hope someone can help.

I followed the tutorial to the letter, but have a couple issues....

1. When creating the EnvMaps, in the EnvMaps folder, many files were created (one for each EnvMap, I assume).  In the step that says "copy the file called "EnvMap0.dds and paste that file in your water folder".   I think that was based on if you had only ONE EnvMap.  What do you do if you have several EnvMaps?  Do you still only copy over the one file?

2.  After following all the steps, my water is transparent (see attached image).  Any help figuring out what I did wrong?

Thanks!

Image2.jpg

Link to comment
Share on other sites

re run lightmaps!

anytime you adjust height of the water or add or adjust envmaps you need to re do the lightmaps for the terrain!

as for which envmap to use just pick one, best to use one with no buildings otherwise your see the reflection of the building in the water all over the map.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...