Jump to content

  • Log In with Google      Sign In   
  • Create Account

Reitano

Member Since 19 Jun 2007
Offline Last Active Yesterday, 08:21 AM

Posts I've Made

In Topic: Projected Grid Ocean undersampling

27 June 2014 - 04:58 AM

Think of the displacement map as a 2D signal that's sampled by the projected grid. All sampling techniques, projected grid included, have to take into account aliasing. In order to fight it, follow these steps:

- Build, either at runtime or offline, a full mipmap chain of the displacement map. Experiment with different downsampling filters, like box filters, simple point filters (which can be OK for displacement maps) or more advanced ones.
-In the shader, calculate the derivatives of the displacement map texture coordinates with respect to the projected grid x,y coordinates. You have some options here: forward differencing, ddx and ddy (not applicable in my vertex shaders) or analitically. I'd suggest the last option. Please ask me for formulas if you get stuck.
-Fetch the displacement map by passing the derivatives (tex2Dgrad in DirectX).
-For procedural waves (sin, cos etc), exploit the derivatives to filter them out analitically.

You might want to add a parameter (in the [0,1] range) that multiplies the derivatives in order to let artists control the tradeoff aliasing vs detail in the scene.
Also, as described in the original projected grid paper, the projective camera does not necessarily match the main camera. By changing some of its parameters you can bias the sampling and, for example, add more detail in the distance.
Last, wobbling is inevitable if the projected grid is too coarse. What is the resolution of the screen and the projected grid in your application ? I suggest a ratio of less than 4 before the two.
 


In Topic: 3rd Party DLLs / 32bit64bit / Directories / Loading

17 June 2014 - 04:06 AM

I had the same issue recently. My solution: have batch files that copy all DLLs from a platform-specific subfolder to the executable folder (silently overwriting existing files). For example:

 

xcopy /Y bin/x64/*.dll bin/

 

In your case you'd have one for the 32 bit DLLs and one for the 64 bit DLLs. Run the batch file corresponding to the version you're testing either manually or automatically as a post-build event in Visual Studio.


In Topic: Screenshot of your biggest success/ tech demo

14 June 2014 - 06:58 AM

Here are some screenshots from a demo of my Typhoon engine:

 

Attached File  Main 2014-06-14 13-38-44-67.jpg   93.63KB   4 downloadsAttached File  Main 2014-06-14 13-38-51-94.jpg   27.74KB   2 downloadsAttached File  Main 2014-06-14 13-39-00-81.jpg   60.83KB   4 downloadsAttached File  Main 2014-06-14 13-39-10-70.jpg   90.41KB   3 downloadsAttached File  Main 2014-06-14 13-39-43-44.jpg   127.32KB   4 downloadsAttached File  Main 2014-06-14 13-40-21-16.jpg   34.27KB   4 downloadsAttached File  Main 2014-06-14 13-41-44-98.jpg   23.72KB   4 downloads


In Topic: cosine term in rendering equation

10 June 2014 - 09:52 AM

Hi,

 

This paper addresses the problem of dark reflections at grazing angles for metals and suggests an improved BRDF to fix it:

 

http://sirkan.iit.bme.hu/~szirmay/brdf6.pdf

 

The correction term mentioned in that paper allows the simulation of ideal mirrors and in general boosts the specular reflections of all metallic surfaces. It is trivial to add it to your pipeline (either to shaders or pre-convolved cubemaps) so give it a try!


In Topic: Generating mipmaps in DirectX 11

14 March 2014 - 05:32 AM

Related to mipmapping, are there standard rules for rounding the width and height of the mipmap levels of non-power-of-2 textures ? I could not find any information in the DirectX documentation on that and no relevant API method either (only a GetDesc for the texture, not the sub surfaces). In my engine I manually lock and fill the mip levels of some textures but I don't feel too confident about the assumptions I've made regarding the dimension of the locked surfaces.

Thanks.


PARTNERS