Results 1 to 3 of 3

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

  1. #1
    Senior Member Regular Contributor
    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 Regular Contributor
    Join Date
    Sep 2015
    Posts
    152
    I found solution.

  3. #3
    Administrator Regular Contributor khronos's Avatar
    Join Date
    Feb 2000
    Location
    Montreal
    Posts
    349
    Perhaps you could share the solution, in case it helps others?

Similar Threads

  1. Modeling of hands
    By High-Tag in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-05-2003, 11:18 PM
  2. Can Barely see the other players
    By Razor83 in forum OpenGL: User Software
    Replies: 0
    Last Post: 07-05-2003, 04:35 PM
  3. all of us trying but nothing in our hands...
    By GLCoder in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 01-01-2003, 07:07 AM
  4. any helpfull hands out there?
    By seshun in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-06-2002, 04:40 AM
  5. Render weapons in players viewport
    By Luminous Blue in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 07-24-2002, 02:25 PM

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