Jump to content
Official BF Editor Forums

Custom Skybox


Outlawz

Recommended Posts

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 :D

screen861.jpg

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 by Outlawz
Link to comment
Share on other sites

Yes you can change the texture but as the default skybox actually is a "dome" a boxlike sky is hard to do :P

First Strike Mod did several cool custom skyboxes for their space maps. Mainly boxes but interesting uvmapping to get an awesome look ;)

Edited by Cassio
Link to comment
Share on other sites

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. :(

Link to comment
Share on other sites

Not even with Skydome.skyTemplate skydome?

Hmm no, I tried with this part from sky.con

if v_arg1 == BF2Editor

else

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 :P

indsky1jpg.jpg

Here's the UV map.

indskyuv.jpg

Edited by Outlawz
Link to comment
Share on other sites

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? B)

Link to comment
Share on other sites

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 by BEEX
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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... :D

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 :lol:

Edited by bergerkiller
Link to comment
Share on other sites

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 by Outlawz
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...
×
×
  • Create New...