360 degree chase camera

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Fri Jan 23, 2009 7:36 am

  • Well .. sidewards movements weren't designed to rotate the camera, this is why when you are looking to a fixed point the camera tends to move "tangentially" instead of moving in circles. I've noticed that if you move the camera right/left and forward at the same time it actually rotates in the "look to player" mode, but not on any radius. Its like it gets closer to the player to a certain distance then it rotates around the player without any problem.
    I'm sure that fixing this will be really entertaining :)

    Thanks again for testing it!
    Last edited by mand1nga on Tue Jan 27, 2009 12:49 am, edited 1 time in total.
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Mon Jan 26, 2009 11:32 am

  • About free camera control... I made this cfg to alias

    Code: Select all
    alias _calias "alias +c$1 set camera_direction_$2 ${3}1; alias -c$1 set camera_direction_$2 0"

    _calias forward x ""
    _calias back    x -
    _calias left    y ""
    _calias right   y -
    _calias up      z ""
    _calias down    z -


    It feels quite wrong when you use key combinations: when I go forward and left, my actual camera speed is 1.414 times the speed when I go only forward (square root of 2)... It could be possible to tweak the cfg to get "normal" behaviour, but it will be a pain and look quite complicated :p

    Can't you just use the user's movement input from +forward etc. ?
    Meh.
    User avatar
    Mr. Bougo
    Keyboard killer
     
    Posts: 760
    Joined: Mon Sep 10, 2007 3:29 pm

Mon Jan 26, 2009 12:18 pm

  • camera_max_speed 1 to disable camera strafe running? ;)
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Tue Jan 27, 2009 12:48 am

  • Good points Bougus. I'll see what I can do with that strafe effect :P

    Also re-using the +forward, +left, etc keys for controlling the camera position sounds to me like a good idea.
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Wed Jan 28, 2009 10:05 am

Thu Jan 29, 2009 1:29 am

  • Could you make it zoom out more when the person has the flag in CTF?

    This is awesome, thanks for working on this
    uluyol901
    Member
     
    Posts: 16
    Joined: Sun Jan 25, 2009 7:39 pm

Sun Feb 01, 2009 5:07 pm

  • It feels quite wrong when you use key combinations: when I go forward and left, my actual camera speed is 1.414 times the speed when I go only forward (square root of 2)... It could be possible to tweak the cfg to get "normal" behaviour, but it will be a pain and look quite complicated :p

    Fixed
    3) when I press move left and move right very fast after another (again and again... like strafing left and right with the camera all the time) the movement of my move_left isn't recognized

    Fixed
    Also re-using the +forward, +left, etc keys for controlling the camera position sounds to me like a good idea.


    Now the camera is controlled by the standard movement keys, plus the not very popular +moveup/down commands, and the camera-specific commands +roll_left/right. As probably no one have binds for the +moveup/down cmds, I've set camera_forward_follows 1 as default in order to provide an spectator-like camera. This enables all movements but rotating, without the need of adding extra binds.

    The cvar set hasn't changed since last time. Now this is my config:

    Code: Select all
    bind MOUSE1 +roll_left
    bind MOUSE2 +roll_right
    bind MOUSE4 +moveup
    bind MOUSE5 +movedown


    Thanks again for the feedback :)
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Sun Feb 01, 2009 5:08 pm

  • esteel wrote:IIRC you can (un)registerCommand in csqc to hijack those functions..


    Epic timing, I owe you one :)
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Sun Feb 01, 2009 7:03 pm

  • uluyol901 wrote:Could you make it zoom out more when the person has the flag in CTF?


    You can do it just taking some distance from the player or playing with the fov cvar. As this camera is intended for generic purposes I don't think it would be wise to change its behavior according to the game type. Think about what "zoom out" means, you can end with the camera inside a wall in some maps.
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Mon Feb 09, 2009 4:47 am

  • How does it work? I'm using camera_enable 1 but it doesn't
    Does it work with every demo?

    Btw I was expecting that this stuff can be activated simply pressing a key (left click could be nice) while watching a demo.
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

