VictorM Posted October 30, 2013 Report Share Posted October 30, 2013 Hi, for my first post, I would like to congratulate everyone who contributes , day after day , to enrich this wonderful bf forum: often , I found here the answers I sought in vain elsewhere: specialy thanks to mschoeldgen[Xww2], Catbox, clivewil, bergerkiller for their excellent advice. Today , I decided to ask for help in a more direct way : My project is to edit maps from DEM data ( Aster ) real topography , and many mountains; I use 3DEM and L3DT to get the final HeightmapPrimary.raw . Within the editor,(map 1024x2) all work perfectly and by controling levelsettings carefully, the exact dimensions are met . I apply the textures , either with Bf_TPaint or EcoMAP : In the editor , i get this result: great B)/>/> but in game , it's catastrophic :(/>/> : all the textures disappear once exceeded a certain height in the mountains . it seems that the problem starts once the altitude exceeds 500 meters . Do you think it might come from a limitation of the enginegame? don't know.... if so, can i expect to remedy this by changing a few lines of code, maybe ? or so, I thought it was , perhaps, of a lighting problem ? have try but don't work.... what to do, I'm completely stuck. any ideas ? thanks Quote Link to comment Share on other sites More sharing options...
CTRifle Posted October 30, 2013 Report Share Posted October 30, 2013 if it was a editor limit it would just not render it until you got closer I think. Fog settings? can you post another picture or 2? Quote Link to comment Share on other sites More sharing options...
clivewil Posted October 31, 2013 Report Share Posted October 31, 2013 i'm wondering if you've gone through the cloud plane... do you have cloud planes enabled? Quote Link to comment Share on other sites More sharing options...
VictorM Posted October 31, 2013 Author Report Share Posted October 31, 2013 (edited) CTRifle Fog settings? can you post another picture or 2? Renderer.fogColor 0.00/0.00/0.00 Renderer.fogStartEndAndBase 0.00/2000.00/2000.00/1000.00 When i test a new map, I prefer a cloudless fog. It's more easy to detect problem Anyway, with or without fog, it's always the same problem in game: in Bfeditor, the texture terrain is perfect as you can see in the first image. clivewil do you have cloud planes enabled? Skydome.skyTemplate skydome Skydome.cloudTemplate cloudlayer Skydome.hasCloudLayer 0 Skydome.hasCloudLayer2 0 Skydome.scrolldirection 0/0 Skydome.scrolldirection2 0/0 Skydome.cloudTexture Skydome.cloudTexture2 Skydome.skyTexture Skydome.domeRotation 0 Skydome.fadeCloudsDistances 1000/1100 Skydome.cloudLerpFactors 0.5/0.5 Skydome.flareTexture Skydome.flareDirection 0.00/0.00/0.00 really weird :blink:/>/> Before ask to you this riddle, i searched a lot on Bf2 forums, but I have not found anything about these strange black high mountains, I assumed that few mappers tried to land strong difference: I don't know why, while the visual interest is obvious for airplanes and helicopters: you should try with 3d glasses, it's really wonderful. do you think the problem could come from the altitude of GILights ? i continue searching... thank you both: any help is welcome Edited October 31, 2013 by VictorM Quote Link to comment Share on other sites More sharing options...
Coronaextra Posted October 31, 2013 Report Share Posted October 31, 2013 (edited) You can definitely see the jagged pixelated edges of the shadow so it is almost certainly a lightmap issue, although I'm not sure why they are black at a certain altitude. Have you tried re-baking the lightmaps or at least look at one with a DDS viewer to confirm the problem? If you want you can zip up the map I'll look at it for you. I noticed your Skydome.flareDirection is 0/0/0, is your Lightmanager.sunDirection also set to 0/0/0? This will cause the editor to generate black lightmaps since the light has no source direction. i'm wondering if you've gone through the cloud plane... do you have cloud planes enabled? I'm not sure what you mean by cloud planes? The scrolling clouds are part of the skydome.fx shader and they use the second unwrap of the skydome mesh. Edited October 31, 2013 by Coronaextra Quote Link to comment Share on other sites More sharing options...
VictorM Posted November 1, 2013 Author Report Share Posted November 1, 2013 (edited) OK, thank you for the informations Coronaextra: Now, I think it should be better to start with the most simple map, so go to Essenciel: so I created a 512x1 map and drew a peak of 512 meters; one flag, one spawnpoint, one heli to go see in altitude, textures by hand, generated lowdetails. The black shadow appears well near 500 meters. (Other tests have indicated that, whatever the size of the map, it is still to this altitude 500 that the problem appears) Then I positioned the sun, and sunflares verticaly: but in the game, the black shadow is still there. Lightmanager.initLightmanager.skycolor 0.5/0.52/0.55 Lightmanager.ambientcolor 0.509804/0.517647/0.556863 Lightmanager.sunColor 0.7/0.67/0.63 Lightmanager.sunSpecColor 1/1/1 if v_arg1 == BF2Editor LightSettings.TerrainSunColor 0.97/0.81/0.57 LightSettings.TerrainSkyColor 0.63/0.70/0.75 LightmapSettings.waterSunIntensity 0.8 else terrain.sunColor 0.97/0.81/0.57 terrain.GIColor 0.63/0.70/0.75 terrain.waterSunIntensity 0.8 endIf Lightmanager.staticSunColor 0.67/0.64/0.55 Lightmanager.staticSpecularColor 1.00/1.00/1.00 Lightmanager.staticSkyColor 0.63/0.70/0.75 Lightmanager.singlePointColor 0.00/0.00/0.00 Lightmanager.sunDirection -0.040167/-0.994134/-0.100418 Lightmanager.enableSun 1 Lightmanager.effectSunColor 1.00/1.00/1.00 Lightmanager.effectShadowColor 1.00/1.00/1.00 Lightmanager.defaultEffectLightAffectionFactor 1 Lightmanager.hemilerpbias 1 hemiMapManager.setBaseHemiMap Levels/black512x1/groundhemi 0.000000/0.000000/0.000000 2048.000000 512.000000 Lightmanager.treeAmbientColor 0.00/0.00/0.00 Lightmanager.treeSunColor 1.00/1.00/1.00 Lightmanager.treeSkyColor 1.00/1.00/1.00 if v_arg1 == BF2Editor else run /Common/Sky/SkyDome/skydome.con run /Common/Sky/Flare/flaresprite.con endIf Skydome.skyTemplate skydome Skydome.cloudTemplate cloudlayer Skydome.hasCloudLayer 0 Skydome.hasCloudLayer2 0 Skydome.scrolldirection 0/0 Skydome.scrolldirection2 0/0 Skydome.cloudTexture Skydome.cloudTexture2 Skydome.skyTexture Skydome.domeRotation 0 Skydome.fadeCloudsDistances 1000/1100 Skydome.cloudLerpFactors 0.5/0.5 Skydome.flareTexture Skydome.flareDirection -0.04/-0.99/-0.10 Renderer.fogColor 128.00/128.00/128.00 Renderer.fogStartEndAndBase 10.00/512.00/1.00/0.50 I'm afraid we can't find a solution, it would be such a shame not to take advantage of the high mountains in game....... :unsure:/> if you want, you can easily try at home, by creating this simple card 512x1, as I did . Edited November 1, 2013 by VictorM Quote Link to comment Share on other sites More sharing options...
Coronaextra Posted November 1, 2013 Report Share Posted November 1, 2013 (edited) I confirmed the problem and it is height related. I made a 512x1 map and set its TerrainHeight to 750. In the editor it looked fine: I got in game and saw the problem: Looking at the files I discovered the problem in the compiled Colormaps It seems that the editor will generate black colormaps if the terrain is higher than it is wide. This map is a 512x1 and the terrain above 512m is painted black. I really dont know why though. The total Z range is not immediatly apparent when you look at the screen shots. The flat area of the map is already at 300m. This is because when I created the map I set the default height to 100m, and when I changed the range it shifted it to 3x that. If you sample the height of the lowest part of your map with the platform tool, you may find that it is higher than you thought. You said you generated your heightmap with L3DT, and it may be that your heightmap has a very low range of values, forcing you to extend the draw range in the editor. This problem could be fixed by Leveling out the heightmap in photoshop to give it full value range (0 to 1). Another solution is to just copy /yourmap/editor/colormaps to /yourmap/colormaps/ but these will not have road textures burned onto them. If you must have a very large Z range in your terrain a better solution is to just user a larger size map so that the Z dimension never exceeds the X or Y. Edited November 1, 2013 by Coronaextra Quote Link to comment Share on other sites More sharing options...
VictorM Posted November 1, 2013 Author Report Share Posted November 1, 2013 Okayyyyy Coronaextra B)/> : all the black textures have gone away, now. very well done :)/> just a little thing; with my first mountains map, i was using 1024x2 scale, and the problem appeart near 500 meters: we are far away of 1024, in that even . something else, I noticed in the settings of the minimap (C:\Program Files\EA GAMES\Battlefield 2 Makeminimap.con that there is a limitation to 500 meters in altitude: maybe it would be interesting to understand whether it can influence this phenomemon, no ? rem *** store settings ***varExec v_drawObjects = renderer.drawObjects varExec v_drawBundledMeshes = renderer.drawBundledMeshes varExec v_drawStaticMeshes = renderer.drawStaticMeshes varExec v_drawSkyDome = renderer.drawSkyDome varExec v_drawRoads = renderer.drawRoads varExec v_drawTerrain = renderer.drawTerrain varExec v_drawNametags = renderer.drawNametags varExec v_drawTrees = renderer.drawTrees varExec v_drawHud = renderer.drawHud varExec v_drawFps = renderer.drawFps varExec v_drawBoundingSpheres = renderer.drawBoundingSpheres varExec v_drawLightSources = renderer.drawLightSources varExec v_drawLightSourceOpacity = renderer.drawLightSourceOpacity varExec v_drawConsole = renderer.drawConsole varExec v_perPixelRenderingDistance = staticMeshRenderer.perPixelRenderingDistance varExec v_fogStartAndEnd = renderer.fogStartAndEnd varExec v_dynamicShadows = shadowManager.dynamicShadowsEnabled rem *** setup for miniMap *** renderer.drawObjects 1 renderer.drawBundledMeshes 1 renderer.drawStaticMeshes 1 renderer.drawSkyDome 0 renderer.drawRoads 1 renderer.drawTerrain 1 renderer.drawNametags 0 renderer.drawTrees 0 renderer.drawHud 0 renderer.drawFps 0 renderer.drawBoundingSpheres 0 renderer.drawLightSources 0 renderer.drawLightSourceOpacity 0 renderer.drawConsole 0 rem renderer.fogStartAndEnd 1000/1000 shadowManager.dynamicShadowsEnabled 0 staticMeshRenderer.perPixelRenderingDistance 1000 renderer.makeTopWorldScreen 512 miniMap 0/500/0 2048 aiDebug.draw 0 rem *** reset settings *** renderer.drawObjects v_drawObjects renderer.drawBundledMeshes v_drawBundledMeshes renderer.drawStaticMeshes v_drawStaticMeshes renderer.drawSkyDome v_drawSkyDome renderer.drawRoads v_drawRoads renderer.drawTerrain v_drawTerrain renderer.drawNametags v_drawNametags renderer.drawTrees v_drawTrees renderer.drawHud v_drawHud renderer.drawFps v_drawFps renderer.drawBoundingSpheres v_drawBoundingSpheres renderer.drawLightSources v_drawLightSources renderer.drawLightSourceOpacity v_drawLightSourceOpacity renderer.drawConsole v_drawConsole renderer.fogStartAndEnd v_fogStartAndEnd staticMeshRenderer.perPixelRenderingDistance v_perPixelRenderingDistance shadowManager.dynamicShadowsEnabled v_dynamicShadows anyway, many thanks for your help, Coronaextra Quote Link to comment Share on other sites More sharing options...
VictorM Posted November 1, 2013 Author Report Share Posted November 1, 2013 The flat area of the map is already at 300m. This is because when I created the map I set the default height to 100m, and when I changed the range it shifted it to 3x that. If you sample the height of the lowest part of your map with the platform tool, you may find that it is higher than you thought. yes, I have often noticed that important detail, especially when you add the surrounding areas; that's why, with mountains maps only, i set the default height nearby zero. You said you generated your heightmap with L3DT, and it may be that your heightmap has a very low range of values, forcing you to extend the draw range in the editor. This problem could be fixed by Leveling out the heightmap in photoshop to give it full value range (0 to 1). Ooooups, it's a great suggetion, but have no idea how to do this; could you explain the proccedure, please ? thxs Quote Link to comment Share on other sites More sharing options...
Coronaextra Posted November 1, 2013 Report Share Posted November 1, 2013 (edited) Open your heightmap raw file with photoshop using the settings, 1025x1025, 1 channel, 16bit, IBM. Hit Ctrl + L to open the levels window. Play with the sliders to so that image uses full range and goes from black to white instead of just middle gray values. When your're happy save the file. One caveat of giving the heightmap full range is that if you wanted to lower the terrain to make a lake or river, you cant because the heightmap is already black and it cant go any lower. It's like, how much more black could this be? and the answer is none. None more black. " Edited November 1, 2013 by Coronaextra Quote Link to comment Share on other sites More sharing options...
VictorM Posted November 1, 2013 Author Report Share Posted November 1, 2013 as you can see, the heighmapPrimary.raw exported from L3DT is pretty well balanced, and I did nothing to change. personnaly I don't like changing the histogram of a real world map, because I found that it inevitably leads to distortions in the topology. Quote Link to comment Share on other sites More sharing options...
VictorM Posted November 1, 2013 Author Report Share Posted November 1, 2013 Hum, we have always the "black" problem with the miniMap...... Quote Link to comment Share on other sites More sharing options...
Coronaextra Posted November 1, 2013 Report Share Posted November 1, 2013 (edited) Find your MakeMiniMap.con file in the bf2 directory, copy it and give it a different name. Then edit the camera height to an altitude above the hightest point on your map. I changed mine to 1024. I also had to change the last number to 512 (my map is a 512x1). You have to create your own file because the editor ignores changes in the original (at least it did for me) MakeMiniMapTest.con renderer.makeTopWorldScreen 512 miniMap 0/1024/0 512 In the editor, go to Tools>Options>Miscellaneous and type the name of your file into one of the CustomCommandFile fields. If you put your file in the same directory as the original you don't have to specify a path. Close that then go to Tools>CustomAction and select your file. It should create a minimap.dds in the same directory as the con file. Rhino has a good minimap tutorial. His cons have code for specifying an output path and rendering multiple high res minimap tiles. http://www.bfeditor....showtopic=10926 Edited November 1, 2013 by Coronaextra Quote Link to comment Share on other sites More sharing options...
VictorM Posted November 1, 2013 Author Report Share Posted November 1, 2013 you just save me a lot of time, man : really. I believe that this time the problem is solved. thanks a lot, Coronaextra vic Quote Link to comment Share on other sites More sharing options...
Bensta Posted December 6, 2013 Report Share Posted December 6, 2013 Nice coronaextra 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.