• Create Account

### #ActualSlig Commando

Posted 04 March 2012 - 12:31 PM

What was posted was hardly a wall of samples. It was 10-15 lines of code at most with explanations of what is going on. Also, you shouldn't be discouraged. Learning something like Directx and the theory ect... to simulating a 3d world is a lot of work!

So. Back on topic. Question 2,3 and 4 still up for grabs.

2. The typical way to include bone indices in your vertex is to create your own structure that allows for multiple declarations(ie. MyStruct(or class) has 4 int values) that define what index to use. You could also use a D3DXVECTOR4(4 float values used as indices, allowing for a vertex to belong to four bones). Then in your FVF, you would use a texture coordinate semantic(D3DFVF_TEX0,1,2,3). The tex coord semantic is often used for miscellaneous info, not just UV coordinates. You would do the same thing for bone weights.

3. You should be able to, except instead of using POSITION0, you would use POSITION1.

4. You could use a 4x4 matrix to transform, the extra stuff will just get cut out. In reality, you want to use a fourth homogenous coordinate 'w'. This will come in handy later when performing quaternion rotations and avoid gimbal locks. http://en.wikipedia....iki/Gimbal_lock

Edit: Just a disclaimer, I am not all that well versed on bone animating, but this is what I "Think" I know... =)

Edit again: Here is a great site with easy to understand tutorials. http://toymaker.info/Games/index.html
Including effect files

### #4Slig Commando

Posted 04 March 2012 - 12:31 PM

What was posted was hardly a wall of samples. It was 10-15 lines of code at most with explanations of what is going on. Also, you shouldn't be discouraged. Learning something like Directx and the theory ect... to simulating a 3d world is a lot of work!

So. Back on topic. Question 2,3 and 4 still up for grabs.

2. The typical way to include bone indices in your vertex is to create your own structure that allows for multiple declarations(ie. MyStruct(or class) has 4 int values) that define what index to use. You could also use a D3DXVECTOR4(4 float values used as indices, allowing for a vertex to belong to four bones). Then in your FVF, you would use a texture coordinate semantic(D3DFVF_TEX0,1,2,3). The tex coord semantic is often used for miscellaneous info, not just UV coordinates. You would do the same thing for bone weights.

3. You should be able to, except instead of using POSITION0, you would use POSITION1.

4. You could use a 4x4 matrix to transform, the extra stuff will just get cut out. In reality, you want to use a fourth homogenous coordinate 'w'. This will come in handy later when performing quaternion rotations and avoid gimbal locks. http://en.wikipedia....iki/Gimbal_lock

Edit: Just a disclaimer, I am not all that well versed on bone animating, but this is what I "Think" I know... =)

Edit again: Here is a great site with easy to understand tutorials. http://toymaker.info/Games/index.html
Including effect files

### #3Slig Commando

Posted 04 March 2012 - 12:31 PM

What was posted was hardly a wall of samples. It was 10-15 lines of code at most with explanations of what is going on. Also, you shouldn't be discouraged. Learning something like Directx and the theory ect... to simulating a 3d world is a lot of work!

So. Back on topic. Question 2,3 and 4 still up for grabs.

2. The typical way to include bone indices in your vertex is to create your own structure that allows for multiple declarations(ie. MyStruct(or class) has 4 int values) that define what index to use. You could also use a D3DXVECTOR4(4 float values used as indices, allowing for a vertex to belong to four bones). Then in your FVF, you would use a texture coordinate semantic(D3DFVF_TEX0,1,2,3). The tex coord semantic is often used for miscellaneous info, not just UV coordinates. You would do the same thing for bone weights.

3. You should be able to, except instead of using POSITION0, you would use POSITION1.

4. You could use a 4x4 matrix to transform, the extra stuff will just get cut out. In reality, you want to use a fourth homogenous coordinate 'w'. This will come in handy later when performing quaternion rotations and avoid gimbal locks. http://en.wikipedia....iki/Gimbal_lock

Edit: Just a disclaimer, I am not all that well versed on bone animating, but this is what I "Think" I know... =)

Edit again: Here is a great site with easy to understand tutorials. http://toymaker.info/Games/index.html

### #2Slig Commando

Posted 04 March 2012 - 12:23 PM

What was posted was hardly a wall of samples. It was 10-15 lines of code at most with explanations of what is going on. Also, you shouldn't be discouraged. Learning something like Directx and the theory ect... to simulating a 3d world is a lot of work!

So. Back on topic. Question 2,3 and 4 still up for grabs.

2. The typical way to include bone indices in your vertex is to create your own structure that allows for multiple declarations(ie. MyStruct(or class) has 4 int values) that define what index to use. You could also use a D3DXVECTOR4(4 float values used as indices, allowing for a vertex to belong to four bones). Then in your FVF, you would use a texture coordinate semantic(D3DFVF_TEX0,1,2,3). The tex coord semantic is often used for miscellaneous info, not just UV coordinates. You would do the same thing for bone weights.

3. You should be able to, except instead of using POSITION0, you would use POSITION1.

4. You could use a 4x4 matrix to transform, the extra stuff will just get cut out. In reality, you want to use a fourth homogenous coordinate 'w'. This will come in handy later when performing quaternion rotations and avoid gimbal locks. http://en.wikipedia....iki/Gimbal_lock

Edit: Just a disclaimer, I am not all that well versed on bone animating, but this is what I "Think" I know... =)

### #1Slig Commando

Posted 04 March 2012 - 12:19 PM

What was posted was hardly a wall of samples. It was 10-15 lines of code at most with explanations of what is going on. Also, you shouldn't be discouraged. Learning something like Directx and the theory ect... to simulating a 3d world is a lot of work!

So. Back on topic. Question 2,3 and 4 still up for grabs.

2. The typical way to include bone indices in your vertex is to create your own structure that allows for multiple declarations(ie. MyStruct(or class) has 4 int values) that define what index to use. You could also use a D3DXVECTOR4(4 float values used as indices, allowing for a vertex to belong to four bones). Then in your FVF, you would use a texture coordinate semantic(D3DFVF_TEX0,1,2,3). The tex coord semantic is often used for miscellaneous info, not just UV coordinates. You would do the same thing for bone weights.

3. You should be able to, except instead of using POSITION0, you would use POSITION1.

4. You could use a 4x4 matrix to transform, the extra stuff will just get cut out. In reality, you want to use a fourth homogenous coordinate 'w'. This will come in handy later when performing quaternion rotations and avoid gimbal locks. http://en.wikipedia.org/wiki/Gimbal_lock

PARTNERS