Sunday, October 18, 2009

Tangent Basis as a Quaternion

Have not done perf testing on this much yet, but if you want to save some memory and bandwidth at the cost of a bit of maths try packing your normal+tangent basis into a quaternion instead. It might be a good option vs 8-bit normals. Can even compress the quat into 3 components too if you assume dot(q,q)=1 by negating the quaternion if w is negative which should work fine if its normalized. I suspect this could be a win for static geometry.

Thursday, October 08, 2009

Color Coding Makefile Output

Quick useful tidbit... color coding makefile output...








You can then echo out $(OK_STRING), $(ERROR_STRING) or $(WARN_STRING) depending on if errors were encountered. Errors are Red, Warnings are Yellow, Success is Green. If you want to know what the goofy strings like "\x1b[32;01m" actually mean, well it really should be obvious, duh! But in case you can't decode that enigma of a color coding scheme you can read about it here.

The only tricky bit then is just conditionally echoing the right string. Personaly I found the easiest way is to use temporary files to determine if the build was a success or had errors/warnings . But maybe there is a cleaner solution that doesn't require temp files?

@$(ECHO) -n compiling debug foo.cpp...

@$(CXX) $(CFLAGS) -c foo.cpp -o $@ 2> temp.log || touch temp.errors

@if test -e temp.errors; then $(ECHO) "$(ERROR_STRING)" && $(CAT) temp.log; elif test -s temp.log; then $(ECHO) "$(WARN_STRING)" && $(CAT) temp.log; else $(ECHO) "$(OK_STRING)"; fi;

@$(RM) -f temp.errors temp.log

For those that don't like writing makefiles explicitly, XPJ currently supports this color coding mechanism and leaves the OK/ERROR/WARN strings defined in the user specified platform file so you can alter the colors or disable them entirely.

Friday, October 02, 2009

Eye Candy: GTC Demos

Here are some videos of the tech demos used during the GPU Technology Conference Keynote this year which were all simulated and rendered live in real-time. Our goal was to take the bits of tech we were each working on and produce a small demo of it to give the audience a taste. All the demos were presented in 3D Stereo and looked amazing. So, in order of appearance...

- Sarah Tariq made a pretty kick ass demo showing off the turbulence (sorry for the really poor video, a better one will be posted soon I am sure).