• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About terrysworkstations

  • Rank

Personal Information

  • Interests
  1. Camera on Vehicle

    I want to attach a camera on a vehicle like so that it will be in the cockpit of the car. I tried messing around with the target position of the view camera. I know there is a current position and target in a view matrix. So I multiplied x and z components of target(view matrix) by 100 to give farther viewing capabilities. This did not work so I was wondering how to attach a a view camera to a vehicle. I just need a general idea on how to do it. | / | / | / CurrentPosition --*100--->target position View Matrix thank you
  2. Shader Resource Binding

    Hello, I am trying to set some shader values in a cbuffer. Im not getting any response or values. My code is: cbuffer MatrixBuffer : register(b0) { float4 test; }; ------------------------------------------------- #pragma pack(push,1) struct CB_GBUFFER_UNPACK { D3DXVECTOR4 test; }; #pragma pack(pop) ------------------------------------------------- D3D11_BUFFER_DESC cbDesc; ZeroMemory( &cbDesc, sizeof(cbDesc) ); cbDesc.Usage = D3D11_USAGE_DYNAMIC; cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER; cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; cbDesc.ByteWidth = sizeof( CB_GBUFFER_UNPACK ); device->CreateBuffer( &cbDesc, NULL, &m_pGBufferUnpackCB ); D3D11_MAPPED_SUBRESOURCE MappedResource; ic->Map( m_pGBufferUnpackCB, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource ); CB_GBUFFER_UNPACK* pGBufferUnpackCB = ( CB_GBUFFER_UNPACK* )MappedResource.pData; pGBufferUnpackCB->test.x = 10.0f; pGBufferUnpackCB->test.y = 10.0f; pGBufferUnpackCB->test.z = 10.0f; pGBufferUnpackCB->test.w = 0.0f; ic->Unmap( m_pGBufferUnpackCB, 0 ); ic->PSSetConstantBuffers( 0, 1, &m_pGBufferUnpackCB ); What is wrong?
  3. Assimp Object

    Ok seem to get the distortion working now. No stretching. Is there a way to invert indices on assimp?
  4. Assimp Object

    I switched to Assimp for loading models in directx 11. The image seems to strectch and stuff for some reason.In the picture , the tail like gets real big and the front of the image gets smaller when it gets closer to the camera than it should be. Does anyone know why this Is happening. Also I can see through the fish on certain angles. Does this have to do with left/right handed coordinate systems?
  5. Bone offsets Matrix

    Trying to get Bone Offsets. I have blend weights and indices. How can I get bone offsets.
  6. Have to rotate 180 and flip horizontal to work

    I solved it. Thx
  7. Textures in Directx 11

    Alright h8cplusplusGuru, got it. thx
  8. Textures in Directx 11

    I still cannot get it to work even after the steps above. BTW, im using blender.
  9. Textures in Directx 11

    I use the regular image now(not rotated or flipped), and negated the x. Did not work though. I negated the y uv and almost works accept as seen, the text is backwards.
  10. Textures in Directx 11

    Im in DirectX 11 using the D3DX11CreateShaderResourceViewFromFile for textures. I have to rotate texture file 180 and flip horizontal in Mspaint for the texture to fit on the object. SO when I have a .obj object with text, it will be backwards like in the image. I have to rotate and flip with all objects that have textures.Does anyone know how to fix the issue?
  11. Im downloading .obj to put in a game. I have to rotate and flip the texture for it to look right on the object! So when there is text on the object, it will be backwards. Im in Blender. How can I fix this issue? Im in directx 11 also
  12. System memory copy of vertices/mesh

    I needed a system memory copy of the vertices for AABB Collision so I can update there min/max because I only have static vertices access. How can I do this. Im in directx 11. c++. As my object translates, I need to calculale the new AABB min/max and I cant get to the vertices. void IvAABB::Set( const IvPoint3* points, unsigned int numPoints) { ASSERT( points); // compute minimal and maximal bounds mMinima.Set(points[0]); mMaxima.Set(points[0]); for (unsigned int i = 1; i < numPoints; ++i) { if (points[i].x < mMinima.x) mMinima.x = points[i].x; else if (points[i].x > mMaxima.x) mMaxima.x = points[i].x; if (points[i].y < mMinima.y) mMinima.y = points[i].y; else if (points[i].y > mMaxima.y) mMaxima.y = points[i].y; if (points[i].z < mMinima.z) mMinima.z = points[i].z; else if (points[i].z > mMaxima.z) mMaxima.z = points[i].z; } }
  13. Precision Problems with bouding sphere

    Alright, I got to work. thx
  14. Precision Problems with bouding sphere

    I tried to make two spheres with bounding sphere to detect collision so they stop when they collide. But it seems that im having a precision issue. They stey stuck together because of small decimal keeping it stuck. Is there a way around this? Since they are in a 3d space, adding or subtracting a little off seems impossible and expensive. How can I solve these precision issues? The code I used. oldleftright = leftright, oldupdown = updown; if(GetAsyncKeyState(VK_RIGHT)) leftright += 0.0001; if(GetAsyncKeyState(VK_LEFT)) leftright -= 0.0001; if(GetAsyncKeyState(VK_DOWN)) updown -= 0.0001; if(GetAsyncKeyState(VK_UP)) updown += 0.0001; collide = test.Intersect(test2); if (collide) { leftright = oldleftright; updown = oldupdown; } collide = false;
  15. Bounding Sphere for collision Detection

    Alright _Silence_,MarcusASeth, got it to collide right. Thx
  • Advertisement