I'm Jon Olick. I make shiny things. I simplify.


I presented Sparse Voxel Octrees at Siggraph 2008.

Monday, February 28, 2011

Designers should Learn to Code, Even if Poorly

2,500 years ago, a Greek writer told us something about creating software: Thucydides wrote, "The society that separates its scholars from its warriors will have its thinking done by cowards and its fighting done by fools."

The same is true for companies that separate their designers from their engineers. The most important trait a team can have is empathy. Without it, the engineers will not care, and the designers will not be realistic. When companies complain of specs and code being "thrown out the window", a lack of empathy is to blame.

The best way to create empathy as a designer is to make a prototype. It meets the rest of the team half-way and gives you a sense of what's hard and what's easy to implement. Having thought through the edge-cases and being able to speak an engineer's language gives you street cred. You don't need to be a great coder, but you should at least be able to get your idea across in a scripting language.

To design is to inspire participation. To do that you need to be respected. For that you need to be a designer-coder.

Friday, February 4, 2011

High Resolution Textures -- The Field Guide

The options:

Static Texturing
No dynamic loading. Just use higher resolution static textures. Standard stuff.
- VRAM limited

Dynamic Texturing
Dynamically load mips (Unreal 3 style).
+ Allows for much higher resolution
- Still ultimately resolution limited.
- Sometimes implemented with a feedback pass to a low resolution buffer.

Virtual Texturing
Dynamically load parts of textures.
+ Use as high of resolution textures as your heart desires.
+ Static memory footprint
- Sampling the virtual texture is slightly slower than Static or Dynamic texturing.
- Bi-linear filtering. (Tri-linear is possible, but requires more work.)
- Requires an extra rendering pass with most implementations (for the feedback of what pages to load)
- Problems with transparent materials. *****
- Popping mips when the disk streaming doesn't keep up very well with the game. *

Unique Virtual Texturing (AKA Mega Textures)
For each mesh in the world, allocate a portion of virtual texture space for that mesh and then bake in any lighting and diffuse information.
+ Use as high of a resolution texture as your heart desires.
+ Static memory footprint
+ Infinitely complex lighting algorithms.
+ Can bake in decals to allow an infinite number of them. ****
- Bi-linear filtering. (Tri-linear is possible, but requires more work.)
- Requires an extra rendering pass with most implementations (for the feedback of what pages to load)
- Iteration time is very slow
- Popping mips when the disk streaming doesn't keep up very well with the game. *
- Lighting is mostly static. **
- Requires massive disk space. ***
- Some games may have a world that is too big for UVTs -- exceeding floating point precision.
- Problems with transparent materials. *****

* The popping can be mitigated through "blending" of tiles as they load. However this requires using RGBA uncompressed textures for your physical tiles -- making texture reads slower and increasing memory requirements.

** I toyed around with animating virtual textures, so that you could have looping or one off lighting animations. Is a lot of extra space, and streamer had a hard time keeping up with the animation. Not impossible to pull off though, so something to keep in mind.

*** The disk space is typically reduced by both compression, and not storing the higher mips for areas that are never seen in game. If you happen to predict incorrectly, they just see a blurry texture.

**** Watch out for problems with changing the meshes after the baking process. Causes headaches.

***** VT typically uses a feedback rendering pass to a low resolution buffer to tell what to load and what not to load. This is typically rendered opaquely. The common work around is to render transparent materials using Standard or Dynamic texturing.

Where is the sweet spot?

Standard texturing is the easiest to implement.

Unique virtual texturing offers the best results.

But -- Virtual Texturing takes the prize.

Huh?
While Unique Virtual Texturing is great, it doesn't work for every game (your world size may be so large that it is unrealistic or you require a day-night cycle), and the bake times for lighting and texturing can be horrendous -- making fast iteration very hard.


Living Blog Post
I'll be updating this blog post from time to time as reference for myself and others. If you would like to see something added or corrected, send me a message or post in the comments.

-- Kind of wish this was a wiki or something. --