Mon Feb 09, 2009 8:28 am

  • It will only work with recent demos, the ones that incorporate a csprogs.dat inside the demo file that has some sort of camera built in already. Note that older version used the old approach using these aliases!
    IRC quote:
    [kojn] I've been coming a bit more recently
    [kojn] she took it the dirty way
    GreEn`mArine
    Forum addon
     
    Posts: 1509
    Joined: Tue Feb 28, 2006 9:33 pm
    Location: Germany

Sun Feb 15, 2009 11:17 am

  • There's a "bug" I'd like to report about the freefly mode. I'm not sure there's a solution for this issue, but here it goes anyway:
    During playback, entities/models you haven't actually seen, aren't drawn.
    Example: if you're standing on one side of Soylent space, but you freefly away to the other side, you can't see anything happening. Entites only apear once you "see them" from your actual position.
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Sun Feb 15, 2009 11:18 am

  • thats not a bug, it's the anti-radar cheat protection called "culling" of entites.
    IRC quote:
    [kojn] I've been coming a bit more recently
    [kojn] she took it the dirty way
    GreEn`mArine
    Forum addon
     
    Posts: 1509
    Joined: Tue Feb 28, 2006 9:33 pm
    Location: Germany

Sun Feb 15, 2009 11:24 am

  • Just like I thought. But this makes the freefly mode useless, as you can't see what others have done meanwhile.
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Sun Feb 15, 2009 11:41 am

  • well thats the downside of the anti-wallhack.. i'm not sure about server side demos. but i think those also do not contain that stuff either. I guess one way would be to make it possible for server side demos to contain everything. but that would require quite some changes so thats nothing for the next release.
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Sun Feb 15, 2009 8:39 pm

  • One thing you CAN do is to run your server with this stuff disabled.

    sv_cullentities_trace 0
    sv_cullentities_pvs 0

    But then anyone can use a wallhack.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sun Feb 15, 2009 10:03 pm

  • Wouldn't it increase rendering times (disabling pvs culling particularly)?
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Sun Feb 15, 2009 10:16 pm

  • Not much, as the culling is still performed on the client.

    Would however cost lots of extra bandwidth, and server CPU load.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Feb 16, 2009 11:42 am

Mon Feb 16, 2009 12:26 pm

  • But isn't is actually using more CPU load on the server when doing culling? I mean, I totally agree to the bandwidth usage raising, but I always though that it would save CPU on the server when disabling culling.
    IRC quote:
    [kojn] I've been coming a bit more recently
    [kojn] she took it the dirty way
    GreEn`mArine
    Forum addon
     
    Posts: 1509
    Joined: Tue Feb 28, 2006 9:33 pm
    Location: Germany

Mon Feb 16, 2009 1:16 pm

Mon Feb 16, 2009 1:22 pm

  • I think it should decrease server CPU load, especially tracing, cause as far as I understand, this is a special darkplaces antiwallhack feature. There is also a cvar to control how accurate tracing it should perform.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Mon Feb 16, 2009 6:30 pm

  • GreEn`mArine wrote:But isn't is actually using more CPU load on the server when doing culling? I mean, I totally agree to the bandwidth usage raising, but I always though that it would save CPU on the server when disabling culling.


    When disabling trace culling, yes.

    But PVS culling (using the vis data) is almost for free (precalculated by q3map2), and saves preparing lots of entities.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Jun 13, 2009 3:53 am

  • I've made a short video showing the basic (but just a little hidden) movements that you can do with this demo camera.

    I will be making more tutorials showing advanced usage, but when I don't know :P

    I hope you enjoy it :)
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Sat Jun 13, 2009 8:20 am

  • Nice!
    Omg, that map never gets old :D
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Sun Aug 30, 2009 7:20 pm

  • How can I make use of this in the latest version of nexuiz?
    Can someone teach it to me or provide those patches again, the links don't work anymore
    Thanks in advance :)
    increased
    Newbie
     
    Posts: 2
    Joined: Fri Jun 26, 2009 2:30 pm

Previous


Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest