|
View previous topic :: View next topic
|
| Author |
Message |
Won
Joined: 21 Sep 2005 Posts: 506 Location: New York
|
| |
Posted: Tue Apr 08, 2008 2:52 pm Post subject: |
 |
|
| icastano wrote: | | tulrich wrote: | | Can texture stretch be kept under control with a quad base complex? |
Note that you don't necessarily have to map each chart to a quad in texture space, you can let the boundaries be free, and if you use a conformal parameterization in a planar domain with cone singularities that are multiples of 90 degrees, then the boundary edges will match properly and you won't have bilinear discontinuities. |
Does this just mean that one of the sides of a quad chart can be degenerate, making a triangle? Isn't that a kind of texture stretch? |
|
| Back to top |
|
 |
icastano
Joined: 01 Jul 2007 Posts: 32
|
| |
Posted: Tue Apr 08, 2008 7:46 pm Post subject: |
 |
|
| Won wrote: | | Does this just mean that one of the sides of a quad chart can be degenerate, making a triangle? Isn't that a kind of texture stretch? |
It all depends on where you place the cone singularities and how they are connected. An automated approach that I think should be reasonable to implement is to use something like polycubemaps, and cut the mesh projecting the triangles to the closest face of the polycube. That would give you a quad base complex whose corners are either planar or are singularities with an angle multiple of 90 degrees. |
|
| Back to top |
|
 |
NocturnDragon
Joined: 23 Jul 2008 Posts: 3
|
| |
Posted: Wed Jul 23, 2008 12:47 pm Post subject: |
 |
|
Jon Olick will talk about Id's raycasting on sparse octrees tech at Siggraph.
http://ompf.org/forum/viewtopic.php?f=3&p=8319
| Quote: | From the official program:
Beyond Programmable Shading: In Action
Thursday, 1:45 - 5:30 pm
Level: Intermediate
This class, the second in a series, explores case studies of combining traditional rendering API usage with advanced parallel computation from game developers, researchers, and graphics hardware vendors. There are strong indications that the future of interactive graphics programming
is a more flexible model than today’s OpenGL/Direct3D pipelines. Graphics developers will need to have a basic understanding of how to combine emerging parallel programming techniques and more flexible graphics processors with the traditional interactive rendering pipeline. Each case study in the class includes a live demo and discusses the mix of parallel programming constructs used, details of the graphics algorithm, and how the rendering pipeline and computation interact to achieve the technical goals.
Prerequisites
Experience with a modern graphics API (OpenGL or Direct3D), including basic experience with shaders, textures, and frame buffers and/or background in parallel programming languages. Some background in parallel programming on CPUs or GPUs is useful but not required, as an overview will be provided in the course. Attendees are strongly encouraged to attend the first SIGGRAPH 2008 class in this series: Beyond Programmable Shading: Fundamentals.
Instructors
Aaron Lefohn
Intel Corporation
Mike Houston
AMD Corporation
David Luebke
NVIDIA Corporation
Jon Olick
Id Software
Fabio Pellacini
Dartmouth University
Zelex, thanks for the extra frosting by telling us that you'll talk about raycasting. I was going to attend this class anyway, but now it's even more interesting ... |
|
|
| Back to top |
|
 |
NocturnDragon
Joined: 23 Jul 2008 Posts: 3
|
|
| Back to top |
|
 |
sean
Joined: 01 Feb 2005 Posts: 1392 Location: Kirkland WA
|
| |
Posted: Tue Aug 19, 2008 6:14 pm Post subject: |
 |
