Jump to content
The Dark Mod Forums

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


7318

Recommended Posts

But the surrounding geo doesn't bob, the players head does. (unless the scripting makes the whole world bob instead of just the camera which seems a little off to me. why would someone script it that way, have the entire world move around the camera instead of the camera bob?)

 

Camera 1 :ie: players head needs to bob to make you feel like you are walking.

 

Camera 2: ie: skybox camera needs to remain static in relation to the world. It's only used for panning, x,y,z coords. So the skybox stays relative to the player in the world.

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

 

Now would be a great time for ANY TEAM MEMBER to take 5 minutes and load my map on SVN (test/skybox) . It's been up there for 3 years or so and I've mentioned it in EVERY thread regarding skyboxes to date. And yet still I have not gotten ONE comment on it.

 

And yet in this thread I have had multiple people already tell me I'm wrong.

 

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

The skybox is only shrunk to 16th scale to save space (which in Source engine is crucial to performance). For us it's just nice to save room. But it renders at full size, so the bob is still full size. And when a tower shifts by a foot or two at the junction with normal terrain it is quite noticeable.

 

When the starts which are just tiny dots miles overhead bob it really isn't noticeable. Also to mention that a lot of the bob is in the z plane so starts overhead move up and down, the player would never even see that.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I tested Baddcog's map.

 

While the geometry of the two towers bobs with the player's head, the tops of the towers--defined in the skybox--didn't bob, or didn't bob with the same relative movement. The result was that as I moved, the skybox tower tops bounced up and down into their corresponding bottoms in the map.

 

This might be fine for buildings that are in the distance, painted on the sky, but it doesn't work when you're trying to paint a building that has one part in the map and one part in the skybox.

 

Leaning left and right causes the skybox tower tops and map tower bottoms to separate, so there's no compensation when painting the skybox to account for the player's angled head.

Link to comment
Share on other sites

look, trust me, I got all this solved in the code above.

 

the scripting is not using all the precision this task demands I bet the script calls "idVec3 GetEyePosition( void );" from player.cpp

but this is only sueful for AI and other things that invovles other characters... not for the pov of the player due the lack of precision

this variable lacks all the bobbing and the shakes of the sounds.

I know this because I used to get the player eyes pos from this variable,

but not anymore...

 

everything related to portalSkies happens within playerView.cpp and within this in the "SingleView" function,

now at first the name of that function mad eme think it was meant only to be used in the first person situation, but as the code explains

both single and third personb (and i bet any "spectator" state) uses this function

 

void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view ) {

 

... a lot more things happen here

 

// hack the shake in at the very last moment, so it can't cause any consistency problems

renderView_t hackedView = *view;

hackedView.viewaxis = hackedView.viewaxis * ShakeAxis();

 

gameRenderWorld->RenderScene( &hackedView );

 

... a lot more things happen here like adding the hud elements and effects

 

}

 

as the function parameter explains this functions calls a pointer "*view", this is the real deal,

now this "*view" is not of the type idvec3 (it's not a x, y, z vector, well not only) it contains all the info for representing the pov

that's the reason it gets multiplied a "ShakeAxis()" function (wich is the sound shaking) and here is where skyboxes do the magic.

 

the gameRenderWorld->renders the world from that pov so if you can make a copy of it

and make the portalSky affect it in some way then you get the effect you wanted

 

this is what it did back at ROE

 

now I use gameLocal variable to pass info from the misc.cpp ( where the code of the portalSkies entities resides )

to the playerView.cpp, I use gameLocal because it has proved to work sinc the original ROE portalSky uses it also.

 

also gameLocal.cpp is useful because it let's me save locd and clear those variables for perfect gaming without strange hickes on the portalSkies

 

now all the magic happens per tick, in the same loop, in the same fucntion.

I can get a perfect match between common geometry and skyboxgeometry (one being a 16th smaller than the other) with results of real close geometry, player tocuhing goemtry, without loss, nor loss accumulation over time.

 

but you don't have to believe any of whatever I say, you got the code, and a sample map to test it.

 

unfortunately I'm on GNU/Linux and I don't know how to compile DLLs, if I knew i would have served also a DLL,

if someone had the patience to compile it I would be honoured.

it shouldn't be hard, download the GPL code, add the src in src.7z in the "neo" folder and compile as you would compile the normal GPL.

Edited by 7318

Biel Bestué de Luna - Github

Link to comment
Share on other sites

I better not mix gaming videos in my youtube account...

 

:o Wow, first time I think I've heard that coming from a gamer. Well fair enough then.

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

Now would be a great time for ANY TEAM MEMBER to take 5 minutes and load my map on SVN (test/skybox) . It's been up there for 3 years or so and I've mentioned it in EVERY thread regarding skyboxes to date. And yet still I have not gotten ONE comment on it.

 

Sorry, I didn't even know it was there.

 

As for the "bob" problem, is that solved by "7318"'s code? If not I think it can/could be easily solved (but not by me).

 

demagogue said:

 

 

 

Also, again, a 10 second video would go a long way. ;)Posted Today, 02:44 AM

 

