360 degree chase camera

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Postby Alien » Wed Jan 07, 2009 3:33 pm

Nice work you are doing. Go for it and there soon will be q3mme for nexuiz.
Alien
Forum addon
 
Posts: 1212
Joined: Tue Apr 22, 2008 7:12 am

Postby mand1nga » Sun Jan 11, 2009 4:43 pm

Alright, I think I have finished the camera support for demo recording. Now you can put the camera everywhere, rotate it, look anywhere, switch to free looking or chase modes while playing demos.

It requires the following cvars

Code: Select all
set chase_active_direction_step 2      // Camera movement speed on the x/y/z axis
set chase_active_rolling_step 1         // Camera rotation speed

set chase_active_free 0            // Free camera instead of chasing the player
set chase_active_reset 0         // Reset the camera position
set chase_active_direction_x 0         // Move the camera on the x axis (relative to the camera angle)
set chase_active_direction_y 0         // Move the camera on the y axis (relative to the camera angle)
set chase_active_direction_z 0         // Move the camera on the z axis (relative to the camera rotation)


To enable it use the cvar chase_active with a value > 1

Here is the Nexuiz patch. Also I had to modifya line in Darkplaces in order to get mouse input while playing demos, I haven't noticed any side effect of this.

For testing it I used the following binds setup:

Code: Select all
alias +camera_move_forward "set chase_active_direction_x 1"
alias -camera_move_forward "set chase_active_direction_x 0"
alias +camera_move_backward "set chase_active_direction_x -1"
alias -camera_move_backward -camera_move_forward

alias +camera_move_left "set chase_active_direction_y 1"
alias -camera_move_left "set chase_active_direction_y 0"
alias +camera_move_right "set chase_active_direction_y -1"
alias -camera_move_right -camera_move_left

alias +camera_move_up "set chase_active_direction_z 1"
alias -camera_move_up "set chase_active_direction_z 0"
alias +camera_move_down "set chase_active_direction_z -1"
alias -camera_move_down -camera_move_up

alias +camera_roll_right "set chase_active_roll 1"
alias -camera_roll_right "set chase_active_roll 0"
alias +camera_roll_left "set chase_active_roll -1"
alias -camera_roll_left -camera_roll_right

bind h +camera_move_left
bind k +camera_move_right
bind n +camera_move_down
bind m +camera_move_up
bind j +camera_move_backward
bind u +camera_move_forward

bind MOUSE1 +camera_roll_left
bind MOUSE2 +camera_roll_right


Enjoy :)

All credits to victim[v] and Pythagoras ;)
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby mand1nga » Sun Jan 11, 2009 8:05 pm

Now see it in action 8)
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby GreEn`mArine » Sun Jan 11, 2009 8:29 pm

Fantastic work!

Another suggestion would be: could you find out whether your custom csprogs.dat file could be injected into demos recorded on recent SVN servers to get this functionality when playing back your online demos?

Oh, and wow, the patch is really small and clear, nice 1 :)
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

Postby mand1nga » Mon Jan 12, 2009 2:02 pm

Yes it would be really cool. Yesterday I took a quick read to the demo recording code and I saw that csprogs.dat contents aren't injected into demos, it only injects the csprogs.dat crc somewhere. Whenever I have some free time I'll look how to point this crc to a newer csprogs.dat and see if the demo is still playable.
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby Fisume! » Mon Jan 12, 2009 2:43 pm

wow, that's great! Can this be added in the next release? Can't wait to make vids with this new system.

Big thumbs up guys!
Fisume!
Alien trapper
 
Posts: 467
Joined: Sun Jan 27, 2008 8:55 am
Location: Saarbruecken, Germany

Postby GreEn`mArine » Mon Jan 12, 2009 6:27 pm

For all the ones who lack the knowledge to compile it and want to try it out, I've created a small pack for Nexuiz v2.4.2.

It contains:
- modified compiled wgl engine for Windows
- modified progs.dat and csprogs.dat
- the configs of Nex SVN needed to bypass csqc check
- camera.cfg (execute that config to get the controls, have a look at the file before to see if you like the binds)

WARNING: I recommend that you do backup your config before you use that patch. Restore your config later if you are done. If you forget it ... well, I don't know what changes a SVN-based DP engine and SVN based gamecode and the defaultvariable settings needed to use this will do to you nex 242 settings...

download here
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

Postby GreEn`mArine » Mon Jan 12, 2009 7:18 pm

mand1nga wrote:Yes it would be really cool. Yesterday I took a quick read to the demo recording code and I saw that csprogs.dat contents aren't injected into demos, it only injects the csprogs.dat crc somewhere. Whenever I have some free time I'll look how to point this crc to a newer csprogs.dat and see if the demo is still playable.

Apparently div0 recently fixed this bug. In my try-outs of your cam, the csprogs.dat was injected into my demos (recorded on a listen server).

But I can confirm that my online demos also don't have csprogs.dat :P (but at the time of recording the engine likely still had that bug)
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

Postby mand1nga » Mon Jan 12, 2009 10:25 pm

I think it was a feature ;) It seems they've chosen to bypass the csprogs.dat check and "try" to run the demo. And yes LH told me this morning that demo files can hold csprogs.dat, so I believe you :)

the configs of Nex SVN needed to bypass csqc check


How did you achieve that? :o

Or you did some funny trick, or I should delete some csprogs.dat files in my svn data folder :twisted:

Now I'm trying to make the look/mouse movements more smoother. Any ideas or suggestions will be appreciated. Basically what I'm doing right now is applying like a delay for quick movements, but there are many ways to do that.
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby Alien » Tue Jan 13, 2009 5:00 am

Alien
Forum addon
 
Posts: 1212
Joined: Tue Apr 22, 2008 7:12 am

PreviousNext

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron