Is Irrlicht can cut overlapped objects?
-
- Posts: 41
- Joined: Mon Feb 11, 2008 3:06 pm
Is Irrlicht can cut overlapped objects?
I'm interesting in: is irrlicht not render objects that overlapped by some objects when we see from camera. I mean is there some kind of algorithm done? For example, we should stay flag that object (or it's boundary box) is not transparent, so during rendering engine skips objects that collide by this object.
Thanks.
Thanks.
-
- Posts: 153
- Joined: Mon Mar 03, 2008 8:42 am
- Location: Suceava - Romania
- Contact:
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Yes, it's vitally important that you choose the right one, because the other leads to Certain Doom.Chmel_Tolstiy wrote:search in forum or in google?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
It's true, I'm currently having 100 health drained because I picked the Doom one. (kudos for being able to dereference this poorly-made reference.)
In seriousness, I'm looking into occlusion culling as well. If I find any definitive information through personal research, I'll either post it here or PM you - whichever seems like the better option at the time.
In seriousness, I'm looking into occlusion culling as well. If I find any definitive information through personal research, I'll either post it here or PM you - whichever seems like the better option at the time.
Yes, I think you are referring to myself and Nadro's project. Or Nadro's and someone else's project, but it doesn't matter.JP wrote:There are two irrlicht projects implementing Occlusion Culling so you should be able to find them, one is further developed than the other, i think they're fairly usable...
At any rate I would just like to say that Nadro's is definitely more useful, and further developed. He has a great base to start on. At any rate, you need to make use, of his wrapper around occlusion queries, and implement some more advanced algorithms if you want to yield any real results with occlusion queries. They cause great overhead, and thus aren't very useful unless you use a clever algorithm, as presented in GPU Gems 2 (available online), or you introduce occlusion culling frame lag.
My general thought was that a better solution, if you don't need fully precise and accurate occlusion culling results, would be to render into a 256x256 (or user configurable) render target, and use the occlusion queries on that. The chance of becoming fill-rate limited is decreased, and the drawing time is decreased as well.
Also another one I was thinking off was making use of the octree. Basically, you would, for all visible nodes, find how many objects are in it. The nodes would also be weighted by how close they are to the near clipping plane and bounding box size, as well. But anyways, you would project the specific octree node bounding box onto the scene to retrieve a roundabout number of how many fragments are occupied by it. That would be factored into the weight equation as well. Then after gathering the weights, you would gather a small subset of the nodes that are believed to be heavy occluders, and only use occlusion queries on those nodes.
I have never gotten around to implementing the algorithm, and I doubt I ever will, but I was just throwing ideas around for you to work with. The best recommendation I would have for you is to use Nadro's occlusion query implementation, and the GPU Gems 2 algorithm.
TheQuestion = 2B || !2B
-
- Posts: 41
- Joined: Mon Feb 11, 2008 3:06 pm
No it wasn't included in 1.4.2, but you should still update to 1.4.2 anyways. And yes, his project must be applied as a patch, or you could manually type everything in.Chmel_Tolstiy wrote:Is Nardo project included 1.4.2 realese ? I still don't download it. I use 1.4.1. Or I should use his patch for update source (I'm not good in svn) ?
TheQuestion = 2B || !2B
-
- Posts: 41
- Joined: Mon Feb 11, 2008 3:06 pm
I have a big troubles with patch. I tryed TortoiseSVN and patch.exe for update code. But always got errors like "patch seems outdate". I tryed "update to revison 1498" and the same result. I tryed patching code of 1.4.2 realese - and the same result. May be some one can mail to me patched code of needed files and then I update my code to 1655 revision.
Thanks. email: naxart@gmail.com
Thanks. email: naxart@gmail.com
-
- Posts: 41
- Joined: Mon Feb 11, 2008 3:06 pm
Or may be anyone can send to me patch for 1655 Revision. Thanks.Chmel_Tolstiy wrote:I have a big troubles with patch. I tryed TortoiseSVN and patch.exe for update code. But always got errors like "patch seems outdate". I tryed "update to revison 1498" and the same result. I tryed patching code of 1.4.2 realese - and the same result. May be some one can mail to me patched code of needed files and then I update my code to 1655 revision.
Thanks. email: naxart@gmail.com
-
- Posts: 41
- Joined: Mon Feb 11, 2008 3:06 pm
I have one more question. May be who better know Nardo's project can help me. Nardo's code likes this
(function void CD3D9Driver::runAllQueries())
Is after this call zbuffer changed ? and if yes can I stay some flags for buffer don't change? I want to make a 3d-tree for boundboxes and at first test on it, and only when I get leafs of my tree I want to change z-buffer.
Thanks.
Code: Select all
Query[current]->Issue( D3DISSUE_BEGIN );
{
for(int scurrent = 0; scurrent < QueryMesh[current]->getMeshBufferCount(); scurrent++)
drawMeshBuffer(QueryMesh[current]->getMeshBuffer(scurrent));
}
Is after this call zbuffer changed ? and if yes can I stay some flags for buffer don't change? I want to make a 3d-tree for boundboxes and at first test on it, and only when I get leafs of my tree I want to change z-buffer.
Thanks.
That doesn't show whether the z-buffer is enabled or not. Look for something like:
or something like that. Or you can look for the Irrlicht equivalent.
Code: Select all
d3dDevice->SetRenderState(D3DRS_ZENABLE, TRUE);
TheQuestion = 2B || !2B
-
- Posts: 41
- Joined: Mon Feb 11, 2008 3:06 pm
-
- Posts: 41
- Joined: Mon Feb 11, 2008 3:06 pm
I'm trying to use:
pID3DDevice->SetRenderState(D3DRS_ZWRITEENABLE, FALSE); - when I want just to test for visibility of BBox;
pID3DDevice->SetRenderState(D3DRS_ZWRITEENABLE, TRUE); - when I want to change zbuffer. Is it correct? I read documentation, and as I understood, it's right. But it does not work correctly.
D3DRS_ZENABLE stated to TRUE.
It culls objects, that really visible.
pID3DDevice->SetRenderState(D3DRS_ZWRITEENABLE, FALSE); - when I want just to test for visibility of BBox;
pID3DDevice->SetRenderState(D3DRS_ZWRITEENABLE, TRUE); - when I want to change zbuffer. Is it correct? I read documentation, and as I understood, it's right. But it does not work correctly.
D3DRS_ZENABLE stated to TRUE.
It culls objects, that really visible.