Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


dpadam450

Member Since 18 Nov 2005
Offline Last Active Jul 02 2015 02:09 PM

Posts I've Made

In Topic: Drawing into another executables window

26 May 2015 - 03:34 PM

Nevermind, I just verified this works. As long as you have the window id / HWND id it is possible.


In Topic: degenerate triangles

22 May 2015 - 03:32 PM

It shouldn't matter which one you choose, though webGL may be a lot slower so indices might be faster.

 

 

 

but instead use drawArrays with gl_triangels and a degenerate triangle to separate quads.

You would simply just have duplicated vertices where each triangle has 3 unique vertices. The degenerate thing would be if you were drawing indexed vertices using triangle strips/fans where you send -1 I believe as a degenerate index which tells the GPU to draw a brand new polygon that isn't attached to the edges of the previous triangle.


In Topic: Skeletal animation - I'm almost there!

19 May 2015 - 10:46 AM

One way to debug this if you still are trying, Make a bone that is aligned to say the x-axis and rotate it 90 degrees on the y-axis. This way you can debug the matrices and see what coordinate systems they are and understanding the bind pose and animation frame matrices etc.


In Topic: Skeletal animation - I'm almost there!

16 May 2015 - 12:05 PM

Collada matrices may be in a different coordinates system (like directX). So you may need to apply something like that. I wrote my own custom exporter from Blender to my own format. My final matrix for every animation frame is computed as such:

//inv_translate take the bones world position and moves it to the origin, so that we can perform the bones animation

// then I apply this matrix to deal in openGL coordinates

// invert the bind pose so that I can apply the bones matrix which is described in the bones coordinate system (not in the actual openGL world system)

// Actually I'm getting a little lost, since this code is pretty old and when you first have to write it its a bunch of matrices in different systems. and a lot of debugging.

// At the end though I then transform the bone back to its original position in world space
*(bone->Animation_Frames[j]) = bone_translate*inv_to_GL*(*bone->Animation_Frames[j])*inv_bind_pose*to_GL*inv_bone_translate;

 

So that may not help but the concept is, take the bone, move it to the origin so you can rotate it around its joint, apply any rotations/translations for the frame, put the bone back into position.  The other stuff around that is finding out how to apply the rotations/translations for the frame, because those frames of animation are all relative to the bones bind pose, which is why with no animation the matrix is the identity matrix, and not a matrix to actually place the bone in the world. I also had to wrap a conversion matrix around my code since the frame animations were in Blender/DirectX coordinate systems. My engine is OpenGL. So by putting the conversion matrix around the matrices I want converted, they simply will be in openGL space like the other matrices I have in this equation.


In Topic: Ray-cylinder intersection (and others)

15 May 2015 - 03:33 PM

http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323


PARTNERS