Results 1 to 3 of 3

Thread: Animated hands players like in game S.T.A.L.K.E.R.

  1. #1
    Senior Member
    Join Date
    Sep 2015
    Posts
    152

    Animated hands players like in game S.T.A.L.K.E.R.

    I want align hands player to first person camera. And get bilboard animated mesh.
    I render hands, but hands exist in one place in 3d world and not moving with camera.
    My vertex shader:

    layout(location = 0) in vec3 vPosition;
    layout(location = 3) in vec4 Bones;
    layout(location = 4) in vec4 Wes;
    layout (binding = 2, std430) buffer AnimKeys { mat4 Kadr[]; };//this is AnimationKeys bones-matrices

    vec2 ar = vec2(10,5);//this is animation pose num and how bones in this mesh
    mat4 K1 = mat4(Kadr[uint(Bones.x-1+ar.x*ar.y)]);
    mat4 K2 = mat4(Kadr[uint(Bones.y-1+ar.x*ar.y)]);
    vec4 poz = K1 * vec4(vPosition.xyz * Wes.x , 1.0* Wes.x);
    poz += K2 * vec4(vPosition.xyz * Wes.y , 1.0* Wes.y);
    gl_Position = ViewProjection * vec4(poz.xyz , poz.w);

    If i multiply vPosition to Projection matrix i get bilboard mesh, but not get animation.
    Please help find the right solution.
    Last edited by Ronniko; 10-10-2018 at 09:28 PM.

  2. #2
    Senior Member
    Join Date
    Sep 2015
    Posts
    152
    I found solution.

  3. #3
    Administrator khronos's Avatar
    Join Date
    Jun 2002
    Location
    Montreal
    Posts
    107
    Perhaps you could share the solution, in case it helps others?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean