Content

Post new topic Reply to topic

Eye Tracking

Author Message
leilei View user's profile Send private message

Reply with quote Saturday, May 17, 2014

Is there any interest in a Source-like eye tracking implementation?


I've already coded it for my game but haven't committed it to any Git yet (because additional other featurecreep I should clean up Razz). However, the general secret is....

- CGAME: Loading of eyeball position from a new line in animation.cfg. This position is saved to the refentity's eyepos vector.
- CGAME: Tracelining forward from the head using the client's lerpangles and using the end of the trace as the 'eyelook' position for the eyes to point to, so it actually looks where the player is aiming. This position is saved to the refentity's eyelook vector. With further experimenting one could use the attacker's position (for death) or the targeted opponent's position, or just straight forward to make kamehamehas more dramatic.
- RENDERER: A modified environment map calculation function which takes both of the vectors, and applies (not yet customizable) limits to their angles. For the other eye, it simply inverts the eyepos in the horizontal axis. tcGen lefteye and righteye are implemented and would require each eye to be a different shader (fortunately unlike Source, could use the same clamped texture).
- GAME: Nothing to do in game! Entirely clientside effect.
- MODEL: Model needs two more surfaces in the head model, one for each eye. Both surfaces need to use two different eye shaders, one for each eye. Eye position would also need to be gathered and added as an eyes vector in animation.cfg (my way to do this in both this and Source is to put a ball in the eye and use its location values from Blender)

I haven't even checked if the current SVN has something like this in the code already. However once I commit this to the Git I'll link the commit here so you guys can have it integrated. Smile

najeeb My Sir View user's profile Send private message

Reply with quote Sunday, May 18, 2014

Hello there , that's some nice work , hopefully Brad will reply to this question when he gets his eyes on it Smile

Shenku RiO Incarnate View user's profile Send private message

Reply with quote Wednesday, May 21, 2014

That's some very interesting technical information there... I take it you're pretty familiar with working with the engine then?

I don't think anything like this has ever been looked into before, but it would be a nice feature to add eventually. I know that the head/torso can be twisted around and what not to face the aiming direction(depending on settings), so it's not much of a stretch to say that the same can't be done with the character's eyes. You actually have it working I take it...?

The model there looks good too(Textures especially, you make that yourself?), and don't be shy about posting non-Toriama styled characters here on the forums. New and original characters have always been encouraged as addons around here, and not everything needs to strictly be in the Dragonball Z style; variety is nice sometimes.

Eagle The Purpose View user's profile Send private message

Reply with quote Wednesday, May 21, 2014

>Shenku

and don't be shy about posting non-Toriama styled characters here on the forums. New and original characters have always been encouraged as addons around here, and not everything needs to strictly be in the Dragonball Z style; variety is nice sometimes.



Moddb is full of that *intense laughter*

Ahem, on topic

Very Nice! For me, ZEQ2 NEED this awesome feature. Leilei, have you got somewhere where we can see more of your works :3 ?

Shenku RiO Incarnate View user's profile Send private message

Reply with quote Wednesday, May 21, 2014

Wh1t34Gl3(SAS) wrote : >Shenku

and don't be shy about posting non-Toriama styled characters here on the forums. New and original characters have always been encouraged as addons around here, and not everything needs to strictly be in the Dragonball Z style; variety is nice sometimes.



Moddb is full of that *intense laughter*



Not really the same thing... ModDB has a ton of poor quality addon spam, so much that I literally never look at ModDB. Ever. What I was refering to was addons of good-high quality that we can track progress on here to know they're real and not just googled images slapped onto yet another "Xicor SSSJS 4679 Bazzilion"...

Eagle The Purpose View user's profile Send private message

Reply with quote Thursday, May 22, 2014

I could never said better than you did Smile

Post new topic Reply to topic

Actions

Online [ 0 / 6125]