Jump to content
The Dark Mod Forums

Draft for "Following Skybox" Wiki


grayman

Recommended Posts

Please review this draft for a "Following Skybox" wiki.

 

This describes how I'm doing the Home Again sky, and it allowed me to create the template for the scaled down skybox buildings on the first try, so it might be useful for others.

 

Please comment and think about how you might go about doing this yourselves if you were to create a following skybox.

 

Once I get all the questions answered and incorporate other POVs, I'll write the wiki and post it.

 

Thanks

 

----------------------------------------------------------------------------------

 

Constructing a Skybox That Follows the Player

 

Terminology

 

Map – where the Player walks around

 

Skybox – provides the background to be painted on the map’s sky

 

Little Player – the 1/16th size Player in the skybox

 

Skybox Building – a 1/16th scale building in the skybox

 

Border – the “wall” that surrounds the map, representing the innermost encroachment of the skybox buildings

 

Skybox Border – a copy of the Border, at 1/16th scale, which will form the template for placing skybox buildings

 

Platform – a brush the info_player_start sits on, helpful in placing the info_portalsky

 

Little Platform – a scaled down copy of the Platform, used in the skybox

 

How it Works

 

The info_portalsky’s camera in the skybox changes its position according to where the Player’s eyes are in the map. As the Player walks around the map, Little Player—whose ‘eyes’ are the origin of the info_portalsky—“walks around” in the skybox, but his moves are 1/16th the size of the Player’s.

 

Finish the Map First

 

Construct your map (using any prefab skybox) and get it to the point where you don’t plan to make any more major layout changes. The longer you put off making the following skybox, the better. For a city mission, you aren’t going to need to completely surround your map with skybox buildings. You’ll only need the buildings (or parts of buildings) the Player will see. And you’re not going to know where you need skybox buildings until you’ve completed your map buildings. No point in spending time constructing a lot of tiny skybox buildings the Player won’t see.

 

Create the Border

 

Build a Border around the map, and snap it to the 128 grid. What you’ll be doing later is making a 1/16th copy of the Border, and if you use the 128 grid size when creating your map Border, your skybox Border will be able to snap to the 8 grid. The Border is separate from the brushes you used to represent the sky when you were making the map. Those sky brushes are the canvas the sky will be painted on. The Border is just a helper to assist you in placing your skybox buildings.

 

Once you’ve encircled your map with a Border, go to the various places in the map the Player will go, and see what kinds of sightlines you have to the Border. Delete the Border brushes the player isn’t going to see, and shrink the Border brushes the Player’s only going to see a part of. Raise or lower the tops of the Border brushes to the heights you’ll want the skybox buildings to be. What you’re after is a final template for where to place skybox buildings.

 

Create a Platform beneath the info_player_start so it’s sitting on the Platform. It doesn’t matter whether the Player is starting inside a building or out in the open. The info_portalsky’s camera will be synced to the Player’s eyes at map start. Whether you start the Player on the ground, or a few units above the ground, or you have him dropping from a height as if he just scaled a wall, the sync occurs before he starts to drop.

 

Create the Skybox Border

 

Make a copy of the Border, including the Platform, and scale it to 1/16th size. The best way to do this is to enter Vertex mode and scale the vertexes in each direction. Texture all the brushes to something other than caulk.

 

Reshape your existing skybox so it surrounds the Skybox Border.

 

Turn the Little Platform into a func_static.

 

Copy its origin to the info_portalsky.

 

Raise the info_portalsky so it’s sitting on the Little Platform.

 

Raise the info_portalsky another 4.25 units. (68/16 = 4.25) This places the info_portalsky’s camera at a position that syncs with the Player’s eyes at mission start.

 

Add this spawnarg to the info_portalsky: “type” “1” This is the GLOBAL setting for having the Little Player’s eyes follow the Player’s eyes wherever he goes.

 

You won’t ship the Platform or Little Platform, but don’t delete them yet. If you need to move your info_player_start, you’ll need these platforms to resync the info_portalsky to the Player’s eyes.

 

