Jump to content
The Dark Mod Forums

[Resolved in TDM 2.06] implementing 3d skyboxes that follow the player


7318

Recommended Posts

Why do you want the skybox to move with the player?

 

It should be fixed to the terrain (houses don't move because they are far away)

 

Just like the moon, you want them to stay put for a 'proper' skybox. This is the weirdest thing I have ever heard, making the skybox move so it stays with player? That breaks the illusion that it is far away stuff.

  • Like 1

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

The concept is to retain motion parallax with distant objects. It maintains the illusion better than a static skybox. This would also help solve your issue

with head bobbing mismatch with the skybox. This is exactly how TF2 and HL2 does skyboxes so it should be right up your alley?

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

TF2 and HL2 DON'T move the skybox realative to the player. It's fixed to the rest of the world so a building can be in skybox and at the map boundries and there isn't anything weird happening.

 

I get that it might be a 'cinematic' thing. But it just looks plain wrong. When I walk I don't want a tower following me, I want to see it's position relative to the world.

  • Like 1

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Look at the video:

 

http://forums.thedar...post__p__276840

 

No illusion is broken here AFAIK?

 

I think there's a language barrier issue about what "moving with the player" means in this context.

Edited by nbohr1more

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

I did watch the video, I also played with the whole skybox thing a long time ago.

 

'moving with the player', what other context is there? If it 'moves' with the player it moves. If it doesn't...

 

The issue WE need to fix is to have a stationary skybox that doesn't 'bob and weave' with the players head.

---

 

I've been saying that for years but nobody seems interested. If we want good rooftop missions we NEED it.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

If the skybox remains stationary in relation to the player's bob or tilt, you will see it shift. If it moves in alignment with the world view as if it

is part of world geometry then you will not have those weird artifacts. The video demonstrates that the skybox meshes perfectly with real world

geometry. There are no artifacts from the skybox having one set of render rules and the world having another.

 

In essence. if the world moves in relative to the player view so should the skybox in some fashion (together in sync). Yes it should remain static relative to the world.

But is should react to the player movement to approximate what real static geometry does when you move. I think this is what is meant by "moves with the player".

 

Your point is correct but how you lock the skybox to the world requires it to move according to your orientation.

 

I think the current skybox has some sort of approximation of distance parallax which breaks this rule, and it obviously has shortcomings.

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

For the time being, you might wanna try BloodRayne's "Skydome" method:

 

http://www.doom3world.org/phpbb2/viewtopic.php?t=8964&highlight=skydome

 

http://www.doom3worl...ghlight=skydome

 

Basically you make a huge-ass semi-sphere model and texture it with a cubemap stretched to fit the shape.

You might even improve on his work by adding a normal map

 

You might even be able to improve on it.

 

According to the above thread, this has even better performance than regular skybox rendering even with all the extra polys...

 

There's even a working download link of an example map.

Edited by nbohr1more

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

There was a debate about what 'moving skybox' means earlier in this thread if you are still feeling confused.

 

A 3d-skybox is a skybox with 3d objects that mock up distant or nearish structures. The purpose is to make it look like there is world outside the play area, too. It is scaled in 1/16 so that it is inexpensive in terms of memory and map space.

 

In order to make it look right, the objects in the skybox must move in parallel when the player moves around. I think this technically means that the skybox camera must move in the skybox with the player, with 1/16 the speed the player moves. (Someone more involved with skybox theory can correct if necessary.)

 

The desired effect is that the distant/nearish objects in the skybox move as the player moves,in perspective, just like the distant objects move in real life.

 

At present the skybox objects aren't (or skybox camera isn't) moving at all so current TDM skybox implementation is suitable only for *really* distant objects like seen in KM. Getting the skybox cam to move with the player will enable relatively realistically behaving prop buildings in the skybox, like nearby castle towers and such. When the player walks by, the castle tower would move in perspective.

 

