Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Sep 2007
Offline Last Active Nov 21 2012 12:22 PM

Topics I've Started

Fast ray casting for AO

01 November 2007 - 05:30 AM

I'm wanting to optimise ray casting for ambient occlusion purposes. For a high quality render, we are casting near 4k rays per texel on the destination texture. This gets a bit slow, but even with less rays for "preview" purposes it's quite slow. We are currently using a well optimised octree to accellerate the ray casts. To be honest, I wouldn't be expecting or looking for *much* better performance if it weren't that NVidia's Melody seems to handle large numbers of rays for ambient occlusion considerably quicker. Does anyone know what they might be doing? I have considered a number of potential optimisations but I don't think any would be very general purpose or effective. I would still stick to ray casting and not something more approximate but a limited quality or accuracy sacrifice is fine for a preview mode.

Tangents flipped and mirrored

11 October 2007 - 06:52 AM

I need to calculate tangents for a mesh with adjacent faces having flipped AND mirrored UVs (or rotated 180 deg). So far I've only dealt with splitting vertices where face UVs have different winding order, which is very simple. I'm using Eric's method for tangents. I've tried splitting vertices from faces with considerably different tangents and bitangents but this proved surprisingly messy and unreliable. I haven't had any problems with badly behaved tangents besides this case of 180 deg rotation but it makes sense that any case of discontinuous tangents should be handled. Are there any standard or ideal methods to detect and repair these conditions?

Shadow map method

27 September 2007 - 03:27 AM

Hello, I've been using stencil shadows for all dynamic shadowing for years now and I've not seriously looked into shadow maps. Now I'm moving to the great outdoors and I seriously need an image space approach. I've done a fair bit of research and I think I have a reasonable overview of all the more popular methods, but before I get into those I'd like to run some ideas of my own by someone with experience in shadow maps. One of the things I most dislike about shadow maps is the shimmering aliasing artifacts given by view-dependant methods. I am looking into directional lights, ie the sun, only (stencil shadows for other lights). My terrain is split into a square grid and each cell can be rendered independantly with it's own state set. Exploiting this, I would consider rendering a view-independant shadow map per cell. The advantages I see in this approach are: 1) View independant and hence aliasing artifacts don't move with camera transforms. 2) View independant and hence no need to re-render shadow maps for additional renderings in same time-slice (i.e. water reflections). 3) Per-cell updates means I can update distant shadow maps (very large portions of the scene) with considerably lower frequency. The only downside I see is the relatively poor distribution of samples in view space for a first person or similar view. This could result in poor resolution close up and minification artifacts further away. Also, I am presuming that I can trasform my shadow map projection so as to obtain an isotropic distribution of shadow map samples onto my square terrain cell. Not sure how yet but I presume this would be fairly easy? So, can someone with experience in shadow maps suggest how serious these issues might be and help me figure out if this approach could be worthwhile? Thanks

Intersection of convex polyhedra

25 September 2007 - 01:24 AM

Hello, my first time on these forums though I've been making 3D engines for 10 years now! I need to find a polyhedron that is the intersection of two convex polyhedra. I've been looking around for three days now but all I've found is tests that return a penetration depth at most, of which Voronoi-Clip seemed like the most promising. On a side note, I found an article on Gamasutra (when two hearts collide) that proposes to find a separating plane in either a face of the polyhedra or a plane made from an edge of one polyhedron and a vertex of the other. Does this work? Because it seems to me that this should be faster than SAT and just as simple. Anyway, I have kind of approached this problem previously, though messily and not really with the same goal in mind (just a debugging tool). Basically, what I did is look for features (vertices and edges) by intersection of the planes of both volumes, discarding those planes that returned no features (just vertices? Can't remember) that weren't discarded by other planes. This seemed to work but I did have precision issues in cases where some planes had similar normals, I'm thinking these could be solved though. I'm wondering if I could not improve on something like this to get what I need. I thought I might approach the problem by first discarding all polygons from either polyhedron that do not intersect the other polyhedron and then derive vertex and edge features from intersection of the remaining face planes. Does this sound valid? Performance is not a big concern, I would choose simplicity and robustness over performance. [Edited by - Madoc on September 25, 2007 8:11:34 AM]