Either delete the original Border (in the map) or move it off to one side, out of the way. If your Border is completely outside the bounds of your map to start with, you can skip this step. Be careful not to delete any Border brushes that are also part of your map’s sky.

 

Test

 

Dmap and test your work. In the game, you should see the Skybox Border in the places where you’re going to put your skybox buildings. This test will give you a sense of whether you’re on the right track.

 

Convert the Skybox Border to Skybox Buildings

 

Replace the Skybox Border brushes by 1/16th scale buildings. The textures on the buildings need to be scaled to 1/16th their size when used in the map. For example, if you’re used to using a certain wood texture at 0.5 scale in the map, and you want to use it on a skybox building, the scale should be 0.5/16 = 0.03125. Delete the Skybox Border brushes as you replace them with buildings.

 

Models

 

You can use models in your skybox. Use the ‘rotation’ spawnarg to scale them down. For example, scaling a model to 1/16th of its normal size is done with

 

“rotation” “0.0625 0 0 0 0.0625 0 0 0 0.0625”

 

You can then rotate the model using DR’s buttons if you need to re-orient the model.

 

Lights

 

You can use lights in your skybox. You’ll need to scale down the light radius, though. A light that normally has a radius of 320 320 320 should be scaled down to 20 20 20.

 

The Moon

 

You can’t use a moon brush in a following skybox. As happens with any skybox building, the orientation of the brush in the sky will change as the Player moves and the skybox camera moves in sync. If you need a moon, use a skybox night texture that has a moon as part of the texture.

 

Skyscrapers

 

If you want the lower part of a building in the map and the upper part in the skybox, do the following:

 

Create the entire building in the map. Raise the top to the height you want. This can just be a simple brush, or it can be decorated. Split it at the height where you want the map bit to stop and the skybox bit to start. Add the upper part to the Border, so it gets copied and scaled with the rest of the Border.

 

Delete the upper portion in the map.

 

The 1/16th portion in the skybox can be decorated to represent the upper part of the building.

 

Multiple Following Skyboxes

 

If your mission changes the sky, you’ll want one skybox for each sky. For this discussion, let’s assume that halfway through the mission, the original clear starry sky has become cloudy and snowy while the Player was inside a building. So you’ll have one skybox with a starry night texture and info_portalsky1, and a second skybox with clouds and info_portalsky2. Each skybox gets whatever skybox buildings it needs to portray the part of the map the Player is in. Perhaps it’s the same neighborhood (the Player went through a door into a building and came back out the same door later), in which case you can create one skybox and just copy it. Put info_portalsky1 in the first skybox and sync it to the info_player_start.

 

Now, where should you put info_portalsky2?

 

You can’t simply place it in the same spot as info_portalsky1. You need to place it in the skybox in a spot that’s synced with where the Player’s eyes are at the moment some action of his triggers info_portalsky2. Maybe a certain door gets opened. Try to estimate where the Player’s eyes will be at that moment, and use whatever referencing method you like to find that spot in the skybox. Place the bottom of info_portalsky2 at that spot.

 

Give each info_portalsky the spawnarg “type” “2”. This is the LOCAL setting.

  • Like 4
Link to comment
Share on other sites

Good text. I had some trouble understanding the Border and how it is supposed to be "built around the map." Does the border equal to the skyportal texture?

 

A few screenshots of the key phases would be good.

 

Anyways, I pick up that you build the border, then scale it down into the skybox size manually and then work in the skybox in the marked areas to get a skybox done. It can be difficult and tedious to work in a small scaled environment. Also the manual border downscaling sounds like a chore.

 

Could the workflow be simplified like this:

1) Build ON the border like normal DR building. Everything goes to the large player-sized grid and into a separate layer.

2) When done, export this layer as an ASE skybox model.

3) Optional: One could import the skybox model into blender and do some extra magic there.

4) Delete original skybox brushwork layer.

5) Import ASE skybox model into the map, scale skybox model down to 1/16 scale.

