Tag Info

Hot answers tagged

12

Jovan's answer is great, but just wanted to add that there is sometimes hardware support for asking the question "Did this geometry actually render any pixels?" (your idea #1) These are called occlusion queries - these is a good GPU Gems article about them here This is pretty similar to your idea #1, except you don't need an invisible buffer, and can be ...


12

1) Scene is rendered to a invisible buffer, using low resolution and low polygon count models (or even using only bounding volumes like cubes or spheres). The buffer is then checked to know what is visible or not. Before rendering the low resolution scene, some frustum culling could be applied, to already remove as much objects as possible. ...


4

At least the first two Quake games used strategy 2; I don't know if idTech engines still use it. The reachable world is divided into convex spaces organized in a tree data structure ("binary space partition"), and for each node in the tree there's a bit vector representing which other nodes are visible from that node ("potentially visible set").


4

Deciding which criterion to start with I'd say the reason you're asking the question in the way you have (i.e. not a single question but many smaller ones), is because you have various explicit requirements that you have not reconciled: culling what should be culled, not culling what shouldn't be culled, and using alpha where you need foreground objects to ...


4

While there is some interesting research into order-independent transparency rendering, it's extremely complex to implement. And even sorting individual leaves can still cause artifacts where one leaf overlaps itself. So your safest bet is probably Alpha Testing. This is where you specify a threshold opacity value; anything above that value is rendered 100% ...


3

I found the problem. It was a really stupid mistake, I didn't know you had to specify glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE); to get the correct depth values and thus, I wasn't sampling the Depth values. Now I get a nice SSAO effect:


3

As far as I understand, portal culling is one of many culling techniques. That being said, we can infer that Unity could pre-compute potentially visible sets (PVSs) in many complementary ways: computing what's inside the frustum (visibility culling), hierarchically subdividing space and querying it (traditional occlusion culling), dividing the space in ...


3

Ok, finally figured it out! You see how the sphere mesh “cuts” through the cylinder and plane all the way to the skybox. This took me longer than expected to figure this out but thanks to a wiki page (http://wiki.unity3d.com/index.php/DepthMask) I got it all sorted. Before using the shader setup in the wiki page I was using three different cameras with ...


2

Couple of options to get the effect you want - but they do come a a cost: Write the holes into the stencil buffer or destination alpha channel, then draw the skybox last, using a suitable stencil test or alpha blend, and with no z-test? or Render the skybox to a texture at the start of the frame, and project that on to the 'hole geometry' I suspect ...


2

A system which never has any false-negatives is going to need to rely on some variant of graphics occlusion query. Ray casts and other physics-based measures will not work. You can use a GPU Occlusion Query for the easiest solution. Render your static geometry (just solid geometry, no need for colors or textures or other surface effects; you don't even ...


1

It seems like you need an occlusion query algorithm. Roughly speaking in order to check if certain object is visible from a certain point of view, one way is to use a ray casting algorithm: Cast a ray from the viewer point of view to the object. If the ray hits any other object in its way before hitting the target object then you can set the target ...


1

Here's how the algorithm works: We want to calculate the "occlusion" at each visible point in the scene, which represents the portion of the hemisphere aligned with the normal at that point that doesn't have geometry to close in that direction, as this is an approximation of the amount of light we would get from the "sky", or more generally the rest of the ...


1

Firstly, extracting from just the projection matrix is a good place to start debugging. To answer your question: In this case, your near and far plane values should be <0, 0, 1, -1> and <0, 0, -1, 1000> respectively. In practice, it might be off by a little due to floating point rounding errors. Now to help you solve your larger problem: You say ...


1

Perhaps you should look at "The Visibility Skeleton: A Powerful And Efficient Multi-Purpose Global Visibility Tool," Durand et al., a 1997 paper that Google Scholar shows has been cited 148 times since. The question you pose has been heavily studied! One of the key search phrases is walkthrough.


1

I have considered this problem myself and the only solution I have been able to come up with is to allow rotating the camera (or more technically correct, the map). This will let you see the player/items that are in range (by removing anything that is blocking your observer line of sight), and it also lets you interact with any item even if you are deep ...



Only top voted, non community-wiki answers of a minimum length are eligible