Jump to content


Member Since 19 Oct 2006
Offline Last Active Jul 13 2013 11:53 AM

Posts I've Made

In Topic: opinions on buffer usage/draw calls for a scrolling album art program

09 July 2013 - 09:22 AM

Oh, no worries! Too many api's and combinations of extensions to keep track of :)

In Topic: opinions on buffer usage/draw calls for a scrolling album art program

08 July 2013 - 10:53 AM

Thanks for the responses everyone.



Yeah, I think over-optimization is to blame here, I hate it when that happens.  A draw call for each album seems like the way to go


@Norman Barrows:

Thanks for the tip about sprites, I had forgotten about those. So it sound sounds like you're also saying to use a draw call per album, but using point sprites instead of quads?



PBO's sound interesting, but unfortunately they don't seem to be supported in GLES 2 that I'm targeting. I wish they were though, sounds like that would be the best way to update the textures

In Topic: DirectX SDK PRT tools, light probes

03 April 2012 - 04:15 PM

SH = (roughly/sometimes) Light probes = environment maps = cube maps
- Storage
- Maps a direction to a color (or any value)
- Light probes can mean SH, which is an approximation and can store blurry stuff. It cannot store sharp (high frequency) details.
- Light probes can also mean environment maps / cube maps. They can handle sharp details.

PRT = Precomputed Global Illumination
- Method
- Need to read paper...
- Can store its results in some format... (paper mentions SH)

Irradiance map = filtered map of incoming radiance.
- http://codeflow.org/...map/#irradiance
- Time saver.
- For diffuse stuff in image based lighting, you usually sum incoming light for a given direction, with each light 'beam' weighted by its angle. That's your irradiance.
- The summation is expensive, so we precompute a direction -> irradiance map.
- Usually looks like a blurred light probe.
- Stored in environment map, SH, etc...

Also I feel like that unless you're reading a paper, the terms 'SH', 'light probe', 'environment map', 'irradiance map' usually are used interchangeably.

Thanks for the information, I'm beginning to get a better grasp of the terminology. It sounds like I probably just need SH for now, and I'll use standard shadow mapping for my characters on top of that.

Spherical harmonics refers solely to the math/concepts behind storage, PRT is just the idea of calculating how light bounces around ahead of time. Technically speaking, boring old Quake 2 lightmaps are just as much PRT as are the fancypants spherical harmonics stuff that's in vogue today.

Thank you, that clears up a lot for me. So, to summarize, it sounds like to get the basic ambient indirect lighting I just need to do the steps by MJP. Just to make sure I'm understanding things now, it seems like both Unity and UDK are doing this, i.e. see this link http://udn.epicgames....html#Character lighting

there it looks like they are just doing an irradiance map as well? The DirectX SDK has an Irradiance volume sample from ATI that looks similar.

In Topic: DirectX SDK PRT tools, light probes

03 April 2012 - 12:39 AM

They're not using PRT in Unity, nor is PRT particularly popular for light probes in general.

If you're just starting out with light probes, then you can implement them like this:

1. Pick your probe locations throughout the scene. Easiest way is a 3D grid.
2. For each probe location render an cubemap by rendering in all 6 directions
3. Convert the cubemap to SH (you can use the D3DX utility functions for this if you'd like, but it's not too hard to do on your own)

Then at runtime you just lookup and interpolate the probes, and look up the irradiance in the direction of the normal by performing an SH dot product (just make sure that you include the cosine kernel). This will give you indirect lighting, and you can add in direct lighting on top of this.

Thanks so much for the reply. As I suspected, I must be confusing PRT with SH in general. So are light probes with SH like in Unity known as an "irradiance map"? (sorry I'm trying to wrap my head around the terminology). If this is the case, then as far as I can tell the main difference between PRT and an irrandiance map is PRT computes self shadowing whereas an irradiance map does not? Thanks for any clarifications.

Basically, I'm just try to set my game up such that I can have nice indirect lighting mixed with lightmaps and direct lighting. It seems like light probes are how the commercial engines do it (UDK, Source, Unity, etc.)

In Topic: SIMD neighbor search for particles?

20 January 2012 - 10:38 PM

Thanks for the info, I could use placement new to get contiguous memory for particles in the same uniform grid cell as the particle I'm testing, but getting the particles from the surrounding neighbor cells is where I'm stumped. I'm not even sure if this is possible, but I'm hoping