Advertisement
Page 1 of 1
3D skybox / portalsky / _skybox
#1
Posted 08 October 2008 - 04:52 PM
The concept of the _skybox entity is simple - it's a compiler only object that projects whatever is inside the closed off box where it's located onto wherever surface you have added a sky shader between the sky textures and the player world. Think of it as a full 360� camera and the point of projection is where the Radiant co-ordinates are 0, 0, 0 so if you have your map way off from that you will probably have to move it.
The trick to understand is the _scale value of the _skybox entity. Set it too 32 and things in the skybox will appear 32 times bigger on the skysurfaces, default 64 is 64 times, 1 is 1 time and pretty pointless, you can just skip using it then. With some care you can really match objects position in the skybox with objects in the player world. Look at $NulL's Subterra - he got some of the hilltops in the _skybox but the lower parts in the player world. I think it's a split ASE model. This is a a very good way of keeping the illusion of a big area but still have vis blocked between parts of the map. That's the trick of Herring, the mid building is a ceiling to floor wall but it looks like it's one place with the bridge placed in the portalsky.
The most important part is that the 'room' or box where the _skybox is located MUST be completely sealed off from rest of the map or the compile will crash. So this is one of the few occasion where the 'hollow' function is a good tool. Make a caulk brush, full squared and hollow it. Add the _skybox in the middle of the inside - viola! you have a portal sky to play with. A good place to have it is below your player world centered around the 0 Z axis. This way it will not influence the minimap's size or depth render.
Here's is how the box in Oildepot look in Radiant - I've removed 3 of the sides to show the inside. For clarity I've selected the _skybox entity.
You see the ocean surface, islands and the long tanker-brush. Look at the 'codey1' shaderfile for the shaders - I've notated it carefully (since I'd forget how the stuff works myself otherwise)
Couple of things:
- Textures have to be scaled down accordingly to _scale value. IE if you use 32 and have a texture in player area at 0.5000 you need to scale it to 0.0156. (0.5 / 32)
- No entities in there. So sadly no moving stuff. The moving tanker is a scrolling texture. I haven't tried if lights work but light emitting shaders do. AND shadows can be cast from the skybox to the playerworld!
- Also skyshader cloudlayers work as normal behind the skybox objects.
- misc_models work fine.
There's additional info in Radiants entity window and here: http://en.wikibooks..../Q3Map2#_skybox
and ydnar's original _skybox demo map can be found here: http://shaderlab.com...rlab_skybox.zip
(Don't add the def file he includes in the zip - it's in the base q3map2 now.)
cheers
The trick to understand is the _scale value of the _skybox entity. Set it too 32 and things in the skybox will appear 32 times bigger on the skysurfaces, default 64 is 64 times, 1 is 1 time and pretty pointless, you can just skip using it then. With some care you can really match objects position in the skybox with objects in the player world. Look at $NulL's Subterra - he got some of the hilltops in the _skybox but the lower parts in the player world. I think it's a split ASE model. This is a a very good way of keeping the illusion of a big area but still have vis blocked between parts of the map. That's the trick of Herring, the mid building is a ceiling to floor wall but it looks like it's one place with the bridge placed in the portalsky.
The most important part is that the 'room' or box where the _skybox is located MUST be completely sealed off from rest of the map or the compile will crash. So this is one of the few occasion where the 'hollow' function is a good tool. Make a caulk brush, full squared and hollow it. Add the _skybox in the middle of the inside - viola! you have a portal sky to play with. A good place to have it is below your player world centered around the 0 Z axis. This way it will not influence the minimap's size or depth render.
Here's is how the box in Oildepot look in Radiant - I've removed 3 of the sides to show the inside. For clarity I've selected the _skybox entity.
You see the ocean surface, islands and the long tanker-brush. Look at the 'codey1' shaderfile for the shaders - I've notated it carefully (since I'd forget how the stuff works myself otherwise)
Couple of things:
- Textures have to be scaled down accordingly to _scale value. IE if you use 32 and have a texture in player area at 0.5000 you need to scale it to 0.0156. (0.5 / 32)
- No entities in there. So sadly no moving stuff. The moving tanker is a scrolling texture. I haven't tried if lights work but light emitting shaders do. AND shadows can be cast from the skybox to the playerworld!
- Also skyshader cloudlayers work as normal behind the skybox objects.
- misc_models work fine.
There's additional info in Radiants entity window and here: http://en.wikibooks..../Q3Map2#_skybox
and ydnar's original _skybox demo map can be found here: http://shaderlab.com...rlab_skybox.zip
(Don't add the def file he includes in the zip - it's in the base q3map2 now.)
cheers
#3
Posted 03 February 2009 - 12:40 AM
Advertisement
#6
Posted 22 July 2010 - 07:49 PM
*resurrecting old but great topic*
i got a problem with _skybox. i created some brushes etc. and i put it into a hollowed caulk-brush as described.
ingame i got the following result:
it looks like it is simply not drawing specific tris .. dunno why. anyone who can explain this to me and tell me how to fix this?
advice form me: dont use _skybox. put all stuff directly in your map. its way easier and _skybox has no real advantage.
i got a problem with _skybox. i created some brushes etc. and i put it into a hollowed caulk-brush as described.
ingame i got the following result:
it looks like it is simply not drawing specific tris .. dunno why. anyone who can explain this to me and tell me how to fix this?
advice form me: dont use _skybox. put all stuff directly in your map. its way easier and _skybox has no real advantage.
This post has been edited by Drezil: 24 July 2010 - 10:47 AM
#8
Posted 21 January 2011 - 08:17 AM
Page 1 of 1
1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users
Advertisement