|
unfortunately, they're slides, not a paper, which makes it nigh impossible to figure out what's being proposed.
Also, I think I'm back to disbelieving in it. I note that both of the example images aren't textured. One of the big problems with the voxel representation is that you give up bilinear interpolation, and I think that's going to induce some pretty hideous artifacts.
I've argued this before, possibly on this forum: texture mapping so quickly dominated and is successful because there is a clear 1-to-1 mapping between small 2d screen areas and 2d areas on polygonal geometry, and texture mapping offers well-defined ways to smoothly and continuously provide detail on those 2D elements of the world so that detail maps directly to the 2D area of the screen and is thus cleanly able to be defined. A post-process blur is just a hack.
For voxels, there are a number of approaches to mapping them to 2d elements:
- Splatting provides continuous smoothness, but only by inducing unnecessary blur, it has anistropy problems, etc.
- Converting to isosurfaces (but he doesn't seem to be talking about doing that, and you sill have some issues for nicely mapping your colors onto that surface, and from thence to pixels)
- Treating each voxel as a little cube of a given color (what I think id is doing, which is why I think it's probably actually hideous)
- Treating each voxel as a little cube, and allowing a different color on each corner of the voxel (this might give reasonable result, although transitions between voxel miplevels is a pain)
Ah yes, I did say this before in this thread. |
|
| Back to top |
|
 |
sean
Joined: 01 Feb 2005 Posts: 1392 Location: Kirkland WA
|
| |
Posted: Tue Aug 19, 2008 6:31 pm Post subject: |
 |
|
Here's an example.
In the paper, he says they believe they can compress the positional data down to 1.15 bits of data per voxel. You can see how that makes it compelling if you're doing fully-unique texturing: having fully-unique positional data per texture sample isn't that much overhead.
Then he uses the examples of "160 bits per triangle" and "80 bits per triangle" for comparison, although I guess he really means per vertex. But then he calls the first a "2.2:1 compression ratio" and the second a "1.1:1" compression ratio, and I have no idea what he means. Maybe we're assuming two triangles cover an 8x8 block of texture, and that's the ratio comparing voxels to triangles?
But, anyway, the whole thing just totally ignores the possibility of, e.g., displacement maps, which only require 8 bits of positional data per texel sample, while still letting you use a triangle pipeline and bilerping and all that good stuff. |
|
| Back to top |
|
 |
Zaphos
Joined: 24 Feb 2007 Posts: 90
|
| |
Posted: Tue Aug 19, 2008 9:23 pm Post subject: |
 |
|
| I like the "Infinite Surface Detail" slide -- if we could adapt some sort of multi-scale texture synthesis to voxels and get infinite detail, that seems quite neat! (Of course -- I'm not saying practical, just neat.) Also, then we can just recursively evaluate the voxels until we have multiple in a single pixel, and we seem to brute-force past the interpolation issues ... |
|
| Back to top |
|
 |
ryg
Joined: 31 May 2007 Posts: 276 Location: Kirkland, WA
|
| |
Posted: Tue Aug 19, 2008 10:51 pm Post subject: |
 |
|
| Zaphos wrote: | | I like the "Infinite Surface Detail" slide -- if we could adapt some sort of multi-scale texture synthesis to voxels and get infinite detail, that seems quite neat! (Of course -- I'm not saying practical, just neat.) Also, then we can just recursively evaluate the voxels until we have multiple in a single pixel, and we seem to brute-force past the interpolation issues ... |
You can't brute-force past the interpolation issues. It's a fundamental sampling problem - any subpixel-level detail just ends up as noise if you don't bandlimit the signal properly. That's where texture interpolation with mipmapping really shines - the mipmapping automatically limits the frequency content of the texture (usually overzealously - but for the few textures where that's objectionable, you can just turn on anisotropic filtering).
Just look at the example images - the quality is outright crappy, full of aliasing artifacts. And since it runs inside pixel shaders, it gets zero use out of multisampling hardware. Even if you decided to do supersampling on your own in the shader (by this point your framerate is pretty dead, of course), all you can get out of a pure voxel dataset is a bunch of small cubes with antialiased edges. Not very convincing. |
|
| Back to top |
|
 |
Zaphos
Joined: 24 Feb 2007 Posts: 90
|
| |
Posted: Wed Aug 20, 2008 12:37 am Post subject: |
 |
|
| ryg wrote: |
You can't brute-force past the interpolation issues. It's a fundamental sampling problem - any subpixel-level detail just ends up as noise if you don't bandlimit the signal properly. That's where texture interpolation with mipmapping really shines - the mipmapping automatically limits the frequency content of the texture (usually overzealously - but for the few textures where that's objectionable, you can just turn on anisotropic filtering).
|
But I thought things like multisample anti-aliasing (or I guess any supersampling) were basically exactly 'brute-forcing' past the interpolation issues? And essentially I was suggesting supersampling.
Also, would it help to define the recursive evaluation in a way that ensures that a voxel is approximately equal to the average of the voxels you get from recursive evaluation?
| ryg wrote: |
Just look at the example images - the quality is outright crappy, full of aliasing artifacts. |
I'm not sure what parts of the talk the example images are actually using, so it's hard to know what to make of them. |
|
| Back to top |
|
 |
ryg
Joined: 31 May 2007 Posts: 276 Location: Kirkland, WA
|
| |
Posted: Wed Aug 20, 2008 2:08 am Post subject: |
 |
|
| Zaphos wrote: |
But I thought things like multisample anti-aliasing (or I guess any supersampling) were basically exactly 'brute-forcing' past the interpolation issues? And essentially I was suggesting supersampling. |
The whole idea of multisample AA (as opposed to e.g. full-scene AA, which is actual brute-force supersampling of everything) is that the actual rasterization is really the only part of per-pixel processing that isn't inherently bandlimited (usually, anyway; obviously that's not the case with filtering disabled or with shaders that don't compute smooth functions). Multisampling hardware only computes the coverage at subpixel resolution, all shading computations are performed only once per pixel (which is why "pixel shader" is really more appropriate than "fragment shader" for current HW). You still need a higher-resolution Z-Buffer, but the bandwidth and computational requirements are significantly lower than they'd be if you supersampled everything.
This is relatively cheap (and not at all brute-force since the extra computations only need to be performed for pixels that contain triangle edges, which is straightforward to determine for the rasterizer), but obviously it can only work if the geometry is actually known at that stage.
Simplifying matters a bit, all this is based on the idea that even small details and tiny triangles look like large triangles "up close" (i.e. if you only subdivide your pixel grid far enough). At that "zoom level", just doing point sampling and averaging works fine. But exactly that's what breaks down if you do the "infinite surface detail" thing - no matter how far you zoom in, you essentially never get to a point where you can be reasonably sure not to miss something important.
| Zaphos wrote: | | Also, would it help to define the recursive evaluation in a way that ensures that a voxel is approximately equal to the average of the voxels you get from recursive evaluation? |
It would, because that is exactly what you need to make the above process useful again - a meaningful termination criterion (since with this property, you can reasonably assume that variation will get smaller with every subdivision). But you still have the problem that there's no easy way to interpolate e.g. diffuse color or normals between voxels. Now you can either store interpolation parameters per voxel (greatly increasing storage requirements), fake the whole thing with a blur pass (hard to get to look right, and it always smooths away detail even where it's supposed to be), or "interpolate" by supersampling everything (ridiculously expensive, especially when you're already using a complex shader). |
|
| Back to top |
|
 |
sean
Joined: 01 Feb 2005 Posts: 1392 Location: Kirkland WA
|
| |
Posted: Wed Aug 20, 2008 4:03 am Post subject: |
 |
|
There is a valid point here: real supersampling will give you... something. But the cost of, say, 16x supersampling is pretty enormous.
(On the other hand, I think we really need to go there in the long run rather than expect people to analytically band-limit their pixel shaders.)
But here's the thing. Doom was "rock solid" in one sense, because it was sub-pixel precise. That gave it a solidity that most of its contemporaries lacked. But it was still point-sampled. And it looks like this would be pretty similar.
So why isn't 16x super-sampling enough? Well, let's look at bilinear filtering. If you take just the 1d case, the way people normally think of bilinear filtering is that you're making a sort of piecewise-triangle wave signal, and point sampling it. You define your texture to be this nice C1-continuous function, and point sample it.
However, there's a totally different way to look at bilinear sampling. If you instead consider your texture to be made out of lots of little constant-colored squares--in other words, the continuously-defined reconstruction of your texture has C0 discontinuities at every texel edge--then the process of computing a bilinear filter at any given point is the process of computing an analytic box filtering of a 1x1-texel-sized box positioned in that location, partially overlapping 4 different constant-colored square texels.
Now, that's not going to be an exactly pixel-sized thing, and it's treating the underlying data as weirdly discontinuous, but I actually think this is the right way to best understand why bilinear filtering is so important. (On magnification, though, the 1x1-texel-sized box is nothing like the size of a pixel, and so the interpretation is much more apparent, and I think that's why people don't tend to think of it this way. But magnification is the lame, bad-looking case!)
If you rotate the camera infinitesimally, every pixel on the screen changes value slightly. If you rotate it infinitesimally again, everything changes again. Keep repeating, and eventually the original scene has been shifted over by a pixel (to a first approximation).
If you have 16x subsampling, you don't get this effect at all. As you move the camera so the contents of one pixel migrates over to the adjacent pixel, there are at most only 16 intermediate values the pixel can undergo. That's better than 1, but I doubt it's good enough to look clean.
I'm not sure how many multisample locations Pixar uses for their renderings (which are generally totally aliasing/artifact free). But they use micropolygons that are approximately pixel-sized (not sub-pixel sized!), and gouraud shade the micropolygons to get a similar effect. (On the other hand, the micropolygons have an advantage that they are coherent in object space as things move around, instead of being evaluated at arbitrary locations like pixel shaders are; this aspect of it is closer to a voxel evaluation, since both are object-space.)
Again, if you defined colors at the corners of voxels, and drew each voxel face as a little pair of triangles, I bet you'd get perfectly acceptable visual results (with sufficient multisampling). The problem is that it seems pretty expensive to try to bolt that onto a raycasting engine. |
|
| Back to top |
|
 |
Won
Joined: 21 Sep 2005 Posts: 506 Location: New York
|
| |
Posted: Wed Aug 20, 2008 5:17 am Post subject: |
 |
|
I think I agree with you, Sean, but I don't really follow your argument. So there are a bunch of ways of looking at tent filtering, but they all seem pretty equivalent. I don't see the "aha" from thinking about it in terms of one factoring of box convolutions over another. If anything, talking about gouraud-shaded micropolys or voxels sounds more like pixels sampling the C1 continuous curve rather than box convolution?
Also, I wonder how effective more sophisticated reconstruction filters would be to make supersampling look smoother. ATI is already doing wide, edge-detecting filters for multi-sampling that are supposed to be pretty good.
So, reading through the slides (this time paying attention to the annotations), I'm not sure I believe that even the ID guys are really 100% behind this idea. I mean, they could still decide to render their characters traditionally. And there was that thing about laying down coarse geometry to avoid a bunch of octree traversal. I imagine as soon as you're doing that, you could figure out a way to eliminate all of it, doing some kind of displacement mapping on crack. |
|
| Back to top |
|
 |
Zaphos
Joined: 24 Feb 2007 Posts: 90
|
| |
Posted: Wed Aug 20, 2008 6:02 am Post subject: |
 |
|
Thanks for the explanations, ryg and Sean!
Sean's argument made sense to me ... although now I'm curious to see exactly how noticeable having 16 intermediate values would be.
| Won wrote: |
So, reading through the slides (this time paying attention to the annotations), I'm not sure I believe that even the ID guys are really 100% behind this idea. I mean, they could still decide to render their characters traditionally. And there was that thing about laying down coarse geometry to avoid a bunch of octree traversal. I imagine as soon as you're doing that, you could figure out a way to eliminate all of it, doing some kind of displacement mapping on crack. |
I hadn't even realized there were annotations! Nice.
Just now I also noticed that the final image in the talk was titled "this is better how.jpg," which seems fitting ... |
|
| Back to top |
|
 |
TomF
Joined: 18 Feb 2007 Posts: 107 Location: Seattle
|
| |
Posted: Wed Aug 20, 2008 6:04 am Post subject: |
 |
|
| Quote: | | I'm not sure how many multisample locations Pixar uses for their renderings |
For smooth edges (e.g. foliage rendering), 64xAA (in this case MSAA and SSAA are the same quality) is generally considered "enough". I believe the film guys use 256xAA because the specular/reflective stuff can give you shimmering otherwise. I've never seen anyone ask for more than 256xAA, so that seems to be "enough". That's 256 samples per pixel, generally some sort of "N queens" layout on a 256x256 sub-pixel grid, and usually the filter kernel for the final resolve takes in more than a pixel's-worth of samples (i.e. you do some sort of gaussian or sinc blob filter, not just a box). There are some IHVs claiming you need a 4096x0496 sub-pixel grid - it's hard to tell if that's backed by the evidence, or just being used as a Spinal-Tap-USP.
The interesting question is whether you need to do all your shading at 256xAA or if you can do some of it either at a fixed lower sampling rate or make it adaptive. It's clear that some specular effects need higher, but what about the others? Normal maps are just evil to filter - they're fundamentally wacky to interpolate. Albedo maps are pretty well-behaved - it can be reasonably claimed that even the anisotropic-filtering "hack" we have now is getting good enough. But if you add displacement maps in, they spam positional noise into every texture channel, and a lot of the signal-processing theory gets tossed out the window. Which leaves mipmapping as mere a bandwidth optimizer, NOT as a signal-processing operator.
I chatted to Jon a fair bit about this, and he didn't seriously consider the signal-filtering issues in that slide deck. The demo he showed (which he was pretty clear about - it was just him hacking something together) sparkled a fair bit, especially at the edges, and it had baked-in lighting. I believe all he was interested in was whether it was possible at all - the next stage was to examine the filtering issues once you know it's even worth thinking about. Which it obviously was. |
|
| Back to top |
|
 |
sean
Joined: 01 Feb 2005 Posts: 1392 Location: Kirkland WA
|
| |
Posted: Wed Aug 20, 2008 6:05 am Post subject: |
 |
|
| Won wrote: | | So there are a bunch of ways of looking at tent filtering, but they all seem pretty equivalent. I don't see the "aha" from thinking about it in terms of one factoring of box convolutions over another. If anything, talking about gouraud-shaded micropolys or voxels sounds more like pixels sampling the C1 continuous curve rather than box convolution? |
To me, the box convolution is revealing about why it produces such human-visual-system-pleasing results, and the mathematical equivalence to point sampling C1-piecewise-"linear" function is then revealing about why you can just use an appropriately-band-limited continuous function (like gouraud-shaded micropolys) to produce similar results. So actually we totally agree. (And actually Renderman still generates multiple point samples of those gouraud-shaded micropolys rather than one point sample the way multisampling does, so it does go more for the middle region. Although you can also turn off Renderman gouraud-shading and I can't say for certain how that's set on most Pixar renderings.)
Edit:
Holy cow, with those annotations.
"This is totally great because you can just let your artists do anything and throw it at the engine and it optimizes it automatically without needing any touchup." "Oh, but for this bleedthrough problem? Tell your artists 'don't do that'."
The one thing I'm probably not officially on record about: I don't totally buy into the disk streaming obsession, because I've had too many shitty slow CD drives that were a horror to run off of, and the fact that games are growing faster than disk write speeds doesn't spell out good things for installing-to-hard-drive. Much less downloadables.
That's why I'm much more interested in stuff like procedural-generation of textures, or even recording the artists' "brush strokes" and "replaying" those to synthesize on the fly. Which seems a good fit for megatexture (which demands nice rectangular blocks of texture from you), but not for voxel raycasting. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|