39

Real-time graphics deploys a variety of approximations to deal with the computational expense of simulating indirect lighting, trading off between runtime performance and lighting fidelity. This is an area of active research, with new techniques appearing every year. Ambient lighting At the very simplest end of the range, you can use ambient lighting: a ...


13

There are two cases I can think of where multiple blurs would be performed in succession on a single image. First, when performing a large-radius blur, it may reduce the total computation if you first downsample the image (which is a blur) and then perform a smaller-radius blur on the downsampled image. For example, downsampling an image by 4x and then ...


10

There is a vast amount of open problems in real-time graphics: shadows, aliasing, reflections, global illumination, transparencies (blending order and lighting) etc. SIGGRAPH annually hosts a course called "Open Problems in Real-Time Rendering", which describes current issues in real-time graphics (mostly game dev industry standpoint). You can find last ...


10

As far as I know, this sort of thing is mainly about shader compilation. One of the main reasons why a game may experience hitches the first time something renders is that the shaders necessary to render it haven't finished compiling yet, and the driver has to finish that work before the frame can proceed. A little bit of background. When you write shaders ...


9

Yes, applying two Gaussian blurs is equivalent to doing one Gaussian blur, but with a slightly different size calculation. Applying a Gaussian blur to an image means doing a convolution of the Gaussian with the image. Convolution is associative: Applying two Gaussian blurs to an image is equivalent to convolving the two Gaussians with each other, and ...


8

There are several techniques used. A simple, but limited, post-process approach that is not really used any more consists in reconstructing the world space position of a pixel using both the view projection matrix from current and previous frame. Using these two values you can compute the velocity at a pixel and blur accordingly, sampling along the ...


8

There are many, many ways to draw things in OpenGL, so this is naturally confusing sometimes. The first method you describe, setting the shader parameters and issuing one draw call per object is usually the most inefficient, due to the high API overhead. The second one, using instanced drawing is a much smarter approach for objects with the same parameters. ...


8

As mentioned in this answer, Physically-Based Rendering isn't a set number of things. It's a concept. It's akin to saying something is 'Environmentally Friendly'. There are many different techniques to be environmentally friendly and someone can implement those techniques to varying degrees. The same is for PBR. In the end, Physically Based Rendering is ...


8

