A thought on Visibility Determination.....
I am working on the hidden face removal of my render routine and am having some doubts.i feel that i loose out on performance in just figuring out which surface is hidden.i just tried a simple object picking routine which scans thru 220 faces of an object every frame and the fps drops to 12 - from 75.
is there something wrong with my implementation of the object picking routine or is that how the "High Speed" comps of today are???
btw i am using D3D IM under win2k using a Savage4 chipset from diamond.
thnx a lot!
Raptor
Raptor
Divide the world into 8 sectors, pick the sector the player is in, divide again... dont over-do this... depends on world size how many times you divide. This will quickly and massively reduce the poly''s to be rendered.
Use clipping planes and backface culling (very common hidden surface removal alog''s, D3D has them built in - as should _any 3D renderer)
Use clipping planes and backface culling (very common hidden surface removal alog''s, D3D has them built in - as should _any 3D renderer)
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
I tried a simple test to chop down the polys sent to the render pipeline.well here is what i did .....
( actually i have modified the Xfile sample in the Directx SDK )
Original code -
pd3dDevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST,D3DFVF_VERTEX,m_pVertices, m_dwNumVertices,pIndices, dwNumIndices, NULL );
Modified Code -
pd3dDevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST,D3DFVF_VERTEX,m_pVertices, m_dwNumVertices,pIndices, dwNumIndices/2, NULL );
Original FPS - 21 with 17000 polys
Final FPS - 25 with 17000/2 polys (i assume)
(this however seems so be cutting down half the object''s polys.
( i can see HOLES in my objects!! )
am i making a mistake?
Raptor
( actually i have modified the Xfile sample in the Directx SDK )
Original code -
pd3dDevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST,D3DFVF_VERTEX,m_pVertices, m_dwNumVertices,pIndices, dwNumIndices, NULL );
Modified Code -
pd3dDevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST,D3DFVF_VERTEX,m_pVertices, m_dwNumVertices,pIndices, dwNumIndices/2, NULL );
Original FPS - 21 with 17000 polys
Final FPS - 25 with 17000/2 polys (i assume)
(this however seems so be cutting down half the object''s polys.
( i can see HOLES in my objects!! )
am i making a mistake?
Raptor
Raptor
Well that sure is strange.
as a matter of fact i have just begun programming in D3D.
probably it is a mistake,i dont know.
i guess Indices hold the Face data,does it??
The only way around it is Through it!!
as a matter of fact i have just begun programming in D3D.
probably it is a mistake,i dont know.
i guess Indices hold the Face data,does it??
The only way around it is Through it!!
The thing that you don''t get an significant speed increase is, that you transform all Vertices every Time, even if they aren''t referenced by the Index List. Your Problem isn''t the Fillrate, it is the Processor which hasn''t enough Power to transform all the Vertices. Cause your CPU has all the Hands full, your Face Removal kills it.
You should use less Vertices, or reuse as much as possible. Or use an Hardware TnL Card, and give some of transformation work to the Card.
Lars
You should use less Vertices, or reuse as much as possible. Or use an Hardware TnL Card, and give some of transformation work to the Card.
Lars
--------> http://www.larswolter.de <---------
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement