[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Idea: non-linear interpolation via CSQC

Idea: non-linear interpolation via CSQC

Discuss CSQC related programming.

Moderator: InsideQC Admins

Idea: non-linear interpolation via CSQC

Postby frag.machine » Sun May 11, 2014 1:58 pm

Not sure if this is the right place to throw the idea, or even if it's something that already exists in some form but anyway...

After watching , I started to think about how some of these clever ideas could be implemented in idtech2 engines.

Currently even the more austere engines (like FitzQuake) already have linear interpolation baked, but there is very little if any control over how it works. At most, you can toggle it via cvars or skip lerping for a frame. What I was thinking about was giving more control via QuakeC (more precisely, CSQC), so you could at least use non-linear animation (which already looks way better), but not only this: velocity/movement-direction dependent animations, perfect sync between interpolation and animation (no more being locked in 10Hz), truly keyframe-based animations (meaning less work for modellers and less memory wasted when loading models) and a less hacky way to completely skip interpolation when desirable (say, using stock id weapon models).

I was thinking about how this could be implemented in a clean way and I reckon that maybe something like a non-required CSQC hook in the entity (like .float () th_lerp;) would be enough. th_lerp would calculate and return the interpolation factor for the entity (between 0.0 and 1.0).If self.th_lerp = null then just use the engine baked lerp animation, so legacy mods would still work as expected.

Spike ? LordHavoc ? Anyone ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Idea: non-linear interpolation via CSQC

Postby Spike » Sun May 11, 2014 2:11 pm

csqc's .predraw function is responsible for adjusting the entity on a per-frame basis, thus ensuring it appears in the interpolated position.
the engine does not automatically interpolate entities for you.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Idea: non-linear interpolation via CSQC

Postby frag.machine » Sun May 11, 2014 7:23 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Idea: non-linear interpolation via CSQC

Postby Spike » Sun May 11, 2014 8:06 pm

lerpfrac, frame, frame2 can be used to lerp between frame and frame2, just set frame2 to the old value and allow lerpfrac to tend towards 0 or so.
frame1time+frame2time control the time into the framegroup (4-way blending).
you'll need to interpolate origin and angles yourself too, of course. which can be great fun...

the basebone field can be used to specify a waist bone index. the other baseframe etc fields then control the bones with a lower value, with the regular frame etc fields independantly controlling the higher bones. this naturally requires a skeletal format like iqm. with this extension there's no support for twisting the waist or anything fun like that - the skeletal objects extension is just more feature complete. the only real advantage of this feature is that it is simpler (potentially simple enough that I *could* network it up and provide control from ssqc too).
note that as far as I'm aware, dp doesn't support this. so yeah, use skeletal objects instead.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Idea: non-linear interpolation via CSQC

Postby frag.machine » Mon May 12, 2014 1:09 am

I think lerpfrac and frame2 will be enough to experiment some of the ideas in the video. Thanks for the help, Spike.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Idea: non-linear interpolation via CSQC

Postby jitspoe » Mon May 12, 2014 4:43 pm

That was an awesome presentation. Now I want to work on making player animations look better in Paintball2. :)

jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am


Return to CSQC Programming

Who is online

Users browsing this forum: No registered users and 2 guests