Outlawz Posted July 18, 2010 Report Share Posted July 18, 2010 (edited) Result from today's summer morning boredom. I wondered if the BF2 skybox can be changed and after seeing that it's actually a simple .staticmesh object, I got an evil grin on my face. About an hour and couple of CTDs later this is what came out I can do a small tut or description on how to do this, if anyone's interested, will also see if it's possible to attach it to a custom map instead of a mod. Edited July 18, 2010 by Outlawz Quote Link to comment Share on other sites More sharing options...
bergerkiller Posted July 18, 2010 Report Share Posted July 18, 2010 Isn't making your custom "sky" texture and using it in a level enough to change the skybox? Quote Link to comment Share on other sites More sharing options...
Cassio Posted July 18, 2010 Report Share Posted July 18, 2010 (edited) Yes you can change the texture but as the default skybox actually is a "dome" a boxlike sky is hard to do First Strike Mod did several cool custom skyboxes for their space maps. Mainly boxes but interesting uvmapping to get an awesome look Edited July 18, 2010 by Cassio Quote Link to comment Share on other sites More sharing options...
bergerkiller Posted July 18, 2010 Report Share Posted July 18, 2010 Ah I seee So bacially you could even make a triangle-box-shaped "skybox"? Quote Link to comment Share on other sites More sharing options...
Bensta Posted July 18, 2010 Report Share Posted July 18, 2010 Yea you can also put objects on the skybox, works well with distant sky scrapers/city plus more Quote Link to comment Share on other sites More sharing options...
Outlawz Posted July 18, 2010 Author Report Share Posted July 18, 2010 The original skybox is actually diamond shaped, but only the top part is UVd, which is why the bottom of the texture needs to be a solid color/gradient, cos the bottom of the texture gets stretched to the bottom half of the skybox. Oh and I haven't found a way to do this map-side, somehow can't get maps to load the skybox from the custom client.zip instead of default, it loads the sky texture, but the dome is either loaded from BF2, or isn't loaded at all. Quote Link to comment Share on other sites More sharing options...
UberWazuSoldier Posted July 19, 2010 Report Share Posted July 19, 2010 (edited) Not even with Skydome.skyTemplate skydome? Edited July 19, 2010 by UberWazuSoldier Quote Link to comment Share on other sites More sharing options...
Rhino Posted July 19, 2010 Report Share Posted July 19, 2010 That's pretty cool how you made it look box like, like that Can you post a .jpg of the sky texture? Quote Link to comment Share on other sites More sharing options...
Outlawz Posted July 19, 2010 Author Report Share Posted July 19, 2010 (edited) Not even with Skydome.skyTemplate skydome? Hmm no, I tried with this part from sky.con if v_arg1 == BF2Editorelse run /Common/Sky/SkyDome/skydome.con run /Common/Sky/Flare/flaresprite.con endIf Where would I add that template line btw? That's pretty cool how you made it look box like, like that Can you post a .jpg of the sky texture? That's because it is a box Here's the UV map. Edited July 19, 2010 by Outlawz Quote Link to comment Share on other sites More sharing options...
Rhino Posted July 19, 2010 Report Share Posted July 19, 2010 ummm, BF2 uses 360 sky domes like this? Quote Link to comment Share on other sites More sharing options...
Outlawz Posted July 19, 2010 Author Report Share Posted July 19, 2010 Yeah, but that's because the skybox is dome shaped, this one is a box? Quote Link to comment Share on other sites More sharing options...
bergerkiller Posted July 19, 2010 Report Share Posted July 19, 2010 Lawl, you guys he changed the mesh of the skydome, not the texture. Quote Link to comment Share on other sites More sharing options...
Outlawz Posted July 19, 2010 Author Report Share Posted July 19, 2010 Glad you figured out it, but I'm surprised Rhino missed it. I wondered if the BF2 skybox can be changed and after seeing that it's actually a simple .staticmesh object I mean hellooo... Quote Link to comment Share on other sites More sharing options...
bergerkiller Posted July 19, 2010 Report Share Posted July 19, 2010 But yeah, this is awesome for small city maps (as you said before). You could make the map "endless large". Although...since the box follows the camera...all meshes will be viewed from the very same side at all times. So you wouldn't even need 3d structures in the skybox, since you can just use a globe texture. Hard to tell if a box is really that special...could you make a box effect by making a sky texture inside a box? Quote Link to comment Share on other sites More sharing options...
BEEX Posted July 19, 2010 Report Share Posted July 19, 2010 (edited) you guys make me feel smart...lol. . the skydome mesh doesnt follow the camera,it renders differently to give the appearence of it being infinite,the skydome origin is always at the level origin. . im curious if anyone has made a skydome rotate,or managed to get 2 rotating skydomes???,obviously a time of day system is not possible in bf2,it would be pretty cool for things like asteroids,large spaceships,space junk or planets that rotate over or around the level. Edited July 19, 2010 by BEEX Quote Link to comment Share on other sites More sharing options...
Rhino Posted July 19, 2010 Report Share Posted July 19, 2010 Glad you figured out it, but I'm surprised Rhino missed it. I mean hellooo... I missed that when reading your posts Quote Link to comment Share on other sites More sharing options...
UberWazuSoldier Posted July 20, 2010 Report Share Posted July 20, 2010 Well, the model itself is a staticMesh, but it uses a separate shader to regular BF2 statics, so I suspect you can't do anything TOO tricky (like rotationalBundles and other bits and bobs). In games there's about 3 ways skies are normally done. In most (non-DICE) modern games, they use a sky*BOX*, because it makes the sky almost the same texel density all over. BF2 uses sky*DOME*s, which is easier to edit, but makes the top very stretched indeed. The most recent idea has been involving a mesh made up of two parabolas, and the texture would look like two circles. This offers the most even texel density, but it's a beast to make, and wastes a lot of texture space. Certainly if you want to look straight up a lot, skyboxes offer the best performance - even if skydomes let you churn them out faster. Quote Link to comment Share on other sites More sharing options...
bergerkiller Posted July 20, 2010 Report Share Posted July 20, 2010 (edited) What if you change the skydome simple object to a bundle and add lot's of cool stuff to it? The skydome is nothing more than a template added to the players' camera... EDIT Nah I tried it, even if I change it to a bundle you can't add new stuff to it Else it would be asteroids all over the place Edited July 20, 2010 by bergerkiller Quote Link to comment Share on other sites More sharing options...
Outlawz Posted July 20, 2010 Author Report Share Posted July 20, 2010 Even if you got the skybox/dome to rotate, have a sky texture that has all four daytimes on it, so the rotating sky gives the impression of changing daytime, how would you change the light settings mid-game? Quote Link to comment Share on other sites More sharing options...
Cassio Posted July 20, 2010 Report Share Posted July 20, 2010 like that? I'm still not convinced that this actually possible in bf2. Quote Link to comment Share on other sites More sharing options...
UberWazuSoldier Posted July 21, 2010 Report Share Posted July 21, 2010 (edited) It's not. I talked to the guy and he's using PR.exe to render the sky and pass the light information back to BF2, so it's still not technically possible in BF2. Good idea though. Edited July 21, 2010 by UberWazuSoldier Quote Link to comment Share on other sites More sharing options...
Outlawz Posted July 21, 2010 Author Report Share Posted July 21, 2010 (edited) Well, the model itself is a staticMesh, but it uses a separate shader to regular BF2 statics, so I suspect you can't do anything TOO tricky (like rotationalBundles and other bits and bobs). Not really, I checked the mesh in ShaderWrapper // FILE: C:\Program Files\EA GAMES\Battlefield 2\mods\bf2\Sky\Skydome\Meshes\skydome.staticMesh// geom0 lod0 Shader: StaticMesh.fx Technique: BaseDetail Type: 0 Texture: common/sky/skydome/textures/skyclear01.dds Texture: common/sky/skydome/textures/cloud01.dds Texture: Common\Textures\SpecularLUT_pow36.dds Edited July 21, 2010 by Outlawz Quote Link to comment Share on other sites More sharing options...
bergerkiller Posted July 21, 2010 Report Share Posted July 21, 2010 Yeah something else changes the skydome textures to the ones specified in the levels' sky.con. It's just a regular mesh, but it is twisted and turned by the game. Quote Link to comment Share on other sites More sharing options...
Freeze Posted July 21, 2010 Report Share Posted July 21, 2010 A day/night system can work in a local server with a Python script, since you can invoke new light settings in real-time... Being limited to a local server is the downside. Quote Link to comment Share on other sites More sharing options...
UberWazuSoldier Posted July 22, 2010 Report Share Posted July 22, 2010 Yeah, that's the problem. And no, it uses a separate shader. SkyDome.fx - Aside from how the mesh was saved it has nothing to do with the staticmesh shader, sorry 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.