Definitely. I still have only a foggy idea what this is all about.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

@Baddcog

Baddcog, what does got anything to do your map with my code? mine is a c++ implementetion but your's is an implementetiof through scripting? (I can't know for sure, because I can't acces to that area in the forum)

my code shoul be much easier to implement to the mapper than any scripting, as it's only done by dropping an trigering a single entity, no scripting involved.

 

@demagogue

who says i'm a gamer?

Edited by 7318

Biel Bestué de Luna - Github

Link to comment
Share on other sites

version 1.1 new features:

 

linux and windows

 

optimized code

 

solved issue with multiple global portalSkies

 

warning windows dll is from v1.0 (it doesn't give any error when multiple global portalSkies)

 

read the provided read.me for more insight on how to use it.

 

http://www.mediafire...u6aqxupmsafsc07

Edited by 7318

Biel Bestué de Luna - Github

Link to comment
Share on other sites

@Baddcog

Baddcog, what does got anything to do your map with my code?

 

Nothing really. I've just been trying to get this looked into for years and had a test map up that I've tried to get people to look at for years and get the issue resolved. I've brought it up quite a few times to no response then in this thread people are telling me I don't know what i'm taking about...

 

I'm going to try yours out today. Believe me, if it works like it should I couldn't be more excited about it.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I'm trying but after reboot I'm not having much luck getting my shortcuts set up right again. Been awhile since I did it, got a new OS so something is different.

 

"doom +set fs_game portalsky +set_allowconsole 1"

 

that isn't working, in target I keep getting 'not valid path'..

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I'm trying but after reboot I'm not having much luck getting my shortcuts set up right again. Been awhile since I did it, got a new OS so something is different.

 

"doom +set fs_game portalsky +set_allowconsole 1"

 

that isn't working, in target I keep getting 'not valid path'..

 

write your full path of doom3.exe for doom.

 

I have recorded and uploaded a short vid. Vimeo takes some time while converting. It will be ready in 20 mins.

 

 

 

EDIT: Vid uploaded.

Edited by SiyahParsomen
Link to comment
Share on other sites

yes there are three triggers fot three different portalskies in that room, the first with the archville show how a really close geometry matchres (look the pillar the bottom part of the pillar is on the room the top part of the pillar is on the skyBox (and it's 16 times smaller)) if you go back arround the pillar you can retrigger the global portalsky (the one with the archville)

 

the poralSky with the wraith it's a static one, it never change pos.

 

back wher eyou start the level firther back is a trigger that activates the local skybox, it contains a revenant. whenever you step in this triger_multiple (with a "wait" of 3 seconds) you will move the portal sky to it's original pos set in Darkradiant.

 

but the msot important feature in that test map is that pillar in the middle because it shows the match between two geometries (wich shows to the point in the video where SiyahParsomen has walked arround it without realizing that one part of what eh was watching was portalsky geometry)

Biel Bestué de Luna - Github

Link to comment
Share on other sites

you have to be trolling me on this!

 

Baddcog:

 

enter normal doom3... click on doom3.exe, or select doom3 from steam. or whatever you do to enter doom3

 

when you're in the main menu click on the "mods" button yo will get a list currently installed in your doom3 folder

 

is there any mod in the list called "portalSky infrastructure" or "portalSky infrastructure 1.1" ?

 

if there is click on it and you will be in it. you can skip the next steps and go directly to the part of the console...

 

if not then you have to install it

 

to install it you have to donwload this file: http://www.mediafire...u6aqxupmsafsc07 and decompress the contents in the doom3 folder

 

a new folder named "portalsky" should appear now within the doom 3 folder

 

if so, the mod it's installed now, and now it should appear in the mods list in the doom3 main menu once you enter back into doom3.

 

select "portalSky infrastructure 1.1" in the list and once selected click on "load mod" doom3 will go away and restart with my mod loaded in

 

once you're in my mod main menu bring down the console with "control" + "alt" + "~"(or whatever key you have under "esc")

 

the console will come down

 

write in the console the following command: testmap skies

 

intro and wait for a moment and you'll be in the test map shown in the video.

Edited by 7318

Biel Bestué de Luna - Github

Link to comment
Share on other sites

Um actually no I'm not.

 

I tried to load it through mods and Doom3 would just come up again.

 

For the TDM shortcut we can put in commands, I thought it was in the target box, but like I said new OS, new install, forgot to back that up and can't find it on the wiki or forums right now. In your read me you have that command list I posted above and I thought you were saying to put it into the target for Doom3 shortcut. But that's not working for me.

I haven't screwed with this stuff for awhile so ...

 

Anyway, I checked it out and it really doesn't show much imo. It's dark and hard to see and you have a giant imp in your face.

 

What I want to see is stacked terrain that doesn't move independently from world to skybox. Or bob with the head. This just seems like you are on a platform with a box looking at a huge skybox imp.

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

 

Well, I never mess with Doom, so outside of TDM is a bit foriegn and I don't know how drivers, etc.. effect things.

 

I have Catalyst AI turned off, though last time I jumped in TDM everything was upside down, I had that fixed before reinstall, but it's back :(

 

Anyway, maybe related. We have issues with ATI rivers, catalyst AI and upside down , reversed skybox, etc.. I actually have an issue where the moon jumps 30* in the sky when I go underwater.

 

In this map..

 

When I move with the global world skybox, the box in the skybox moves above the world box. If I look up, it moves up, if I look down it moves down. Where ever I move that box does NOT stay aligned to the worldspawn box.

(to confirm the issue I loaded a map in TDM, the moon is doing the same thing and I have never seen that before. Look up and the moon travels up in the sky, look down and it drops below the horizon.)

 

Furthermore I looked at it in DR and I see nothing that would set it's relation to the world. (ie: sky camera in skybox = 0,0,0 in the world, like it does in Hammer, and like I used in my test map). So I wonder how that is set up. The only entities I saw were the player start and the local skybox entity, along with the triggers.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I don't get it Baddcog, why so dissmisive on my work? :wacko: you're mixing things with TDM and my work wich it doesn't have anything to do with TDM at the moment.

 

in my map the box stays matched what are you talking about? are you talking about my test map? there are three portalSkies activated with tirgger_multiples in the map. the point of this testmap is showing the new diferent beheviours for the portalSkies, have you checked my map for real? in my testmap you should only see mismatch with the classic portalsky (the one with the wraith in it) the ones that contain a revenant and the archville, those are the global portalSky and the local portalSky, yo will see that in both cases the movement of the player including the bobbing movement, or the jumping movmenet all match consistently for every frame. isn't this right?

Edited by 7318

Biel Bestué de Luna - Github

Link to comment
Share on other sites

I think Baddcog won't be able to properly test your changes until Greebo, Grayman or Tels integrates your code into a test build.

 

TDM has too many customized changes to throw a TDM map into a non-TDM mod.

 

I wouldn't take it personally. I think Baddcog is just frustrated that his specific scenario cannot be evaluated yet...

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

but it can be played as any doom3 mod, it's got all the needed files to play it in windows now. so if he can play TDM he should eb able to play it the same. to test the testmap there is no need for implmentation in TDM, just open it as any other mod in doom3... oh well... I hope other people don't have that much problems to test it. guys do you have any input on this?

Biel Bestué de Luna - Github

Link to comment
Share on other sites

7318, Baddcog is not dissmissing anything, he's just not able to actually see or test the results we need. Your video shows the idea a little, but we can't see the effect of the head bob or leaning there, or how it will behave in the full Dark Mod setting with all the stuff we have going on (for example with using the bow or telescope or how it might or might not react to the wobbling of the mantle, etc). We all hope it works perfectly as you say, that would be truly excellent and most welcome.

shadowdark50.gif keep50.gif
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.
      · 1 reply
    • 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...