Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

dpadam450

Member Since 18 Nov 2005
Offline Last Active May 19 2013 08:02 PM
***--

Topics I've Started

Baking Occlusion Maps

12 May 2013 - 02:34 PM

I'm working on baking Ambient Occlusion for my static objects. I have them unwrapped to a light map texture with no shared overlapping UV's.

For each of those pixels I compute the occlusion only, no shadows, light color, emission. Just occlusion. And this includes self-occlusion as well as occlusion from any other objects in the scene.

I'm wondering what peoples techniques are and how fast they are. My current technique can generate a 512x512 occlusion map in 2.9 mins. I'm still working to speed this up and think I may potentially be able to get this to about 1 minute. 512 is relatively high resolution I would think for an occlusion map for an object since it will just get blurred, in my opinion. The results are fine in terms of texture quality, I just want to know how fast other algorithms are because I have to bake a ton of objects and want to know if I should maybe go to a CPU ray caster. Anyone else have specs that they have or can run on baking a 512 size texture?

Current algorithm on GPU:
Render objects world position and world normals into the ambient occlusion texture.
Read the normals and positions to the CPU.
For each pixel in the occlusion texture that has a normal (IE a triangle mapped to it and wrote a normal)
--->Set a camera in the world at position from texture

--->Set camera orientation based off of the normal

--->Cull the scene against camera, and render the scene. This is the depth buffer from the pixels point of view on the object.
--->Take all pixels in the depth buffer, compare them to generate an occlusion value for this pixel

I render the depth buffer to a 4x4 texture (so 16 depth samples per pixel). Could do 8x8 but it really doesn't matter after the blur is applied.


Write to FBO vs CopyTexImage

16 April 2013 - 11:33 PM

In a forward rendering approach, these are doing the same exact thing just slightly different and I'm wondering if there would be any difference in the timing. I don't know if writes to fbo vs copying screen if one is slower or faster.



Draw to FBO
Bind FBO as texture and write to screen
Use FBO as a texture for heat/refraction shader drawing particles that refract what is on the screen


Draw to screen

Copy screen to texture

Use texture for heat/refraction shader drawing particles that refract what is on the screen


Car Shader

14 April 2013 - 08:30 PM

I'm working on a car model right now and when I finish I want to get a good shader applied to it. I'm trying to get my head around it.
 

http://www.fotos.org/galeria/data/504/2007-Ford-Mustang-GT-fvl.jpg

 

 

What I can't wrap my head around is: It is not just a multiply (modulate) Because:
CubeMap*Black = Black.

So there are parts that reflect 90-100 percent color reflection (Green tree reflection from a black paint, sky, clouds). But yet it is not a 90-100 percent reflection everywhere because you can see there is black when the reflection would not be black. Same thing if the paint is red.

It appears as if surface normals pointing towards your eye appear to reflect less of a cubemap

 

 

 

http://img2.netcarshow.com/Ford-Mustang_GT_2000_800x600_wallpaper_03.jpg

Now in this image above, You see the horizon/tree line reflection in the bumper have no real color. There are some trees reflected in the back by the gas tank area and again they reflect no color.


Best Ray Tracing algorithms

05 April 2013 - 03:24 PM

Looking for opinions. I'm generating these structures for collision models to be used for bullet collision as well as to be used to bake global illumination light maps. Suggestions?


New GFX card with GL 2.0

16 March 2013 - 05:14 PM

Is this officially dead? I installed an HD7870 from using an GTS 450.  The GTS 450 was working, the HD7870 is not for my code.

I'm using GLEW and now I'm crashing on every openGL call. GLEW also comes with glewinfo.exe, that ouputs a file listing all extension support, it states that ALL extensions are missing (glGenBuffers, glUseProgram .....everything).

I'm going to put my other card back in to make sure this is the problem. Anyone know whats going on? Old card is GL 3.2, this one is 4.2.  Deprecated? Is the backwards compatability official gone?


PARTNERS