Clap your hands say yeah right

Archive for July, 2006

Dual photography (quite brilliant)

Clever guys at Stanford are able to see around corners with dual photography.
See this film (60MB) and wait for the card-trick in the end. http://graphics.stanford.edu/papers/dual_photography/DualPhotography.mp4

Rather cool.

No comments

Verso anisotropic

I was fed-up following my initial roadmap and was looking for something quick to implement. I decided to go for Ashikhmin-Shirley anisotropic shading model which seemed easy enough and would give me a high visual impact.

I was wrong. In both aspects.

First of all it took more time to get it right than I expected. The reason for this was a bug in another part of the code. When a ray intersects a primitive I store some needed information about the actual intersection. For instance I need a local coordinate system (an ON-base) around the intersection point. To find this ON-base I let the surface normal be the w-base and two orthogonal surface-tangential vectors be the u- and v-bases. Unfortunately initially I had got this thing slightly wrong why the shading-routine got an “ON-base” that hadn’t orthogonal bases. Since it is anisotropic it needs a correct set of tangential-vectors.

Secondly, it didn’t look as good as I hoped. Well no. Probably due to the fact that I am still in ray-tracing-land which give me no global-illumination-contribution. Must take the step into path-tracing land … and I better make it soon or I’ll probably get fed up with the whole verso-thing.

And speaking of that (not looking good) … I made a minor hack to at least get some soft shadows. I took the 3 point-lights available in the scene and split each into some hundred new point-lighs all with only a fraction of the power of the original one. Then I distributed this cloud of “micro-lights” randomly in a sphere around the point where the original point-light had been (like creating a homogenous bulb almost). The result of this hack came out pretty good although this is not the way to do it in the long run. A few lines of code.

[ftf w="470" h="270" def="js.xml"]
private void distributeLights() {
distributedLights = new ArrayList ();
int SAMPLES = 750;
double RADIUS = 2500;

for (Light light : lights) {
Point pos = light.getPosition();
Color dColor = light.getColor().scale(1.0 / SAMPLES);
for (int i = 0; i < SAMPLES; i++) {
// Generating random spherical offset.
Vec offset = new Vec(Math.random(), Math.random(), Math.random());
offset = offset.normalize().scale(Math.sqrt(Math.random()) * RADIUS);

// Offset microlight in this direction
Light microLight = new OmniPointLight(pos.translate(offset), dColor);
distributedLights.add(microLight);
}
}
}
[/ftf]

By the way. I use a rescaled version of Schlicks estimate for the freshnel-coefficent: http://www.iit.bme.hu/~szirmay/fresnel.pdf

No comments

Verso, step 3 (Bulldog fields forever)


Did some final fixes:

  • Made instancing work properly. Now the bounding boxes from the object-local-coordinate system is transformed into world-coordinates and expanded to be axis-aligned … as it of course should have been all the time.
  • Added the acceleration structure (HBV) on a more global level as well. Now all objects are globally spatially ordered (as a big rather low-resolution HBV) and at a lower level each mesh is subdivided in a mesh tight HBV.
  • Made it optional to declare that an instance or primitive in the scene should not be part of the HBV.
  • Added very rudimentary per-instance material (still only naïve phong … but in different colors … wohoo!).
  • Cleaned up code. Separated geometry from shading.

Of course I had to test the new features by instancing 196 bulldogs (click thumbnail to see more dogs) in different colors and with different local-to-world transformation matrices. Sort of a bulldog-vector-field. The rendering time for the 800×800 at 12 samples per pixel with 2 shadow-feeler-rays per intersection of this scene containing 3.000.000 triangles took 986 seconds.

(To add some relevance to the figures: All renderings are done on a 3½ year old Dell latitude laptop. Pure 1.5 J2SE java.)

1 comment

I will probably never be able to make the switch

The switch from Windows to Mac OS X that is. I have been thinking about doing just that for a while. But now I hesitate.

Here is the reason for my sudden hesitation:
http://beust.com/weblog/archives/000394.html
http://beust.com/weblog/archives/000398.html

I can’t stand bad usability and slow inconsistent UI:s. I will however be following Cedrics coming posts (to see whether things get better after the initial getting-used-to-something-new-period) on this issue. I realize that this is probably the very same road I will have to walk down if I eventually make the switch.

1 comment

Sthlm jazz(/pop?) festival

I (and some friends) went on the popiest day of the Stockholm jazz festival this year with artists as Petter, Lisa M, Eva D, Bo Kaspers O, Moneybro. Had a rather good time but I realized that the jazz festival is in trouble.

  • The event is marketed as a jazz festival which will scare the average pop Joe far away from Skeppsholmen.
  • The fact that they do invite equal amount of pop-acts as they do jazz dittos probably irritate the hardcore jazzers.
  • Most pop artists invited are typical medium-sized-club-artists (read: indoor) that does not really make Skeppsholmen stage and audience “jump around”.
  • The biggest jazz names are too expensive for a festival of this size (I read in SvD). And the ticket prices are already quite high.
  • Sponsors are hard to find for a festival that might be considered kind of narrow (”jazz” according to the name of the festival).

It should not come as a surprise that the jazz festival has red figures year after year.

Quite sad. It is still one of the nicest events during summertime in Stockholm. My son (on the picture) was enjoying it from inside peltor-ear-protectors and a fleece-jumpsuit.

No comments

Next Page »