Skybox Problems

Avatar
Loriot
1 Posts
Posted May 19, 2011

Hello, i have a Problem with a "custom" made Skybox for Portal 2

First I Extracted the milita Sky from CS:S
then I Put the VTF and VMT files in the Sky Folder (had to create it) for Portal 2
Then i?ve Build a Testmap with the militia Skybox texture as Skybox
I run the Map with this Result:

http://i.imgur.com/ylHHk.jpg

No brushs etc. I can hear Chell walking on the floor but i cant see something else but the Skybox.
And these ugly Borders are there.

Any Help?
Thanks

Advertisement
Registered users don’t see ads! Register now!
Avatar
Croolsby
29 Posts
Posted May 26, 2011
Replied 6 days later
I have the same problem too except I'm using sky_l4d_c4m1_hdr for my skybox.
Avatar
chimera201
129 Posts
Posted Oct 06, 2011
Replied 4 months later
I am also trying to make a custom skybox for portal 2

I made the six VTFs and VMTs using VTFEdit

Now i don't know exactly which folder to put them.

I tried putting them in a folder named "skybox" & "sky" inside 'SteamApps\common\portal 2\portal2\materials'

But that doesn't work or I must be missing something (or a lot of things).

Please help

Avatar
Vordwann
767 Posts
Posted Oct 06, 2011
Replied 2 hours later
I've never made a skybox before but maybe it's something about the render order in the .vmt?
Avatar
HMW
806 Posts
Posted Oct 07, 2011
Replied 19 hours later
When creating your vtf file, make sure that all 6 skybox images are combined into a single file. (You need to change the "texture type" setting in VTFEdit to something like "cube map" or "environment map". (Don't remember exactly how it's called.)

The VDC has some more information on this. (Scroll down to "Creating a Custom 2D Skybox Texture".)

Avatar
ChickenMobile
2,460 Posts
Posted Oct 07, 2011
Replied 10 hours later

I remember there was a previous topic about this. You need to add the HDR parameter into each .vmt, otherwise 3D skyboxes will not work properly, and other things.

"UnlitGeneric"
{
"$basetexture" "skybox/skyboxname_UP"
$hdrbasetexture "skybox/skyboxname_UP"
"$nofog" "1"
}
Avatar
chimera201
129 Posts
Posted Oct 09, 2011
Replied 1 day later

Ok I got the skybox working by looking through how Valve has made using GCFScape

Now I have this problem.
The texture does not occupy all the area as in the image.(lines down below).

http://cloud.steampowered.com/ugc/57781 ... 7F67E654C/

I really did not see any change in using UnlitGeneric or sky in the vmt
Also I don't know whether i am the only one having this problem :The model browser does not refresh the textures on hitting reload every time
Also is there a way to scale the texture?

Avatar
josepezdj
2,386 Posts
Posted Oct 09, 2011
Replied 30 minutes later
Hi Loriot,

I found the following tutorial at TWHL, just in case it halps you:

http://twhl.info/tutorial.php?id=106

This site is awesome and has excellent tutorials

Regards!

Avatar
chimera201
129 Posts
Posted Oct 11, 2011
Replied 2 days later
@ josepezdj:No offense but you should see the date when Loriot posted.
And the site describes skybox for hl2
Avatar
MWP
25 Posts
Posted May 28, 2012
Replied 7 months later
bumping up this old toppic for my skybox problems.

First of I can't find the militia skybox texture anywhere in my css folders..

Second problem i've got is that i realy don't know where to edit the .vmt filees. It's posible to do it through notepad but in what folder are they hidden?

Thanks in advance again! Realy hope one of you can spare the time helping me out.

Cheers,
MWP

Avatar
josepezdj
2,386 Posts
Posted May 28, 2012
Replied 2 hours later
Hey MWP, now that you bumped this thread up, I'll try to help you out with this:

  1. All skybox files should be located into your portal2/portal2/materials/skybox folder in order to work out for Portal2 (many skyboxes are located into the pak01_dir.vpk file though; you can open it with GCFScape). You should usually have 6 pairs of files (the 6 sides of a cube), a .vmt and a .vtf for each side.

  2. In order to edit the .vmt files you can use whatever text editor including the simple notepad.

  3. For the CSS's militia skybox, if textures are not in materials/skybox you could usually find it into the following file:
    \steamapps\counter-strike source shared.gcf

that you can also open it with GCFScape and it'll look like this:

img
Now go into the cstrike folder:

img
Navigate to materials/skybox and find the militia skybox textures in there (remember you'll need the 6 .vmt files + 6 .vtf files). Then click the right button of your mouse and select "Extract", then select whatever location into your computer.

I don't really know which .vtf version will these textures be, but Portal2 needs at least 7.4 in order to work, better 7.5. This can be easily changed by editting the .vtf with a HEX editor, but this is what I'd suggest instead in order to have a seamless sky (if you check the image that the OP posted, there are some white lines where the 6 sides textures meet, the following aboids that):

  1. Open each of the .vtf files with VTFEdit and export them as .tga files for example. Try to preserve the names as each texture has a UP file, DN (down), RT (right), LF (left), FT (front) and BK (back).

  2. Open each of the .tga files with Paint.Net (you can do this with Photoshop as well though). And save them as .vtf files (for this you will need a this plugin; or this one if you use Photoshop) with this important settings (the following tabs are Paint.Net's):

  3. General tab = Template: leave it empty / Image Format: ABGR8888 or DXT5 (Common)

  4. Flags tab = Tick "Clamp T", "Clamp S", "Hint DTX5", "Anisotropic" and "Eight bit Alpha"
  5. Advanced tab = Version: 7.5

(leave the rest tabs as they are)

  1. Now edit each .vmt file and make sure each has got the following inside:
"UnlitGeneric"
"$basetexture" "skybox/[name of each .vtf file]
"$nofog" "1"
"$ignorez" "1"
}
  1. Please all files (total 12) into Portal2/Portal2/materials/skybox folder.

  2. Now go to Hammer, open your map > map properties > skybox > [skybox name]. This is important: if your files names are for example militia_up, militia_dn, etc. you should put in skybox name "militia_". If the name is something like militiaup, militiadn, etc. just put "militia".

That's all! :biggrin:. You should make it to work with all that information.

If not, PLEASE post the error you have or the image so we can see what's happening.

Good luck.

Avatar
MWP
25 Posts
Posted May 28, 2012
Replied 1 hour later
Thank you very much for that excellent detailed description!
I got to the point of conferting the .vtf's to .tga's. (It says paint .NET Image after installing paint net) But in paint net the textures are white and grey checker boards... (they looked good in VTFEdit..)

Is that right?..

Thanks again for all your help! <3
MWP

EDIT: And the - General tab, Flags tab and Advanced tab are in paint.NET?
EDIT 2: Found the tabs in VTFEdit!.. :smile:
EDIT 3: I can't click the eight ball alpva in VTFEdit, and i see you said in piant.NET...

Avatar
josepezdj
2,386 Posts
Posted May 28, 2012
Replied 12 minutes later
  1. About the image file, well, you can export to whatever other image format, such as .jpg, .bmp, etc. It's not normal the grey/white checkerboards.

  2. The tabs I'm mentioning appear in Paint.Net when you start "saving as... vtf". Not ealier! Be sure you downloaded and installed the .vtf plugin for Paint.Net I mentioned, ok?

Avatar
MWP
25 Posts
Posted May 28, 2012
Replied 3 minutes later
Ah.. I thought that those where for photoshop use...
Thanks again!
Avatar
MWP
25 Posts
Posted May 28, 2012
Replied 15 minutes later
I did the .vtf addon for paint .NET but I still only see checkerboards.. :sad:
I will install paint .NET + addons again, hopefully it fixes the problem.
Avatar
Skotty
671 Posts
Posted May 28, 2012
Replied 15 minutes later
Checkerboards should mean that your VMT file has the wrong path to the VTF file.
Avatar
josepezdj
2,386 Posts
Posted May 28, 2012
Replied 1 hour later

MWP wrote:
I did the .vtf addon for paint .NET but I still only see checkerboards.. :sad:
I will install paint .NET + addons again, hopefully it fixes the problem.

OK, step by step:

  1. First open each file with VTFEdit, and then export each image to .jpg for example.

  2. Now download the Paint.Net's vtf plugin and place each of the 3 files into *\Paint.NET\FileTypes\ folder
    *

  3. Now just open each .jpg file with Paint.Net. You should be able to watch them clearly like this example:
    sky_day01_07bk.jpg
    img
  4. And now you should save each of those .jpg as .vtf files (here is where the plugin is needed)

  5. Follow the instructions into each tab as I mentioned above.

    Skotty wrote:
    Checkerboards should mean that your VMT file has the wrong path to the VTF file.

Well, as long as he didn't mean in hammer, the .vmt has nothing to do with this. I bet more for an alpha channel transparency image in which those grey/white checker boards are typical for the backgrounds.

MWP, if you still don't seem to get it, post your .vtf files and I'll make it for you.

Avatar
MWP
25 Posts
Posted May 28, 2012
Replied 8 minutes later
Got it!!

The militia skybox texture has 12 .vtf files, there are hdr types too... If I had chosen a different skybox texrure (one without hdr) i've gotten it my first try but it took me some time to figure it out... :smile:

For these hdr skybox textures the vmt should be:

&quot;UnlitGeneric&quot;
{
&nbsp; &nbsp;&quot;$hdrbaseTexture&quot;&nbsp; &nbsp;&quot;skybox/militia_hdrbk&quot;
&nbsp; &nbsp;&quot;$baseTexture&quot; &nbsp; &nbsp;&nbsp; &nbsp;&quot;skybox/militiaBK&quot;
&nbsp; &nbsp;&quot;$nofog&quot; &nbsp; &nbsp;&nbsp; &nbsp;1
}

Thank you josepezdj! :notworthy: You've been great help. I really appreciate it! I let you know when the map is finishd..

Avatar
josepezdj
2,386 Posts
Posted May 28, 2012
Replied 27 minutes later
Good to hear that!... Sorry that I didn't know about that specific skybox :redface: to tell you about the other files! Looking forward to see your map!
Advertisement
Registered users don’t see ads! Register now!
Avatar
MWP
25 Posts
Posted May 28, 2012
Replied 3 hours later
No problem man. If it wasn't for you my sky didn't look like this now.

http://s1251.photobucket.com/albums/hh5 ... rld_01.jpg

Thanks again!
:cube:

&