You are here

How to Make NWN Skyboxes


How to Make NWN Skyboxes by Mohss

(Or What I did before "24" came back on TV)

What you'll need:


  • Brandon's Camera Hack F with distance settings to 200
  • Scooterpb's MDL plug-in suite for 3DS Max 4.2
  • A Copy of 3DS Max 4.2 (luckily I work in an industry where I have to use such things)
  • The NWN Un-Biffer.
  • A photo editing program that can save to targas.
  • Access to stock photography, Google, or a wicked Matte painter.

    Step One

    Grab a flat, non-perspective image of a sky. Don't be afraid to use the Clone tool to add more clouds, or layer several clouds up over one another (that's what I did with the ThunderClouds Sky) using Multiply and Screen to get nifty effects. Use Google to search, or a stock Photo CD, or if you're good with a brush or Wacom tablet, paint one up yourself. Save them out as 256x256 24 bit targas. Some images you might be able to get away with 128x128 if you want to save bandwidth.

    Step Two

    Making the Geometry (you're all going to laugh when you see how simple this is). Remember, if you can't find the button I'm talking about, just hover your mouse over an icon and a pop-up will appear telling you what the button does.

    First you'll need something as a point of reference. I use this burnt building that I ripped out of the TCN (city) tileset for my Burnt Building Hak I'm making.


    Change your Viewport to the TOP viewport. Make a Geosphere (cos it needs less polys to look spherical) that looks like it'll be much larger than a 16x16 area (the max area I suggest in NWN). Select hemisphere, then take the number down to 1.



    Collapse the whole thing down to an Editable Mesh (r-click convert to Editable Mesh). Go to Sub-Object Vertice, look for Collapse. Select the Top string of vertices and collapse those verts to one vert. Now go to Sub-Object Element (the red cube) and select the entire Geosphere. Go down on the modifier until you see Flip Normals and hit that button. Now the object will appear inside out, which is what we want (if you want to know how normals work, I suggest you take a gander on Google).

    Scale the Geosphere so it's a little squashed on the up and down (Z on it's local, Y in the Front and Left viewports) like it is in the picture. Bring the bottom verts 1 Unit below the Zero line (the thick black line). This is so that you don't see the seam on the edge of the world.

    With your Skybox selected, Select UVW Mapping in the modifier stack. Select Planar and make sure it is on Z so that it's mapping down towards where your land will be (see picture). Convert that puppy to an Editable Mesh so that it gets exported properly.



    Now, open the Material Editor and select a new Material slot. Go to Diffuse and hit None (you can alternatively hit the grey box beside the Diffuse colour). Select Bitmap and choose the targa where you left it. Now hit the blue and white checked cube above your Bitmap settings and you'll see it in the viewport.



    Okay, now½ ‘go to parent', the UP arrow near the blue and white checked cube. Now see where it says Self Illumination to the right? Click COLOR and change it to white. Bioware uses colours to determine Self Illumination (thanks to Scooterpb for helping me with that one), so black is NONE and White is Self Illuminating. What is Self illumination? Well that makes the material appear to be giving off light. It also means that Shadows and other lights don't affect it (exactly what we need).

    Hit Apply to Selection or drag the material to your object. Add a "MDL Trimmesh Properties" modifier to the object and make sure ‘Don't Fade' is selected. I'm not sure if this is needed, but I was testing other stuff out and ended up leaving this on. Let me know if you succeed in doing this without the Trimmesh.

    Now you need the Parent of the object: a Model Helper. Change your viewport to the TOP viewport Go to Create>Helpers> MDL Plug-in Suite>Model and click and drag it over your Skybox. Make sure it's at 0,0,0 (r-click on the move button and type in 0,0,0 in all 3 axis).

    Rename both the objects to the appropriate names.

    Click on Link, (near the select tool) and click on the Skybox and DRAG down to the helper. The helper should momentarily turn white.

    Now hit FILE EXPORT, choose MDL and save it out to your directory.

    The techy stuff:

    Open up your UnBiffer, open up Neverwinter Nights, and you'll see a file there called 2da.bif. Open it up and look for Placeables.2da. Extract that puppy to your Skybox directory.

    Open up the placeables.2da in Microsoft Word (I find it works best to keep the formatting). Go to the end of the document and select the entire last line. It'll probably be this:

    200 BB_pouch 66494 gi_pouch **** **** **** **** 23 1 1 ****

    Copy and paste it exactly below the last line. Change the 200 to 201, change BB_pouch to what you'd like it to be called in NWN. Change ‘66494' to ****, and finally ‘gi_pouch' to the FILENAME of the object (everything up to MDL). Try to keep the names smallish. Save the file out.

    Now run Bioware's Hakpak, add in the targas, the MDL, the pwk (if you need it), and the 2da file and you're good to go!


    Some ultra-deep thoughts and suggestions:

    StarBoxes don't work as well unlike clouds, which are close to earth, stars are so far above, they appear to not move that much. If come up with a solution to this and get it working, please let me know.

    You can make an Alpha channel in your Targa file to represent where the clouds are and create a second and third skybox in Max. The second skybox could be a bit bigger with another layer of clouds (cirrocumulus for example), and the 3rd one would be blue sky.

    I try and allow the fogging in NWN to be the fadeout that happens on the horizon. If you're not satisified with that, put a circular gradient white haze in your targa to simulate it.

    And finally, I cannot stress enough how important your lighting is in your scene. If it's a dark thunderstorm out, don't be afraid to put stuff in shadows. People know what a house looks like, they don't need to see it in full lighting. : )

    Glad you all seem to enjoy the Skyboxes. I'll be posting some new Hak Paks far in the future, but for now I've got work on a module to do.


    The Bloody Mummers



Migrate Wizard: 
First Release: 
  • up
  • down