6) Put it into the skybox. For easy skybox camera aligment, you could have the Platforms as nodraw brushes. One is in the real world, the other is in the skybox model.

7) All ready.

 

Oh, and one more thing: does the player really need to be dropped to the ground upon map start? It might cause an immediate alert to the nearby AI.

 

Could the platforms be simply nodraw squares on the ground level. Mapper could see them z-fighting on the ground, and use them for skybox camera aligment like suggested. The player would never see them. The best thing would be that there would be no need to drop the player to the ground upon map start.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Oh, and one more thing: does the player really need to be dropped to the ground upon map start? It might cause an immediate alert to the nearby AI.

 

Could the platforms be simply nodraw squares on the ground level. Mapper could see them z-fighting on the ground, and use them for skybox camera aligment like suggested. The player would never see them. The best thing would be that there would be no need to drop the player to the ground upon map start.

 

The "player dropped to the ground upon map start" appears to be just one example of how the player is started. It seems the key thing here is that where ever the player is started, be it on the ground, off the ground, mantling a fence, etc., the platform and the info_player_start need to have their top and bottom, respectively, at the player's eye level so that it is correctly synced.

 

That is my impression anyway, I could be wrong as well but that appears to me to be how it is illustrated.

 

"Could the platforms be simply nodraw squares on the ground level." -- Again, from the text it seems like these need to be at the player's eye-level, the top of the platform and the bottom of the info_player_start.

 

The platform serves no purpose other than to be a place holder where the mapper can mark possible places the skybox will change, from the players eye level.

 

That's what I gather from the wiki text.

Edited by Lux
Link to comment
Share on other sites

Dropping player to ground: This is how some maps start, and there's even a prefab for it. It simulates having just dropped off the top of a wall.

 

Regardless of where the info_player_start is, Platform is built as if info_player_start is standing on it. You can texture it any way you want. In the end, when you release the mission, you can delete Platform and Little Platform, so it doesn't matter what you texture it with. They have no purpose after you've used them to sync the map with the skybox.

Link to comment
Share on other sites

I do intend to include pictures.

 

Wrt building the skybox buildings full scale in the map, converting them to a model, and scaling the model and placing it in the skybox, two comments:

 

1 - Can we un-model models? Revert them back to func_static?

 

2 - When deleting the original full scale buildings, you'll need to fill in any gaps that creates with your sky brushes.

 

3 - When building full scale buildings, you have to get into the habit of not over-detailing them. It might not be obvious that you don't need a window frame when building full scale, but clearly obvious when you're building them at 1/16th scale.

Link to comment
Share on other sites

1 - Can we un-model models? Revert them back to func_static?

 

No, Once it is an ase model, you can't go back. This might actually means the mapper should prolly cut the skybox geometry layer into another file while before they release their missions. It would be nasty if they had to rebuild the whole thing because a stupid mistake presents itself.

 

2 - When deleting the original full scale buildings, you'll need to fill in any gaps that creates with your sky brushes.

Well, not necessarily. If the Bounds mean skyportals, you could just keep the skyportal brushes, but hide them. Then build the skybox buildings into the void into which you will see through the holes left by the hidden skyportal brushes.

Then export model, and cut the real skybox geometry layer elsewhere for safekeeping.

 

 

3 - When building full scale buildings, you have to get into the habit of not over-detailing them. It might not be obvious that you don't need a window frame when building full scale, but clearly obvious when you're building them at 1/16th scale.

 

True dat. One gotta remember that they are now in 'skybox building mode' and operating by the keep-it-simple principle.

But the gain with the real-size building process is that it should look exactly the same in the skybox as what it is in the real size building phase. And the mapper does not need to do awkward brush resizings by hand at all. Just build like you would anyway, but into the void, then make a model and rescale.

 

The more I think about it the more enthusiastic I am. It might even work, if the model rescaling works without a hassle.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

1 - Can we un-model models? Revert them back to func_static?

 

As stated above, this cannot be done. However, you can use the "inline 1" spawnarg on models to make them

behave like worldspawn.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 10 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...