FatGarfield

Members
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

122 Neutral

About FatGarfield

  • Rank
    Member
  1. subsurface scattering in gpu gems III

    I've bought this book, and scanned the whole book for E-reading. But I don't know if it is leagal to send you the contents?
  2. HI, I'm implementing the algorithm described in the paper 'Geometry Clipmaps: Terrain Rendering Using Nested Regular Grids'. I have a question when programming: when updating the clipmaps, why using toroidal access? The paper says: Note that with toroidal access, we do not need to copy the old data when shifting a level. Instead, we simply fill the newly exposed "L-shaped" region. But this scheme adds two more tasks: 1. There is no hardware toroidal array support, then the calculation of toroidal index takes time. 2. The index buffer of each level need to be recalculated after updating. I try to implement a simpler scheme: when updating clipmap, just "move" the duplicated data from old clipmap to new clipmap, then pad the L-shaped region, in my scheme, the index buffer need not to be recalculated. What do you think about this? Any suggestions are appreciated.
  3. Interior lighting model

    Thank you Harry Hunt for your kindness reply. The light source in my project should be dynamic, that means: there are many different types of light souces which can be "plugged into" the scene dynamically. In fact, it is a kind of interior lighting design software.
  4. Hi, My current project is to real-time render a scene inside a house. The scene consists of furniture, various light sources, etc. I've considered PRT, but it is not suitable for local lighting. I've also considered using a large number of point light sources to approximate area light source, but it is time consuming. My questions is: which lighting model to choose to get realistic interior lighting effect as pics in following link: http://www.ogre3d.org/index.php?set_albumName=album52&option=com_gallery&Itemid=55&include=view_album.php any suggestions and comments are appreciated.
  5. Occlusion Query

    thank you, JasonBlochowiak and Mr X I'm sure the query finished. The scheme of my program is: 1. I define a COcclusionQuery class to wrap the occlusion query class COcclusionQuery { public: COcclusionQuery(void) { g_pDevice9->CreateQuery( D3DQUERYTYPE_OCCLUSION, &m_pquery ); ) ~COcclusionQuery(void) { RELEASE( m_pquery ); } public: void begin() { g_pDevice9->SetRenderState(D3DRS_ZWRITEENABLE, FALSE); g_pDevice9->SetRenderState(D3DRS_COLORWRITEENABLE, 0x0 ); m_pquery->Issue( D3DISSUE_BEGIN ); } void end() { g_pDevice9->SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA| D3DCOLORWRITEENABLE_BLUE| D3DCOLORWRITEENABLE_GREEN| D3DCOLORWRITEENABLE_RED ); g_pDevice9->SetRenderState(D3DRS_ZWRITEENABLE, TRUE); m_pquery->Issue( D3DISSUE_END ); } void getdata_wait( DWORD& dwdata ) { while( m_pquery->GetData((void *) &dwdata, sizeof(DWORD), D3DGETDATA_FLUSH) != S_OK ) { } } public: IDirect3DQuery9 *m_pquery; } 2. for each of the scene node, I define a class class CKDNode { ... public: CKDNode *pleft; CKDNode *pright; COcclusionQuery query; ... } 3. render the scene graph, render_recur( CKDNode *pKDNode ) { DWORD dwdata; pKDNode->query.begin(); *render bounding box of pKDNode* pKDNode->query.end(); pKDNode->query.getdata_wait(dwdata); if( dwdata > 0 ){ *render geometry objects in this node* } if( pKDNode->pleft != 0 ){ render_recur(pKDNode->pleft); } if( pKDNode->pright != 0 ){ render_recur(pKDNode->pright); } } some of the scene graph nodes' query result should not be zero, but I get zero from query interface:(
  6. Occlusion Query

    I create a hierarchical scene graph, and bind a IDirect3DQuery9 object to each node 0 |---------| 1 4 |------| |------| 2 3 5 6 I use g_pDevice9->CreateQuery( D3DQUERYTYPE_OCCLUSION, &pquery ); to create each IDirect3DQuery9 object before rendering. In rendering, first block z-buffer and color-buffer writting, then issue query for boundig box of each node, according to the queried result, to draw this node or not. If I query individual node's occlusion information, I can get correct result, but if I query one more node, the query result of some node is zero ( sure it should not be zero!). If there is a maximum number restriction on occlusion query in D3D? thanks!