PDA

View Full Version : [Tutorial] Creating Custom Sky Textures


TheManFromMars
15th Jan 09, 4:50 PM
CREATING CUSTOM SKIES TUTORIAL

I'll start by saying this is my first tutorial, so if you have any criticisms please let me know or advice please let me know.

As of when I wrote this, I have not seen another tutorial for this. I also wrote this on and off over a period of time, so sorry if something seems odd or out of place, but I have checked it over.

This is a tutorial to show you how to create custom sky textures to be used in your maps in the Mission Editor. The really nice thing about this is that you don't need a mod for others to use them, so this is similar to adding new detail map textures or decals. A note here: When I say ‘my_mod’ in this tutorial I mean whatever is appropriate, so either your mod, or the game directory such as W40K or DXP2 (if using Dark Crusade or above) is what my_mod is – okay? Good. I'll explain from start to finish how to get custom sky textures in game and I will try to answer any question you have. I should also mention that this is actually a fairly old piece of knowledge and Mudflaps tool was created almost 2 years ago - but as recently as a week or so ago I had noticed a request for a tutorial on this. I guess the problem is, is that the tools are so old and any threads relating to it are in such odd places that it isn't easy necessarily to collate the data in one place - so this is what this tutorial will attempt to do.

I did not create any of the tools, nor discover first hand anything relating to the creation and implementation of this tool. I am simply trying to create a user-friendly tutorial and bring it up to date for use today. Appropriate acknowledgements for the work involved in this are given at the end of the tutorial. If I have missed anyone please let me know. I also hope to be able to answer any question people may have about creating custom skyboxes and use this as a thread for help relating to the topic.

This Tutorial is also quite long by the way - but its just a once through, after that using it as reference should be quick etc. I'm also making this for novices + any standard to use, so if you are quite advanced but didn't know how to do this, please be patient and apologies for the long windedness of it. Obviously you can just 'quick read' past bits that may seems waffle to you, but i'd advice reading it all in its entirety at least once.

---------------------------------------------
1. INTRODUCTION & TOOLS
---------------------------------------------
So without any more delay - let's begin!

I assume you have the Mission Editor (the relic tools) and have it all set up, if not, please do so – it is as simple as download – install.

You will need the following tools (I have provided links, let me know if they out of date), Download to a single folder to keep things tidy, like C:\DoWModDownloads\, okay? Good, here they are:

