• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

187 Neutral

About jchmack

  • Rank
  1. I am currently adding the option to import many 3D file formats into our engine.  Collada/FBX/etc.  Some formats like Collada explicitly give a bone Matrix/Orientation like so:   <node name="leg_left_toes" id="leg_left_toes" sid="leg_left_toes" type="JOINT"> <matrix sid="matrix">1.000000 0.000000 -0.000000 0.135309 -0.000000 1.000000 0.000000 0.000000 0.000000 -0.000000 1.000000 -0.000000 0.000000 0.000000 0.000000 1.000000</matrix>   While others only give a position and then just give xyz translation for each bone:   spine lower 1 //This is a joint index 0 1.06035 -0.00128843   In formats where there is only a position when they are imported into Max/Maya/Motionbuilder they somehow recalculate the same orientations.     A) How can you get the bone orientations from a list of positions? B) From what I can tell it looks like it has to do with their children bones with a single child simply point their X-Axis to their child, but what about bones with multiple children (Like the Hips in most skeletons)?  Or no children (Like fingertips)? C) Why do all of these toolsets choose to face the X axis to the child/children?  I would figure Z would be the most natural choice.  Easy mirroring perhaps?   Thank you in advance to all who help =).  
  2. I am trying to read Windows Messages from another window. I have gotten this code to work with notepad: [code] HINSTANCE HookhInstance = NULL; DWORD ThreadId = 0; DWORD ProcessId = 0; HookhInstance = GetModuleHandle( __TEXT("user32") ); ThreadId = GetWindowThreadProcessId(InputWindow, &ProcessId); hkb = SetWindowsHookEx(WH_KEYBOARD,(HOOKPROC)MyHookProc,HookhInstance,ThreadId); if(hkb != NULL) { char title[80]; GetWindowTextA(InputWindow,title,sizeof(title)); string titlestring(title); cout << "hooked " << titlestring << endl; } [/code] and my hook proc: [code] LRESULT CALLBACK MyHookProc(int intCode, WPARAM wParam, LPARAM lParam) { cout << "HookProc" <<endl; } [/code] The code works fine when reading from notepad. I get the "hooked" text in my program and it says the correct name of the window. When I use the keyboard in notepad i get the "HookProc" text in my program. The problem is that when I try to use this same program to target something other than notepad. I get the dialog that says I hooked it properly so I believe I am hooking the right window, but none of the keyboard messages are making it back to my program. I am trying to follow the logic of spy++: [url="http://blogs.msdn.com/b/vcblog/archive/2007/01/16/spy-internals.aspx"]http://blogs.msdn.co...-internals.aspx[/url] I have used a program to make sure that the program I am trying to read messages from is using user32 since I am placing my hook there: [url="http://www.dependencywalker.com/"]http://www.dependencywalker.com/[/url] I believe it has to be possible because spy++ is somehow able to get the mouse/key info i would like to have. I have tinkered around with this for a while and I am starting to get stumped. Any help would be greatly appreciated. Ty for any help in advance =). edit: sorry about the weird spacing in code brackets i just cant get it to look right lol.
  3. I am writing a collada importer for my engine and i get to this: <rotate>-0.5767782 0.5784926 0.5767783 -119.8846</rotate> now it looks like a normal rotate xyzw rotate (rotate w degrees around arbitrary axis xyz). So i use this: void Node::Rotate(float x, float y, float z , float w) { Rotate(XMQuaternionRotationAxis(XMVectorSet(x,y,z,0),w)) ; } void Node::Rotate(XMVECTOR Input) { *LocalOrientation *= Input; RotationMatrixNeedsUpdate = true; } but its still not rotating right. Anyone know how to read this? edit: i know the yaw/pitch/roll rotation is x 89.99 y -0.18 z -89.99 from 3ds max
  4. [quote name='Jason Z' timestamp='1299189181' post='4781552'] Have you tried taking a frame capture with PIX and then debugged the pixel? Maybe your state isn't really getting set or something like that - you can check what is coming out of the pixel shader and the contents of the render target before and after the rendering operation has completed, which might give you some insight into what is going on. [/quote] Ok i tried Pix. I honestly dont know how to use it very well. But i did a single frame capture. I captured with f12. And in that list in the middle where it shows all my dx objects It seems that i dont have a blend state at all in the frame. Am I not creating the blend state right? Maybe its something in my device setup: [code] void RenderSystem::InitializeRenderSystem() { mRenderSystemPTR = this; JCoutSetup JCout << L"Initializing RenderSystem" << endl; DisplayConsole(JCoutSend); HRESULT hr = S_OK; RECT rc; GetClientRect( GameWindowManager::PrimaryGameWindow->g_hWnd, &rc ); UINT width = rc.right - rc.left; UINT height = rc.bottom - rc.top; UINT createDeviceFlags = 0; #ifdef _DEBUG createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG; #endif D3D_DRIVER_TYPE driverTypes[] = { D3D_DRIVER_TYPE_HARDWARE, D3D_DRIVER_TYPE_WARP, D3D_DRIVER_TYPE_REFERENCE, }; UINT numDriverTypes = ARRAYSIZE( driverTypes ); D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0, }; UINT numFeatureLevels = ARRAYSIZE( featureLevels ); DXGI_SWAP_CHAIN_DESC sd; ZeroMemory( &sd, sizeof( sd ) ); sd.BufferCount = 1; sd.BufferDesc.Width = width; sd.BufferDesc.Height = height; sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; sd.BufferDesc.RefreshRate.Numerator = 60; sd.BufferDesc.RefreshRate.Denominator = 1; sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; sd.OutputWindow = GameWindowManager::PrimaryGameWindow->g_hWnd; sd.SampleDesc.Count = 1; sd.SampleDesc.Quality = 0; sd.Windowed = TRUE; for( UINT driverTypeIndex = 0; driverTypeIndex < numDriverTypes; driverTypeIndex++ ) { g_driverType = driverTypes[driverTypeIndex]; hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, featureLevels, numFeatureLevels, D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &g_featureLevel, &g_pImmediateContext ); ManagerBase::g_pd3dDevice = g_pd3dDevice; ManagerBase::g_pImmediateContext = g_pImmediateContext; Mesh::g_pImmediateContext = g_pImmediateContext; if( SUCCEEDED( hr ) ) break; } if( FAILED( hr ) ) { JAssert(false,L"Failed To Run D3D11CreateDeviceAndSwapChain"); } // Create a render target view //ID3D11Texture2D* pBackBuffer = NULL; hr = g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), ( LPVOID* )&mBackBuffer ); if( FAILED( hr ) ) { JAssert(false,L"Failed To Run g_pSwapChain->GetBuffer"); } hr = g_pd3dDevice->CreateRenderTargetView( mBackBuffer, NULL, &g_pRenderTargetView ); mBackBuffer->Release(); if( FAILED( hr ) ) { JAssert(false,L"Failed To Run g_pd3dDevice->CreateRenderTargetView("); } // Create depth stencil texture D3D11_TEXTURE2D_DESC descDepth; ZeroMemory( &descDepth, sizeof(descDepth) ); descDepth.Width = width; descDepth.Height = height; descDepth.MipLevels = 1; descDepth.ArraySize = 1; descDepth.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; descDepth.SampleDesc.Count = 1; descDepth.SampleDesc.Quality = 0; descDepth.Usage = D3D11_USAGE_DEFAULT; descDepth.BindFlags = D3D11_BIND_DEPTH_STENCIL; descDepth.CPUAccessFlags = 0; descDepth.MiscFlags = 0; hr = g_pd3dDevice->CreateTexture2D( &descDepth, NULL, &mDepthStencil ); if( FAILED( hr ) ) { JAssert(false,L"Failed To Create depth stencil Texture"); } // Create the depth stencil view D3D11_DEPTH_STENCIL_VIEW_DESC descDSV; ZeroMemory( &descDSV, sizeof(descDSV) ); descDSV.Format = descDepth.Format; descDSV.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D; descDSV.Texture2D.MipSlice = 0; hr = g_pd3dDevice->CreateDepthStencilView( mDepthStencil, &descDSV, &mDepthStencilView ); if( FAILED( hr ) ) { JAssert(false,L"Failed To Create depth stencil View"); } g_pImmediateContext->OMSetRenderTargets( 1, &g_pRenderTargetView, mDepthStencilView ); //Setup Rasterizer D3D11_RASTERIZER_DESC rasterDesc; rasterDesc.AntialiasedLineEnable = false; rasterDesc.CullMode = D3D11_CULL_BACK;//D3D11_CULL_BACK D3D11_CULL_NONE rasterDesc.DepthBias = 0; rasterDesc.DepthBiasClamp = 0.0f; rasterDesc.DepthClipEnable = true; rasterDesc.FillMode = D3D11_FILL_SOLID; rasterDesc.FrontCounterClockwise = false; rasterDesc.MultisampleEnable = false; rasterDesc.ScissorEnable = false; rasterDesc.SlopeScaledDepthBias = 0.0f; hr = g_pd3dDevice->CreateRasterizerState(&rasterDesc, &mRasterizerState); if(FAILED(hr)) { JAssert(false,L"Failed To Create Rasterizer"); } g_pImmediateContext->RSSetState(mRasterizerState); // Setup the viewport D3D11_VIEWPORT vp; vp.Width = (FLOAT)width; vp.Height = (FLOAT)height; vp.MinDepth = 0.0f; vp.MaxDepth = 1.0f; vp.TopLeftX = 0; vp.TopLeftY = 0; g_pImmediateContext->RSSetViewports( 1, &vp ); //Setup Depth Stencil State D3D11_DEPTH_STENCIL_DESC depthStencilDesc; // Set up the description of the stencil state. depthStencilDesc.DepthEnable = true; depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL; depthStencilDesc.DepthFunc = D3D11_COMPARISON_LESS;//D3D11_COMPARISON_LESS_EQUAL depthStencilDesc.StencilEnable = true; depthStencilDesc.StencilReadMask = 0xFF; depthStencilDesc.StencilWriteMask = 0xFF; // Stencil operations if pixel is front-facing. depthStencilDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP; depthStencilDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR; depthStencilDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP; depthStencilDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS; // Stencil operations if pixel is back-facing. depthStencilDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP; depthStencilDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR; depthStencilDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP; depthStencilDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS; mDepthStencilState = NULL; g_pd3dDevice->CreateDepthStencilState(&depthStencilDesc,&mDepthStencilState); g_pImmediateContext->OMSetDepthStencilState(mDepthStencilState,1); //Setup Blend State D3D11_BLEND_DESC BlendStateDescription; ZeroMemory(&BlendStateDescription, sizeof(D3D11_BLEND_DESC)); //BlendStateDescription.AlphaToCoverageEnable = TRUE; //BlendStateDescription.IndependentBlendEnable = TRUE; BlendStateDescription.RenderTarget[0].BlendEnable = TRUE; //D3D11_BLEND_ONE //D3D11_BLEND_ZERO //D3D11_BLEND_SRC_ALPHA //D3D11_BLEND_DEST_ALPHA //D3D11_BLEND_SRC_COLOR //D3D11_BLEND_DEST_COLOR //D3D11_BLEND_INV_SRC_ALPHA //D3D11_BLEND_INV_DEST_ALPHA BlendStateDescription.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA; BlendStateDescription.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA; BlendStateDescription.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE; BlendStateDescription.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ONE; //D3D11_BLEND_OP_ADD //D3D11_BLEND_OP_SUBTRACT //D3D11_BLEND_OP_REV_SUBTRACT BlendStateDescription.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD; //BlendStateDescription.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD; BlendStateDescription.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; mBlendState = NULL; g_pd3dDevice->CreateBlendState(&BlendStateDescription,&mBlendState); //g_pd3dDevice->CreateBlendState(&BlendStateDescription,&mBlendState); if(FAILED(hr)) { JAssert(false,L"Failed To Create BlendState"); } float blendFactor[] = {0,0, 0, 0}; UINT sampleMask = 0xffffffff; g_pImmediateContext->OMSetBlendState(mBlendState,blendFactor, sampleMask); // Managers mMeshManager.InitializeMeshManager(); mShaderManager.InitializeShaderManager(); } [/code] After I run my engine I get a list of all the objects. No matter how many blend states i create there is only one in this list. I believe that this one is created by DX by default. Even If i just set a null blend state and set it I dont get an error from DX: [code] mBlendState = NULL; //g_pd3dDevice->CreateBlendState(&BlendStateDescription,&mBlendState); //g_pd3dDevice->CreateBlendState(&BlendStateDescription,&mBlendState); if(FAILED(hr)) { JAssert(false,L"Failed To Create BlendState"); } float blendFactor[] = {0,0, 0, 0}; UINT sampleMask = 0xffffffff; g_pImmediateContext->OMSetBlendState(mBlendState,blendFactor, sampleMask); [/code]
  5. Thank you for your quick reply haegarr. I tried all of the configurations you suggested and nothing seems to change. Even when i set all the src/dest to D3D11_BLEND_ONE or D3D11_BLEND_ZERO nothing even changes as if im never even setting a blend mode. Ive been trying quite a few configurations(with the BlendStateDescription) and i dont even get any noticable change.
  6. I am trying to do a simple alpha transparency. For now I am just manually setting the alpha in the pixel shader like so: [code] float4 PS( VS_OUTPUT input ) : SV_Target { float4 FinalColor = txDiffuse.Sample( samLinear, input.Tex );//* float4(1.0f, 1.0f, 1.0f, 0.5f); //FinalColor.r = 1; //FinalColor.g = 1; //FinalColor.b = 1; FinalColor.a = 0; return FinalColor; } [/code] and setting the blend state like so: [code] D3D11_BLEND_DESC BlendStateDescription; BlendStateDescription.RenderTarget[0].BlendEnable = true; BlendStateDescription.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA; //D3D11_BLEND_SRC_COLOR; BlendStateDescription.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;//D3D11_BLEND_DEST_COLOR; BlendStateDescription.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;//D3D11_BLEND_SRC_ALPHA; BlendStateDescription.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;//D3D11_BLEND_DEST_ALPHA; BlendStateDescription.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD; BlendStateDescription.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD; BlendStateDescription.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; mBlendState = NULL; g_pd3dDevice->CreateBlendState(&BlendStateDescription,&mBlendState); float blendFactor[] = {0,0, 0, 0}; UINT sampleMask = 0xffffffff; g_pImmediateContext->OMSetBlendState(mBlendState,blendFactor, sampleMask); [/code] I am also clearing the depth stencil view every frame: [code] g_pImmediateContext->ClearDepthStencilView( mDepthStencilView, D3D11_CLEAR_DEPTH| D3D11_CLEAR_STENCIL, 1.0f, 0 ); [/code] but I still get no transparency... Im almost sure that I am setting up the blend state right. Im pretty much copying it straight from my working DX10 code. What am I doing wrong here?
  7. I cannot get a tga file loaded via D3DX11CreateShaderResourceViewFromFile hr = D3DX11CreateShaderResourceViewFromFile( g_pd3dDevice, Input.c_str(), NULL, NULL, &Result->mShaderResourceView, NULL ); the hr results in 16389 (with HRESULT_CODE(hr) ) according to msdn it should return one of the values on this list: http://msdn.microsoft.com/en-us/library/ff476174(v=vs.85).aspx and 16389 isnt on that list. Im pretty sure DX11 can support old school TGA right? It works fine with dds, bmp, etc. Just the few TGAs i have tried do not. Any reasons why this wouldn't work?
  8. I am trying to add a collada exporter to our engine. Say i have a single vertex; XMFLOAT3 Postion( x,y,z); and a transform matrix(in our case a translation): XMMATRIX TransformMatrix; Wouldn't I just multiply the position and transform to get a new (translated) position? I am trying this but the results arent coming out right. It is getting rotations... I think i am just messing something up with all this new syntax (XMFLOAT/XMMATRIX vs D3DXMATRIX). Anyone mind posting a quick transform in using XNA math? edit: should I be using a XMFLOAT4 for my position instead?
  9. Thank you again Dave :) I wish I had checked back on this post sooner. Since I only needed 3 points for my curve and you can generate a 2d plane from those 3 points. I ended up finding the 2d plane my curve exists in and then solving for the Length with the simpler 2D integral. But I implemented your method and it saves me the trouble of doing a conversion. I think its easier on the cpu as well. I believe I will go with your method. Ratings up (if you care for that sort of thing ;) )
  10. Thank you for the replies guys :) I believe that the suggestions that both of you have presented are for the parameterized form in 2d: Length = integrate(0,1){ sqrt( (dx/dt)^2 + (dy/dt)^2 ); Which is where I got the foundation to do the one I have in 3d: Length = integrate(0,1){ sqrt( (dx/dt)^2 + (dy/dt)^2 + (dz/dt)^2 ); But it is turning out to be very complicated because this doesn't integrate. and I am looking to see if there is a simpler way ;). edit: the reason it is so complicated is better explained here: http://www.gamedev.net/community/forums/topic.asp?topic_id=313018&forum_id=20&gforum_id=0 I don't really understand how to implement the solution he suggests
  11. I have been using this function to generate points on a curve using the Bezier quadratic equation: D3DXVECTOR3 BezierQuadratic(D3DXVECTOR3 InputA,D3DXVECTOR3 InputB,D3DXVECTOR3 InputC,float T) { //Explaination: //http://www.gamedev.net/reference/programming/features/curvessurfaces/ D3DXVECTOR3 Solution; float A = 1-T; float B = T; float A_2 = A*A; float AB2 = A*B*2; float B_2 = B*B; Solution.x = InputA.x*A_2 + InputB.x*AB2 + InputC.x*B_2; Solution.y = InputA.y*A_2 + InputB.y*AB2 + InputC.y*B_2; Solution.z = InputA.z*A_2 + InputB.z*AB2 + InputC.z*B_2; return Solution; } It seems to work nicely =). But now I need to find the length of this same curve: long double LengthOfBezierQuadratic(D3DXVECTOR3 InputA,D3DXVECTOR3 InputB,D3DXVECTOR3 InputC) { //http://tutorial.math.lamar.edu/Classes/CalcII/ParaArcLength.aspx /* x(T) =(p1.x)A^2+(p2.x)2AB+(p3.x)B^2 A=1-T B=T x(T) = (p1.x)(1-T)^2 + (p2.x)(1-T)(T) + (p3.x)(T)^2 x(T) = (p1.x)(1-T)*(1-T) + (p2.x)(T-T^2) + (p3.x)(T^2) x(T) = (p1.x)(1-2T+T^2) + (p2.x)(T-T^2) + (p3.x)(T^2) dx/dt = -2T(p2.x)+(p2.x)+2(P1.x)(T-1)+2(p3.x)T Length = integrate(0,1){ sqrt( (dx/dt)^2 + (dy/dt)^2 + (dz/dt)^2 ) */ } Now the formula is starting to get a bit long: http://www.algebrahelp.com/calculators/equation/simplifying/calc.do?equation=%28-2TB%2BB%2B2A%28T-1%29%2B2CT%29%28-2TB%2BB%2B2A%28T-1%29%2B2CT%29%3DP A = p1.x; B = p2.x; C = p3.x; (dx/dt)^2= -4AB + 12ABT + -8ABTT + -8ACT + 8ACTT + 4AA + -8AAT + 4AATT + 4BCT + -8BCTT + BB + -4BBT + 4BBTT + 4CCTT ; A = p1.y; B = p2.y; C = p3.y; (dy/dt)^2= -4AB + 12ABT + -8ABTT + -8ACT + 8ACTT + 4AA + -8AAT + 4AATT + 4BCT + -8BCTT + BB + -4BBT + 4BBTT + 4CCTT ; A = p1.z; B = p2.z; C = p3.z; (dz/dt)^2= -4AB + 12ABT + -8ABTT + -8ACT + 8ACTT + 4AA + -8AAT + 4AATT + 4BCT + -8BCTT + BB + -4BBT + 4BBTT + 4CCTT ; Not to mention the integral of the square root of all this... Am i going about this wrong? Is there a simpler way to calculate the length of this curve? I will not be firing this function very much but it seems like it might start to eat up some cpu time. Thank you guys in advance :) all help is greatly appreciated. edit: im still working on it: the antiderivative of one of the (dx/dt)^2 sections is: (-2TB+B+2A(T-1)+2Cx)^3/6(A-B+C) [Edited by - jchmack on October 26, 2009 3:08:27 AM]
  12. I recently stumbled across this article on how to (very simply) get a flash interface on a win32 app. http://www.codeproject.com/KB/cpp/FlashGui.aspx?display=PrintAll&fid=263587&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=101 It compiles fine and then crashes. I think that the article is probably outdated. This is probably using an older version of flash or something. But I honestly don't know enough about flash to understand whats going wrong here. Can anyone get this code to work? #include <windows.h> int WINAPI WinMain(HINSTANCE inst,HINSTANCE prev,LPSTR cmd,int show) { MSG msg={0}; void* init = GetProcAddress(LoadLibrary("atl"),"AtlAxWinInit"); _asm call init; CreateWindow("AtlAxWin", "c:\\WINDOWS\\Help\\Tours\\mmTour\\segment2.swf", WS_VISIBLE|WS_POPUP,0,0,GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN),0,0,0,0); while (GetMessage(&msg,0,0,0)) DispatchMessage(&msg); }; I don't have the swf at "c:\\WINDOWS\\Help\\Tours\\mmTour\\segment2.swf" but i did change that to a swf I downloaded that does work in Internet Explorer so I believe I have flash installed alright.
  13. Quote:Original post by Jae Hyuk Kwak In the case of Fall out 3, they use FaceGen. I'm also curious for other parts... Ive seen facegen but do they have it in game? Do you know if they bought/licensed the source for it?
  14. I am interested in making a custom character generator like those seen in Soul Calibur 4 / Oblivion. Can anyone point me to any good tuts/resources for such a system? I am particularly interested in dynamic mesh deformations and skeletal systems. I really am curious to see how they are able to transfer animations between characters.
  15. Quote:Original post by Jason Z Do you have depth testing and depth writing turned on? Check to see that you are! Also, take a frame with PIX and inspect the contents of your depth buffer before and after your draw calls. This should show you what is going on with the depth buffer. I am letting DXUT initialize everything for me: DXUTCreateWindow( L"Test APP" ); DXUTCreateDevice( true, 640, 480 ); I had assumed that DXUT would use the default behavior for the stencil buffer from the SDK tutorials: Quote: The default behavior of the depth buffer in Direct3D 10 is to check every pixel being drawn to the screen against the value stored in the depth buffer for that screen-space pixel. If the depth of the pixel being rendered is less than or equal to the value already in the depth buffer, the pixel is drawn and the value in the depth buffer is updated to the depth of the newly drawn pixel. On the other hand, if the pixel being draw has a depth greater than the value already in the depth buffer, the pixel is discarded and the depth value in the depth buffer remains unchanged. I spent some time looking through the DXUT source and I cannot tell if microsoft enables depth testing and depth writing by default. It initializes directx 9 settings and then converts them into 10. I honestly don't know enough about either at this point. Does anyone know? How can I check?