Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Tue May 21, 2013 2:48 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 69 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Tutorial: Assembling 6 textures to make a Doom3 skybox
PostPosted: Wed Aug 11, 2004 6:53 pm 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
Note: This tutorial is to make a basic sky, it won’t move or do anything fancy, as I myself don’t know how to do that yet. However I wanted to write this basic tutorial because when I was trying to find out how to do it I had to look at a few different threads, and peace together the information.

A bit about skyboxes-All a “skybox” is, is a texture with a shader that points to 6 .tga files. It does not actually need to be a box. If you have a window, all you need to do is put a brush on the outside of it, and apply the texture. Basically the brush with the texture applied to it will act like the “window” into your skybox. So no matter how far or close the brush is to your position, the image on it always looks the same to you.


Getting the 6 .tga files-You could create your own from a program called Terragen ( http://www.planetside.co.uk/terragen/ ) the site says its free for non-commercial use. Or you could go to this site http://www.scentednectar.com/skyboxes/ and download some that are already made.

Convert them to .tga format, and naming them-You will notice that these files are in .jpg format. This will not work with Doom3, so you need to convert them into .tga files. Using Photoshop this is very simple, just paste the image into a file, and then save it as a .tga file.

Save them with “_possition” at the end… so if you want to call your skybox “cloudyday” you would name the six images as follows “cloudyday_left” “cloudyday_forward” “cloudyday_right” “cloudyday_back” “cloudyday_up” “cloudyday_down”

If you get your images from the website above they are already named in such a way that they are easily identifiable, if you have images that are not identified, be careful to get them in the right order, or your sky will have seems.

Putting your images in the right place-
You do not put your images in the texture directory. This is a bit counter intuitive, and it confused me, till I found out were to put them. In your Doom base directory create a directory called “env” inside make another directory called “custom” and put your 6 .tga files in there.

Pick one image (does not matter what one) and put it into base/textures/custom/skies name is simply cloudyday.tga. This is the image you will see in the editor.

Getting your shader ready-

You will need to have a shader to tell Doom3 what to do with your 6 .tga files. The easiest way is to cut N paste what I have into a Text doc. And save it as Customskies.mtr, then place it in your base/materials directory.

Code:
/////////////////////////////////////
textures/skies/custom/cloudyday
{
      qer_editorimage   textures/custom/skies/cloudyday.tga
   noFragment
   noshadows
   nooverlays
   forceOpaque            // so transparent windows can draw on top of it
   {
      blend      add      // so transparent windows can draw on top of it
      cameraCubeMap   env/custom/cloudyday
      texgen      skybox
      texgen         wobblesky .0 .0 .0
   }
}
/////////////////////////////////////////


When you want to create another sky, you do not need another .mrt file, you simple make another instance of the script inside the .mrt file and change the variables on it.


Last edited by DavidRoss on Fri Aug 13, 2004 5:30 am, edited 1 time in total.

Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 8:38 pm 
Offline
Site Admin
User avatar

Joined: Tue May 28, 2002 6:17 pm
Posts: 11026
Location: Munich / Germany
Nice one - thanks!

_________________
Image Staff - The Wörld is Yours
Our iOS Apps


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 12, 2004 4:54 am 
Offline
has joined the game

Joined: Thu Aug 12, 2004 4:49 am
Posts: 25
Ive been doin this for the past hour or so and it still doesnt work. The qer_editorimage will show up just fine but it always turns out black ingame or in render mode. If I save the map and open it again it gives a warning sayin Size Mismatch cant load cubemap. I have no idea what that means. All the images are .tga 24bit all 512x512 including the qer_editorimage one. I have no idea what the deal is! Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 12, 2004 5:01 am 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
HaZarD wrote:
Ive been doin this for the past hour or so and it still doesnt work. The qer_editorimage will show up just fine but it always turns out black ingame or in render mode. If I save the map and open it again it gives a warning sayin Size Mismatch cant load cubemap. I have no idea what that means. All the images are .tga 24bit all 512x512 including the qer_editorimage one. I have no idea what the deal is! Any ideas?


I know that i got it showing black when i dident have the .tga's in the "env" directory, so make sure your path in your script is setup right.

Also be sure when you refrance them in the script line "env/custom/cloudyday" you do NOT put a file extention at the end. it should just be the name of all your textures without anything else.

Hope this helps.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Thu Aug 12, 2004 8:42 pm 
Offline
has joined the game

Joined: Thu Aug 12, 2004 4:49 am
Posts: 25
Ok my env folder in the base folder (<doom3>/base/env) and in that folder is:
Code:
cloudyday_back.tga
cloudyday_front.tga
cloudyday_left.tga
cloudyday_right.tga
cloudyday_up.tga
cloudyday_down.tga


my materials folder is in the base folder too. And inside it is customskies.mtr and this is exactly what it has inside it:
Code:
textures/skies/cloudyday
{
      qer_editorimage   textures/skies/cloudyday.tga
   noFragment
   noshadows
   nooverlays
   forceOpaque            // so transparent windows can draw on top of it
   {
      blend      add      // so transparent windows can draw on top of it
      cameraCubeMap   env/cloudyday
      texgen      skybox
      texgen         wobblesky .0 .0 .0
   }
}


the textures folder is in the base folder as well and the skies folder is in it.

Everything checks out like it should all the paths match up and like I said the qer image shows up just fine and is on the brush in normal mode (not render mode) but it still shows up black ingame or render mode.

When I open the map in the editor I get these warnings:
Quote:
WARNING: Mismatched sizes on cube map 'env/cloudyday'
WARNING: Couldn't load cube image: env/cloudyday


And I have no idea why. All the textures are 24bit .tga files all sized 512x512

/shrug


Top
 Profile  
 
 Post subject: Wadfather
PostPosted: Thu Aug 12, 2004 11:04 pm 
Offline
is connecting to Doom3world.org

Joined: Thu Aug 12, 2004 7:46 pm
Posts: 3
We have almost 500 skies (environment maps) in various themes at the Wadfather, come check them out! :)