There are lots of ways to fake SSS with greater or lesser fidelity. A few recent-ish methods: Screen-space blurring of object lighting (described in detail here) Using “interior” ambient-occlusion maps generated from a normal-flipped version of the geometry to approximate local thickness, providing an easy way to fake light transmission (more information ...


7

I believe a common solution is to split the camera transform used to project the grid from the camera transform that is used to render the grid. At perspectives close to top-down, the two cameras coincide, but as the viewing camera gets close to a horizontal perspective, the projection camera deviates and tries to keep a minimum inclination, i.e. it hovers ...


7

Sorry for the bad quality of my answer. I do not have access to a computer currently and editing from my phone is not a straightforward task. In particular I would love to be able to paste images. I would say that the main challenges of simulating hair are: replicating their very specific reaction to lighting (as a material) replicating their ...


6

You can be both realistical and real-time. the secret is to change representation each time the information get under the Shannon-Nyquist (i.e. grid) scale: from geometry to normal maps to shading models. This paper is made for you: http://maverick.inria.fr/Publications/2010/BNH10/index.php (see also Yoube videos)


6

According to the Star Swarm developers this helps them with LOD and enables greater shading scaling. Based on this I guess its simply texture space lighting. Because we do what we’re calling object space lighting, we calculate the projected size of each of those objects on screen, and based on that we shade it in a priority manner based on how large they ...


6

Nearest-depth filtering is an alternative to bilaterial filtering that was specifically developed for upsampling low-resolution transparent rendering. It's a bit simpler than bilateral sampling, in that it only requires one sample from your low-resolution texture. However it can still have issues, particularly with high-frequency geometry that isn't well-...


6

I think you may want to take another look at the iOS user interface if you consider real-time blurs to be out of range of mobile hardware: Blurs are totally in range of mobile hardware. Yes, you need a fairly large number of texture samples for a blur with a large kernel, but the texture samples are also cached very well, and you can use a separable blur, ...


6

In order to ensure that the pattern shapes are always either wholly present or absent, never cut off, it's necessary to ensure that the same p value is used for all texels within the shape. In your example of circles, all the texels in a given circle need to agree on p. I assume that you have some way of evaluating p at a given point on the surface (whether ...


6

If your wall geometry is vector graphics you can simply extrude the segment away from the light position. This means 2 triangles per draw call, all the extrusion offsets can can be handled in the vertex shader. Image 1: For each wall generate a shadow volume extrusion. Quick and extremely dirty sample implementation of shadow volumes here: http://...


6

It depends on how a missed frame is handled by the driver. One option is to just wait until the next vsync, causing a hitch of 32 ms and if the application is just at the limit of 16 ms can cause fluctuations. The next option is to queue the frame for display next frame but don't wait on it. This will still cause a visual hitch but the application can then ...


6

Your first quote is referring to "Split-sum approximation" presented in "Real Shading in Unreal Engine 4" by Brian Karis, and also referred in the paper [Kar13]: $$\frac{1}{N}\sum_{k=1}^N \frac{L_i(l_k)f(l_k,v)cos\theta_{l_k}}{p(l_k,v)}\approx \bigg(\frac{1}{N}\sum_{k=1}^N L_i(l_k)\bigg)\bigg(\frac{1}{N}\sum_{k=1}^N \frac{f(l_k,v)cos\theta_{l_k}}{p(l_k,v)}\...


5

Computer Graphics can be divided in multiple subdomains of which I will only talk about physically-based rendering (the one I am the most familiar with and probably the one you are referring to based on the tags of the question). Physically-based rendering (also referred to as global illumination) is generally far from real time at the moment. The speed we ...


5

The short answer is It's Complicated™. :) A lot of factors can affect frame timing (and the associated problem of animation juddering, due to the game's animation delta-times not matching actual frame delivery times). Some of the factors are: how CPU-limited versus GPU-limited the game is, how the game's code measures time, how much variability there is in ...


5

This is the main 'hard' problem remaining in real-time CG, and there is a lot of research ongoing into solving it. The biggest hurdle is that in raster graphics, each component of the scene is rendered 'in a vacuum' - each triangle is rendered without reference to any other triangles in the scene, and the same goes for pixels, as opposed to ray-tracing ...


4

In OpenGL ES there is Instancing which provides allows for rendering one object multiple times. When using Instancing, you can use uniform arrays to provide different information, e.g. a transformation matrix, for each of the particles. In the shader you can then use gl_InstanceID to distinguish between the individual particles and pick the appropriate ...


4

If I understand your question, you are asking how to actually perform said directional blur in code? A Gaussian blur is typically done by sampling your image in all directions around your current point (or if in 2 passes, one vertical and one horizontal which equates to the same thing), with a specific set of weights for the falloff. For a directional blur ...


4

There's no way around it. If you want the area behind the textboxes to appear blurry... you're gonna have to blur it. One way to mitigate the performance cost is to be sure to use a 2-pass separable blur. Another measure that will probably help (depending on how much of the screen your textboxes cover) is to use scissoring or a stencil test to only compute ...


4

I'm not sure if this counts, but you can use fluid dynamics to render large crowds (of birds, people, etc). With SPH (smoothed particle hydrodynamics) to model the "fluid", you aren't really describing the motion of each bird per-se, since you can sample the crowd of birds with a representative set, and then draw birds around your samples. Take a look at ...


4

One way that might work is to have boids but render each boid as a group of birds. This way the simulation is still simple but the rendering makes it seem complex. You might even allow a little drift per bird in the boid to make it look so obviously rigid.


4

Diffuse colours on materials typically come from within the material, while the specular colour is from the very surface. Coloured plastic materials are made by embedding particles of dye inside a colourless medium, so the diffuse colour is the colour of the dye, while the specular colour is white from the colourless surface. With metals, all of the ...


3

Baraff and Witkin propose to incorporate constraints by modifying the linear system by the constraints matrices $\mathbf S_i$. As they state in the beginning of Section 5.2, the resulting system is not symmetric anymore. Therefore, the modified linear system must be computed with a linear solver that can treat non-symmetric systems (as - if I got you ...


3

Some software like Maya, solve this by using a polar (or actually cartesian that turns polar at a distance) much in the same way as you grid centered on the camera position. This setup adds more detail where it counts most Then they rely on the shaders normal processing at further ranges. There is room for improvemenet offcourse. You cold modify this ...


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