Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Jun 2012
Offline Last Active Mar 19 2016 07:00 AM

#5195718 Bone-animation | Offset-matrix

Posted by on 01 December 2014 - 09:35 AM

Thank you so much! I just managed to get it working!!!


First of, I had all the matrix stuff right. Despite me not really understand it (I do now, I think), it was correct. I apologise for waisting your time.



Your foolproof explaination helped, because you mentioned that 

 anim-pose-vertex = model-space-vertex-position * offset-matrix * anim-pose-matrix 

The problem was the follwing line in the shader that does the final skinning:

Output.Pos += mul( Pos, boneMatrices[boneID] );

Notice the "+=". I'm about to kill myself.


Literally weeks waisted because I forgot to check that. 


Again, thanks so much. Without you mentioning what I was actually trying to compute I'd have waisted who-knows-how-much more time.


Thank you.

#5171154 Quaternion-Rotation to Degree (Edge-jump)

Posted by on 02 August 2014 - 12:26 PM

Thanks to all of you. I switched to using Matrices and it works out fine now :)

#5138657 [C++] Vector faster than priority-queue in A*

Posted by on 13 March 2014 - 05:11 AM

You are right ... I shouldn't try coding this late at night.

But changing it didn't increase the speed of openList.push() at all.

So, we are back were we began sad.png


EDIT: I also tried what TiagoCosta mentioned, but it didn't increase the speed by a noticable amount.

#5119342 A* on large Map

Posted by on 26 December 2013 - 01:50 PM

Well met,


I tried to implement simple pathfinding into my game, using A* algorithm. The map is a simple 2D map with the classic open/closed-nodes mechanic. But my implementation of A* takes about one second to get a path on a 32x32 grid, which is, of corse, already much too slow. When applied on a larger grid, there is no way of using it.

So, my question is how to approach this. Did I mess up with the implementation, or do I have to have some kind of subdivision (movementmesh etc) for my grid to use A* effectively? At the moment, my map has 1024x1024 vertices in it.


Thanks in advance!


#5034209 Render To Texture - depthStencilView

Posted by on 19 February 2013 - 11:28 AM

Found the problem. I forgot to ZeroMemory the descriptionbuffer of the depthstencilview, not sure why this cause such an akward problem though. Well, now it's running fine.

#4988350 Render To Texture

Posted by on 09 October 2012 - 08:04 AM

Yes, one needs to define a viewport for the texture. Wasn't metioned in the tutorial doh.
Thanks a lot

#4964423 Normal map from heightmap?

Posted by on 30 July 2012 - 02:39 AM

No, you don't. Just look up a terrain lightning tutorial. It's mostly the same like with any other object.

#4964284 Normal map from heightmap?

Posted by on 29 July 2012 - 12:16 PM

Here is the code I use to to this:

for(int z = 0; z<terrainHeight; z++){   
	   for(int x = 0; x<terrainWidth; x++){
    indexNm = z*terrainWidth+x;

    if(z > terrainHeight-1){ //aboth
	   nmOffset = terrainWidth;
    nmOffset = 0;
    D3DXVECTOR3 N1 = D3DXVECTOR3(x, heightMap[indexNm+nmOffset],z+1);

    if(x > 0){ //left
	   nmOffset = -1;
    nmOffset = 0;
    D3DXVECTOR3 N2 = D3DXVECTOR3(x-1, heightMap[indexNm+nmOffset],z);

    if(x > terrainWidth-1){ //right
	   nmOffset = 1;
    nmOffset = 0;
    D3DXVECTOR3 N3 = D3DXVECTOR3(x+1, heightMap[indexNm+nmOffset],z);

    if(z > 0){//below
	   nmOffset = -terrainWidth;
    nmOffset = 0;
    D3DXVECTOR3 N4 = D3DXVECTOR3(x, heightMap[indexNm+nmOffset],z-1);
			 D3DXVec3Cross(&normalMap[indexNm], &(N2 - N3), &(N1 - N4)); // cross and done!
    D3DXVec3Normalize(&normalMap[indexNm], &normalMap[indexNm]);

#4958091 Lightmapping tool - wanna have?

Posted by on 11 July 2012 - 10:45 AM

Hey guys,
I developed a tool which creates a terrain-shadowmap from a heightmap.
Since there is nothing out there what does this ( atleast I found nothing ), I thought about shareing it.
Do you think there is need for this?

Looks like this:

It turns this...:

... Into this: