Jump to content
  • Advertisement

treeway

Member
  • Content Count

    278
  • Joined

  • Last visited

Community Reputation

108 Neutral

About treeway

  • Rank
    Member
  1. Hi, I have two 3d OOBB's colliding / reacting through SAT, I have the contact normal, the transform and verts for the boxes, and the penetration amount, I want to find all the points of contact between the boxes, how do I find this? thanks
  2. treeway

    Gradient Weighted random number

    Thanks for the reply guys Rene Z's response worked perfectly for my situation (I'm not using C++), but I will look into std::geometric_distribution and std::exponential_distribution just out of interest, so thanks for that Bregma.
  3. Hi I have two points (A,B) and I want to create a set of random points between the two, such that most points are close to A and the number of points decreases linearly towards B. Does anyone know a simple way to solve this? Thanks
  4. pack the vector2 into a vector4 with {2dVectpor.x,2dVector.y,0.0F,0.0F,1.0F}, apply the matrix, then take the X and Y back out of the 4d vector into the 2d vector.
  5. treeway

    So....I've Released a Game

    <br /><br /><br /> Sorry for any confusion, I was a programmer on the team throughout the games development, but have since joined another company.
  6. treeway

    So....I've Released a Game

    Today is the launch of my second professional game, Its a top-down arcade racing game for Tegra 2 based Android devices called Bang Bang Racing THD (It'll also be coming to PSN and XBLA "soon"), check it out here: http://www.youtube.c...h?v=W6pAtVenBt4 If you are interested in following the games progress and seeing it released on PSN and XBLA, please follow it on its Facebook page at: http://www.facebook.com/BBR.THD Thanks.
  7. fantastic, this is the answer I was looking for.
  8. Hi In the OpenGL side of my engine i load in bianry blocks containing S3 Compressed textures in the folloding way: glCompressedTexImage2D(GL_TEXTURE_2D, currentMipMapLevel, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, width, height, 0, compressedWidth * compressedHeight * 8, data); on the directx side for non-compressed textures i do this: d3DDevice->CreateTexture(width,height,numLevels,usage,format,D3DPOOL_MANAGED,currentTextureReference,NULL) (*currentTextureReference)->LockRect(0U,&rect,0, 0))); switch(format) { case(D3DFMT_A8R8G8B8): case(D3DFMT_A8B8G8R8): case(D3DFMT_R8G8B8): { // Change the pointer received from LockRect into a 32bit pointer DWORD* pData=(DWORD*)(rect.pBits); Uint pixelIndex(0U); if(width >= height) { for(int x=0; x < width; ++x) { for(int y=0; y < height; ++y) { // Get Pixel data Byte red(*(data + pixelIndex)); Byte green(*(data + pixelIndex + (sizeof(cyan::Byte)))); Byte blue(*(data + pixelIndex + (sizeof(cyan::Byte)*2U))); if(D3DFMT_R8G8B8 == format) { // 24 bit textures pData[(((rect.Pitch/bytesPerPixel) * (y)) + x)] = D3DCOLOR_XRGB(red,green,blue); } else{ // 32 bit textures cyan::Byte alpha(*(data + pixelIndex + (sizeof(cyan::Byte)*3U))); pData[(((rect.Pitch/bytesPerPixel) * (y)) + x)] = D3DCOLOR_ARGB(alpha,red,green,blue); } pixelIndex += bytesPerPixel; } } } .... (*currentTextureReference)->UnlockRect(0U) This loads uncompressed textures from binary but i have to manually fill each pixel of the texture to avoid problems with pitch. What would be the equivalent for loading dxt1-5 compressed textures? i know that each dxt format has a pitch so cant do a memcpy directly from the binary into the texture. Does anyone know how i can load dxt1=5 textures in from memory? thanks. [Edited by - treeway on September 2, 2010 3:38:23 AM]
  9. thanks for the link n00body, very interesting stuff... I'll look into virual texturing.
  10. Hi I was wondering how a system similar to little big planets stickers could be implemented. Are the stickers quads (made of two triangles) being drawn on top of the geometry or is it actually editing the texture data adding in the sticker?
  11. hi I wrote an .X file loader for PS2/PC a while ago. The documentation might help you in understanding the x file format: http://mygamedemos.com/projects/index.php?&clicked=15&depth=-1&ArticleID=15 you can convert the max skeleton to meshes by selecting all the bones, rightclicking and selecting convert to > editable mesh.
  12. Ok I found the solution technique FireParticleSystemCGFX { pass ParticleSystem { ZENABLE = TRUE; ZWRITEENABLE = FALSE; BlendFunc = int2(SrcColor, One); BlendFunc = int2(DestColor, One); CullFaceEnable = FALSE; ALPHABLENDENABLE = TRUE; VertexProgram = compile arbvp1 VS_Main(); FragmentProgram = compile arbfp1 PS_Main(); } } thanks for reading
  13. Hi I'm currently porting an HLSL Fx file to CgFx. The original was written for DirectX so has some render state Assignments in the technique: technique FireParticleSystem { pass ParticleSystem { ZENABLE = TRUE; ZWRITEENABLE = FALSE; SRCBLEND = ONE; DESTBLEND = ONE; CULLMODE = NONE; ALPHABLENDENABLE = TRUE; VertexShader = compile vs_1_1 VS_main(); PixelShader = compile ps_2_0 PS_main(); } } As I am now switching this over to CgFx i need non-DirectX specific render state equivalents so far I have: technique FireParticleSystemCGFX { pass ParticleSystem { ZENABLE = TRUE; ZWRITEENABLE = FALSE; /*SRCBLEND = ONE; DESTBLEND = ONE; CULLMODE = NONE;*/ ALPHABLENDENABLE = TRUE; VertexProgram = compile arbvp1 VS_Main(); FragmentProgram = compile arbfp1 PS_Main(); } } which works but obviously the blending mode is wrong... as the particles appear to have an opaque black background. The FX Composor compalins about the render states commented out (as they are DirectX specific and the CgFx version of the shader is running in the OpenGL renderer). Is there anywhere where all of the render state assignments and their possible values are listed for CgFX?? I had a look at the Cg Toolkit documentation but couldn't find a comprehensive list. Thanks.
  14. Hi, I have a vehicle with wheels created using NxWheelShape, one problem I have is that my car turns over, the wheels hit the wall and drive the car along the walls surface, you can even drive up vertical walls. Has anyone else experienced this problem? and how did you resolve it? Thanks
  15. Hi im rendering to an FBO using the GL_DEPTH_COMPONENT24 depth format to take the depth buffer values into a texture. I've got the values and they are right but they arent in normalized clip space (i.e. in the range of -1 to +1) so i have no idea where my furthest depth and closest depth are. Previously I obtained the depth in NDC space by using a shader to transform my vertices into clip space through the worldviewProj matrix and then in a pixel shader determined the length of the vector. Does anyone know how to transform the depth from whatever range it is in from GL_DEPTH_COMPONENT24 to a normalized clip space value? thanks
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!