lfnetwork.com mark read register faq members calendar

Thread: Making a skybox from a map
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 12-02-2004, 09:48 AM   #1
Mercenary
 
Mercenary's Avatar
 
Join Date: Jun 2002
Posts: 381
Making a skybox from a map

This is my way of making a skybox from a map. You can probably get the same result by using console commands but this way works just fine.

This is very useful when you don't have expensive software and you need a skybox with buildings for a Coruscant level or a natural scene made of models and effects and just about anything you can create in Radiant. Unlike a skyportal this won’t hurt your game performance, so think of this as a substitute of some sorts.

Requirements

-skybox making experience. If you don’t have any, find a tutorial before you attempt this.

-no scripting experience is necessary but you should have BehavED setup properly and know how to use it.

-last but not least, you should know how to map and use entities.

Put your GtkRadiant settings to single player.

In Radiant, make your scene (map) and place a ref_tag where you want your camera to be. This may take some practice to get it in the right place for your particular scene. With the ref_tag selected, hit the “n” key to bring up the entity window and enter the following:

Key: targetname
Value: cam1

Place a target_scriptrunner in your map and make your info_player_start target it. With the target_scriptrunner selected, hit the “n” key to bring up the entity window and enter the following:

Example: Key: usescript
Value: test/skybox (do not enter it this way: scripts/test/skybox.IBI)

Compile your map.

Copy the following script and paste it into notepad and save it as a .txt in your scripts folder. Make sure the path matches the one you specified in your target_scriptrunner.

//Generated by BehavEd

rem ( "SKYBOX SHOTS" );
camera ( /*@CAMERA_COMMANDS*/ ENABLE );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam1", ORIGIN)$, 0 );
rem ( "===========================" );
rem ( "sky_rt" );
camera ( /*@CAMERA_COMMANDS*/ PAN, < 0.000 0.000 0.000 >, < 0.000 0.000 0.000 >, 0 );

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{
sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/r2d2/misc/r2d2talk03.mp3" );
}

wait ( 4000.000 );
rem ( "===========================" );
rem ( "sky_bk" );
camera ( /*@CAMERA_COMMANDS*/ PAN, < 0.000 90.000 0.000 >, < 0.000 0.000 0.000 >, 0 );

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{
sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/r2d2/misc/r2d2talk03.mp3" );
}

wait ( 4000.000 );
rem ( "===========================" );
rem ( "sky_lf" );
camera ( /*@CAMERA_COMMANDS*/ PAN, < 0.000 180.000 0.000 >, < 0.000 0.000 0.000 >, 0 );

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{
sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/r2d2/misc/r2d2talk03.mp3" );
}

wait ( 4000.000 );
rem ( "===========================" );
rem ( "sky_ft" );
camera ( /*@CAMERA_COMMANDS*/ PAN, < 0.000 270.000 0.000 >, < 0.000 0.000 0.000 >, 0 );

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{
sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/r2d2/misc/r2d2talk03.mp3" );
}

wait ( 4000.000 );
rem ( "===========================" );
rem ( "sky_dn" );
camera ( /*@CAMERA_COMMANDS*/ PAN, < 90.000 0.000 0.000 >, < 0.000 0.000 0.000 >, 0 );

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{
sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/r2d2/misc/r2d2talk03.mp3" );
}

wait ( 4000.000 );
rem ( "===========================" );
rem ( "sky_up" );
camera ( /*@CAMERA_COMMANDS*/ PAN, < -90.000 0.000 0.000 >, < 0.000 0.000 0.000 >, 0 );

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{
sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/r2d2/misc/r2d2talk03.mp3" );
}

wait ( 4000.000 );
camera ( /*@CAMERA_COMMANDS*/ DISABLE );

Open the script in BehavED and compile it.

The way this script works is that the camera will face all 6 directions in succession and you’ll take a screenshot for each one. An r2d2 noise will notify you of a direction change, this is in case your scene is so similar that you don’t notice the change.

Crank up your video card settings and your JA video settings to get the best picture quality possible but don’t bother with the resolution because you’re going to force it to 1024 x 1024 anyways.

Start up a JA single player. In the opening menu bring down the console and enter the following:

cg_draw2d 0
bind x screenshot (you can bind another key if you want)
r_mode -1
r_customheight 1024
r_customwidth 1024

Restart JA single player. If you did the console commands correctly the game should occupy a square space on your desktop the next time you start up the game. Load up your map and get ready for the first screenshot because the script will run right from the start. Use the key you bound to take the screenshots. You have 4 seconds in between shots and be careful not to take the screenshot when there’s text in the top left corner of the screen "Wrote screenshots/shot0000.jpg".

When you’re done, bring down the console and reset your original resolution and exit the game.

Example
r_customheight 600
r_customewidth 800

Go to your base folder and open up the screenshots folder. Cut and paste your screenshots to a folder, in the textures folder. Rename the screenshots based on the order they were taken. If you look at the script it indicates what to name your 6 sides, starting with; sky_rt, sky_bk, sky_lf, sky_ft, sky_dn, sky_up.

Make your sky shader and don't forget to add your shader file to the shaderlist.txt in the shader folder. Make a new map and test out your new skybox.
Mercenary is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > General Editing > Making a skybox from a map

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:48 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.