1. Mudflaps Custom Skytool –
Found Here (http://dawnofwar.filefront.com/file/Mudflaps_Custom_Sky_Creator;68305#Download)

2. Python 2.4 – Found Here (http://www.python.org/ftp/python/2.4.4/python-2.4.4.msi)

3. DDS Plugin for GIMP - Found Here (http://nifelheim.dyndns.org/~cocidius/download.php?filename=gimp-dds-win32)

4. The GIMP - Found Here (http://sourceforge.net/project/downloading.php?groupname=gimp-win&filename=gimp-2.6.4-i686-setup.exe&use_mirror=voxel)

5. IBBoard's Texture Tool - Found Here (http://skins.hiveworldterra.co.uk/Downloads/detail_DawnOfWarTextureTool.html?version=1.8.1)


DON'T PANIC - In those big friendly letters. This looks like a lot of stuff, and can look daunting to some, but really it is VERY simple if you follow the guide and honestly won't take you all that long. With fiddling around from start to finish it took me about an hour to get my first custom skybox in game and I had to fix all sort of issues, work out a bug or two my computer had and realise my issue with the python etc.




--------------------------------------
2. SETTING THINGS UP
--------------------------------------

Install Python by opening the python.exe file.

Install it to C:\Python24

Now, Unzip Mudflaps custom skytools into the C:\Python24 folder
To make sure you got it right, look inside the folder and make sure there is a file called Python.exe. If there is, you have done it right.

Now Install IBBoards Texture Tool, I installed it to my Dawn of War Soulstorm folder (or equivelant if you have Dark Crusade, Winter Assault or Standard).

Now install the GIMP to wherever you like, the default directory it offers you is fine.

Now install the DDS Plugin for GIMP, by placing the plugin file (should be called dds.exe) in the GIMP plugin folder, which if you have used the default directory (when installing GIMP) should be:

C:\Program Files\GIMP 2.6\lib\GIMP\2.6\Plug-ins

Now you should be set up just fine, so let us move on to step 3


-----------------------------------------------
3. MAKING THE IMAGE
-----------------------------------------------
Okay we are ready to make an image.

* Start GIMP, click NEW and set the numbers to 1024 (width) by 256 (height) pixels
* Save the image as a .tga file. Name it whatever you want, you'll see an option to turn off RLE compression, click it to switch it off.
* Then make your image, remember the ends (width wise) must 'connect up' so make sure it looks fairly seemless. Also the image will enlarge GREATLY, so i'd recommend zooming in a lot and doing bits in detail or you can just scribble your name if you are wanting to test this!

** Below are some 'handy hints' about using the various programs etc. It is just quick but to get you started if you've never used something like the GIMP. Obviously there are pages of information out there on Google, just look around if you want more info or just play around with it yourself. I make no apology if this seems a little simple for more advanced users, i'm making this for everyone, even those just breaking into modding for the first time is the idea. My point is so that people aren’t put off by GIMP there are some ‘quick start’ tips here (after the Saving bit).

SAVING:
Once you have finished it, it is time to save.
Go to the Image tab, select Transform and select 'Flip Vertically'.
Now go to File  Save As
Then you can name your file differently if you now choose too, this is probably what will be displayed in the ME so think about that.
You'll notice the 'save in folder' part below, navigate to your Dawn of War folder and then to 'your_mod\data\art' now of course the 'my_mod' can be anything, so DXP2 or whatever, it doesn't have to be a mod if you see what I mean. So if you have Dark Crusade (which i'm sort of writing this for, since I don't use anything less - I have SS but i'm not using that for this) it'd be Dawn of War - Dark Crusade\DXP2\Data\Art

Now click the 'Select File Type (by Extension)' and scroll down till you see 'DDS Image' (without quotes obviously again - just making sure..) and click on that. You'll notice your name has now got .dds after it instead of the targa .tga extension. Now click save.

A new window will open, see Compression? Click the box next to that and select DXT1.

Click on 'Generate Mipmaps' and you should be done. Then click 'Okay'.
Note: In Mudflaps original instructions on this he/she mentions making sure something selected as 2D at this stage of saving, but using GIMP no such option presents itself and I had no problems - however, if you do have issues, you could try clicking 'Advanced Options' and selecting 'Bilinear' from the Mipmap filter. Now look, I haven't tested this, as I havne't had a problem with it before - but this seems to make sense to me if you are having an issue. Try it - I mean it makes sense I guess.

You should be done --> Move to Step 4 unless you want to check out some general hints and tips about using the programs to create the images below. It is just quick stuff and quite basic but should get you through an image.

GENERAL TIPS:
Paint:
* Use a couple of windows (or more) with paint, treat it like an art mixing palette.
* Draw opaque --> Go to the 'Image' tab and click 'Draw Opaque'. Click the Image tab again to check that there is now a tick next to it. This will enable you copy and paste any image with a full 'white' spectrum part (so say an image of a tree with nothing but white around it) onto another image with minimal editing required to make it fit. This can all be done with alpha channels etc in other stuff but its a quick solution - use the GIMP's brilliant airbrush tool with opacity switched on slightly to compensate any white bits remaining.
* Rescaling --> Go to the Image tab and click 'resize/skew' (may also be called 'stretch/skew' in some versions) and use that to easily and quickly alter your image size. Note: Do not do this a lot back and forth as it will distort the image, use CTRL+Z to undo changes first, and CTRL+Y to redo anything.

GIMP:
* Looks a little complex at first - don't panic. The new version duelly places the tools menu along with the image - which I don't like and haven't got used to yet, they used to be totally seperate windows, i'm sure there is a way to fix this but never mind. Anyway don't be daunted, its quite simple and very powerful once you get used to it.
* Hover your mouse over the various icons to see what you are selecting. The buttons of note are:
RECTANGLE SELECT TOOL: This is obvious, its just the tool used to move area selected images around.
COLOUR PICKER TOOL: Select this, and then click on the GIMP image anywhere and it will select the colour at that exact location to be used, useful for fading in colours from two different images to each other.
PENCIL TOOL HARD EDGE: This is a standard drawing tool - you will notice when you select it nothing special happens but the cursor over the image will change to a circle with a point. You will see a box with colour (or just white or black at first) below it, double click that to alter colour. (Or if you used the afore mentioned colour picker that colour will still be selected. The rest is quite self explanatory: Opacity effects the transparency of the applied pencil effect; Brush, just click on this to alter the brush size and type; Scale is just scaling up or down of the selected brush type; the rest you can work out yourself.
AIRBRUSH PAINT TOOL: The most useful of the lot, the one I use for almost everything, applies just like the pencil tool, all is the same but much easier to manage, much greater control and effects, fades, blends beautifully etc, very powerful tool indeed.
* The Tools tab has lots of powerful tools. My favourite are the Colour tools. You can use these to adjust contrast etc. Fiddle around with it, you'll get the hang of it. You can do almost anything here, the Transform tools also do things like flipping, rotating, distorting and resizing etc. A note about flipping, its not like paint or anything else I think. You select it, you'll notice your options have changed in the main tool set (below all the buttons where the opacity, brush, etc usually are), there you can change things like which way to flip etc, then just click once on the image to perform the task, you'll need this to finish your image.
* Grayscaling --> To be added simply because a lot of people apparently have trouble finding it and no wonder! It is in an odd place. Go to the 'image' Tab and see the thing that says 'Mode'? Hover over that and a new menu will appear next to it, you'll see RGB and Grayscale options there.


-----------------------------------------------------
4. GETTING THE IMAGE IN-GAME
-----------------------------------------------------

Okay so you have your image - great!

Go to where you put your IBBoard Texture Tool and open it up.
Click on 'Make RSH'

Now find your saved dds file and double click it. It should be 'my_mod\data\art' or whatever.

Now you should have a file called ‘(whatever you named it).rsh’ in the my_mod\data\art alongside your .dds file.

Copy and paste your .rsh file into your Python24 directory.


* Go to your Python24 folder.
* Open Python.exe
* Type (without the quotes of course)
'Import Mudflaps_Custom_Sky_Tool' (case is important here).
* You are prompted to find your .RSH file. It should be in your Python24 folder if you've been following this tutorial, open it. It'll have some sort of 'suggestion' window in the background just ignore it and follow my instructions. Now once you have selected the file you'll be prompted to save it. Save it to the following directory:
'C:\Program Files\THQ\Dawn of War (or whatever)\your_mod\data\Art\EBPs\environment\skies'. Go to directory you saved it into and check to make sure you did it right. If you did, a nice .whm file will be sat there with your name on it.


That is it! Fire up your Mission Editor. Once you've opened the ME, start a new map and disable the fog by pressing CTRL+F, then go to the Scenario Tab and click Terrain Properties, look down till you find where it says 'Sky Model' you'll notice it says 'MISSINGSKY' next to it. Click on 'MISSINGSKY' and a drop down (or up in this case I think but whatever) will appear scroll up or down until you find your skies name, it'll be whatever you named it - select it, then slide the sky radius to full and press Enter on your keyboard and Bam! Your skybox will be there.

It seems a lot of effort at first but its like any modding, it takes a little while to set things up but after that it just gets easier and easier and faster and faster to do. You should find you can go through this quite quickly after a couple of goes.

I’ll add 'help screenshots' if they are desired but I see know reason for them for now.
Here for now is an image of 'one I made earlier' (which is rubbish - to show how quickly you can make one I did this in just over five minutes - as you can see it's a little elongated *cough*) - and from this you can get the idea of what it'd be like in the Editor - of course it'll look pretty similar in game too.

http://img296.imageshack.us/my.php?image=customskydemoimagerz1.png

(If the screenie isn't displayed, I buggered it up - oh well.)

Thanks for reading this and I hope it was useful.
- The Man From Mars

------------------------------------------------------------------------------------------------------------
5. Known Issues and ‘Thanks to’
------------------------------------------------------------------------------------------------------------
Known Issues
WAVEY/BENDY IMAGE:
The bend on the image is a bit of a known issue I think. I don't think this is fixable, its just the mesh it wraps itself around. If i'm wrong i'm slightly surprised but i'm surprised a lot these days :D As I said I think simply doing some clever tweaks where needed on the original image will help this - try to compensate for it. However I can’t be certain about this. I did a similar image (to one that had ‘bends’ on it) on my XP machine instead of my new Vista one and I had no bends at all. So it seems a little strange. Perhaps Mudflap or someone else may know more about this, and I accept there are slightly different way to do this tutorial, but this way I found worked best on most machines etc.


-Thanks
Mudflap obviously for their amazing tool (and all the others they have done) which made doing this possible without having to use 3DS Max etc. Also for the initial readme guides and info etc - and the help offered on a page in the maproom which led me to try the 'import' fix for opening the tools which until then were just opening and closing without any result.
And of course to the forums etc for hosting all this and the download sites for hosting the tools for free etc.

wereturnip
15th Jan 09, 6:24 PM
Very clear tutorial MFM, hopefully this will inspire some to makes some new and interesting skies. Good Work.