Hopefully this will clear the confusion?

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Synching to the player is just a means to the ultimate end of being synched with the objects in the map-space relative to the player, so you have to factor for things like headbob and crouching (e.g., you don't want the skybox staying "still" relative to the player into a crouch because then it would follow the player down while the surrounds go up); anything that would move the surrounding space should move the camera accordingly (translating or rotating). That video above shows what's going on well enough because he walks right up to a skybox object & walks around it, and you can't see the seam -- it looks & moves like an in-world object for all you can tell.

 

Komag's The Swing could fake it convincingly because the entire map space intersected the skybox on just a hinge (at points) that the skybox camera just rotated on (and kept rotating on, even if you managed to get down to ground, which would then move under your feet). If the map intersected the box at a line, like walking down a street with the skybox on the other side of buildings, then you need all the camera nuances that go way beyond Komag's simple method.

 

Edit: Actually I don't know the details. Did The Swing's skybox cliff move "up" as the player climbed the swing, or did he account for that too by moving the camera up as well? I don't recall seeing anything odd like that.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

That video above shows what's going on well enough because he walks right up to a skybox object & walks around it, and you can't see the seam -- it looks & moves like an in-world object for all you can tell.

 

Actually he does not walk *around* a skybox object. That is impossible in a setup he has in there: a boxy room with skybox texture on the walls. And you can actually see the seam on the floor, where the real world ends and the skybox starts. (He looks at the seam with the flashlight and you see the light will not affect the skybox floor.)

 

I don't mean this to be nitpicking, my motivation is just to make sure people will not be confused about this so that we won't be straying into nonsense.

 

But I agree that it will be interesting to see whether leaning, crouching and similar stuff will work properly in the new skybox implementation. If they do work out of the box, this improvement will bring new level of background detail to the mapper's grasp!

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Sorry, you're right. In my head I meant he was just walking around and it was moving as expected (walking around it like up nearby it, or like you walk around a neighborhood), not that he literally walked around it. But it was a terrible word choice on my part.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

I think grayman already explained it well on page 1:

 

This is how I translate this:

 

Think of standing at the southern end of Bridgeport. Looking around, the portal sky paints the buildings that are in the southern part of your 1/16th cityscape.

 

Now walk to the northern end of Bridgeport. When you get there and look around, the portal sky paints the buildings that are in the northern part of your 1/16th cityscape.

 

At any point along your walk through Bridgeport, the portal sky changes what it paints to reflect where the 1/16th version of you is in that 1/16th cityscape.

Link to comment
Share on other sites

Silly or not, I understand that Baddcog's personal motivation is to address static 2D skybox behavior rather than 3D skybox behavior which

has it's own requirements AFAIK (new topic?).

 

That said, I believe what I said echoes much of what Sotha and Dema stated. Eg; If the player's camera does it, so must the skybox camera. If that

doesn't happen, then there will be visual anomalies where the skybox does not appear to be attached to the world. I think this applies to 2D skybox

behavior too.

 

As for the Skydome example I posted. It does not use skybox or portalsky behavior at all. It is simply a static textured model. I am pretty sure

you can apply skybox texture to a cube and it will still look like a sphere because of how the engine renders a cubemap?

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

  • 4 weeks later...

i dont understand this either.

as it is now the skybox camera projects its image from a point between the players eyes in doom 3, thats why you get head bob in the 3d skybox.

in half life 2 the skybox camera projects its image from the map origin, its not attached to the player and thats why you dont get head bob in half life 2's 3d skybox.

 

the 1/16th scale is the same with both engines relative to the skybox, although in half life 2 you can change that scale to 1/32 or 1/64.

to get it like half-life 2 you would only have to change the position of where the 3d skybox camera projects it image from to be in the same place as the 3d skybox image in half-life 2, it should be possible as half-life 2 is based on a idtech engine.

eg detatch projection point from the player and put it at the origin. that would elimite the head bob and would allow the 3d skybox to be easly matched up to the main map as you would just take mesurements from the map origin. and scale it with the center of the skybox camera's origin.

Link to comment
Share on other sites

ok I've made two video's to shown the problem baddcog is trying to explain but you aint getting the point.

 

http://www.youtube.com/watch?v=zXfHcQXYZN4

 

the first video show how the 3d skybox works in half-life 2 source engine, it starts with the 2d skybox, then add the sky box camera and add a column in the world and the rest of the column in the skybox, basically where the texture changes is where the skybox starts.

 

http://www.youtube.com/watch?v=zYX4xcJ4l50

 

the second video shows that the object in the skybox that is supposed to stay attached to the top of the column in the world, doesn't actualy get any where near it as there's some type of offset built into the portal camera, basically both maps were built the same way. and should show the same image at the start, later in the video I dragged the camera in the skybox closer to the object in the skybox, and so you can see it match the players head bob and waddle when the player moves.

 

the title of the topic is way misleading as in doom 3 and the dark mod the skybox does follow the player, while in the source engine it works how it would in the real world.

  • Like 1
Link to comment
Share on other sites

the example map is not a really good example of what a 3d skybox is for. its supposed to add height to buildings, or add buildings you cant get too, like making a couple of streets and buildings then adding a 3d skybox to make the streets look like they are part of a larger town. it looks like your in a box, with oversized AI, that doesn't fit the smaller room you are in.

it does not fix the problem with the head bob and waddle in the skybox.

the only way it will really work is to somehow get the portal sky camera to project its image from the origin and not attached to the player, it currently just amplifies the players movements in the skybox

which means a camera for the players eyes and a seperate camera for the skybox.

seeing as half-life 2 is based off idtech 4 engine, it must be possible if valve did it.

and the skybox would have to be at scale 1/16 else there's no point in having it at a scale of 1/1, you would have to visportal the skybox, and as far as I know you can't cos you would have to open and close the visportals in the skybox via a script and a type of trigger that doesn't exist. as in a is_the_player_looking_at_me_trigger if so open visportal in skybox else close it.

Link to comment
Share on other sites

cube maps are not like sky boxes, cube maps create reflections for surfaces in world that reflect the world around them, like water surfaces. when source creates cube maps the engine visits every silvery ball in the compiled bsp map and creates 6 images for each ball. based off the origin of the silvery ball and its point of view of the compiled world around them, can only be done when compiled map is running in the source engine, you open the console and type buildcubemaps to run the program to make them. the 3d skybox already exisits in the map when cube maps are built.

Link to comment
Share on other sites

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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...