_________________
The Wadfather - the ultimate collection of public domain graphics for game developers
http://www.planethalflife.com/wadfather/


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 12:00 am 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
My next idea would be to try another sky...? it would seem your script it right, and the game is reading it right, but that there is a problem with the .tga files. the sky i used was 768x768 from http://www.scentednectar.com/skyboxes/ but i dont know if that would make a diffrance.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 3:17 am 
Offline
has joined the game

Joined: Thu Aug 12, 2004 4:49 am
Posts: 25
Thats where mine came from too. The terragen link with all the skies. I did it at first with it unresized cause I forgot about it and it didnt work then I resized em all and it still didnt work so then I added the alpha channel to em all and saved em as 32bit and they STILL didnt work so now Im back to the 24bit ones. I have nfc why the qer image would show up and not the rest their all the same images from the same site /shrug. Its the same way with some of the ones in the editor already. Some show up black some work fine. I dunno wtf the problem is but its fuckin annoyin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 3:23 am 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
What's your Email? Will send you a .Rar with exactly what i have, and the file strucer, so all you have to do is unrar it into your base directory, if it still does not work, then its a problem with your game somehow, and if it works, then its somehow a problem with your files.


PS, not all the game skies seem to work for me eaither


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 4:12 am 
Offline
has joined the game

Joined: Thu Aug 12, 2004 4:49 am
Posts: 25
I PMed you my email addy. I read somewhere about a console command to stop texture caching that it doesnt reload the textures after theyve been cached once. If I can find the command again Im gonna try it and see if maybe thats the problem Ive been havin.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 4:21 am 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
From what i can tell, the command is only usefull if you want to not restart. but every time you restart it reloads everything.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 4:32 am 
Offline
has joined the game

Joined: Thu Aug 12, 2004 4:49 am
Posts: 25
Well yours works fine for me. The only difference between mine and yours is the tabulation of the .mtr file. When I extracted yours everything went into the same folders with my files but for some reason mine does work. Can I zip mine up and let you DL it and you try it out?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 4:41 am 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
sure... just send me the link, or send it though e-mail. i have a theory that its something to do with your .tga files. maybe your program is saveing it strangly, are you useing photoshop?


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 4:52 am 
Offline
has joined the game

Joined: Thu Aug 12, 2004 4:49 am
Posts: 25
Yeah Im usin photoshop 6. Heres the zip everything should be intact once youve got it lemme know so I can remove it from my guild webspace.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 5:19 am 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
I figured it out! you have one of your .tga's misnamed... you have "cloudyday_foward.tga" and it should be "cloudyday_forward.tga"


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 5:40 am 
Offline
has joined the game

Joined: Thu Aug 12, 2004 4:49 am
Posts: 25
...

well Ill be damned

Yeah... yeah... it works now...

Somethin so simple... I never woulda figured it out either. I woulda made a new set and probably got it right and never even looked for that 1 letter difference =/

I had _front before so that must be why it wasnt workin then either.

I gotta ty for figurin it out I know I never woulda lol.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 13, 2004 5:43 am 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
Ya i had _front in the tut :oops: , but i changed it now.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Sat Aug 14, 2004 3:46 am 
Offline
has joined the game

Joined: Tue Aug 10, 2004 9:21 pm
Posts: 30
Location: Clovis, California
The skies I have tried all display, they just never display in the proper order. I have tried about 8 different skies and not a single one lines up properly. All of the supplies skies with the game function properly. Here is a shot of the problem I am having.

Image

All of these skies have came already labeled with front, left, right and so on. Tried ones from The Wadfather page.

Post Edit: After testing skies from the Skybox Textures instead of Wadfather they appear correctly. It looks like the people submitting at Wadfather just don't know how to label properly. At least not on any of the skies I downloaded.

_________________
ASUS K8V Deluxe | Athlon 64 3200+ | BFG 6800GT OC | SBAudigy | 2x250GB 7200 SATA | 2x160GB 7200 | 2x120GB 7200 | 2x512MB DDR 3500 | 2 21" Monitors


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 14, 2004 6:55 pm 
Offline
is connecting to Doom3world.org

Joined: Sat Aug 14, 2004 6:49 pm
Posts: 1
What size should skybox textures be? 1024 by 1024 alright?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 14, 2004 9:44 pm 
Offline
The first 10 posts have been the best...

Joined: Wed Aug 11, 2004 6:46 pm
Posts: 15
i have only tired 768x768 but it would be intersting to see how big they can get.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 69 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group