Urban Terror Forums: 3D skybox / portalsky / _skybox - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

3D skybox / portalsky / _skybox Rate Topic: ***** 1 Votes

#1 User is offline   codey (old) Icon

  • Joined: 07-February 04
  • Posts: 752
  • Locationrepublic.stockholm.se

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.

Posted Image

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



#4 User is offline   blackrayne (old) Icon

  • Joined: 06-April 04
  • Posts: 479

Posted 11 February 2009 - 08:29 PM

codey yer avatar frightens me.....

#5 User is offline   Muffie Icon

  • Account: muffie
  • Country:
  • Joined: 28-February 10
  • Posts: 3,313

Posted 11 February 2009 - 09:24 PM

Quote

codey yer avatar frightens me.....


The movie is a cult classic.

Killer Klowns from Outerspace  :evil:

@deli, idk how i missed that, im gonna check it out when i get home  :-)

#6 User is offline   Drezil Icon

  • Account: drezil
  • Joined: 28-February 10
  • Posts: 330

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:
Posted Image

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


#7 User is offline   onslaught Icon

  • Account: onslaught
  • Country:
  • Joined: 07-May 10
  • Posts: 87

Posted 21 January 2011 - 06:31 AM

since the important part of this is missing and the links don't work please remove.

#8 User is offline   LynXIII Icon

  • Account: lynxiii
  • Main tag: C.M.M.
  • Country:
  • Joined: 09-December 10
  • Posts: 214

Posted 21 January 2011 - 08:17 AM

View Postonslaught, on 21 January 2011 - 06:31 AM, said:

since the important part of this is missing and the links don't work please remove.

I request the skybox tutorial to be added to deliriums wiki, before it gets deleted! :smile:

This post has been edited by LynXIII: 21 January 2011 - 08:19 AM


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2020 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942