triangle meshes OK, but still slow

November 15th, 2005 by Bramz

I’ve managed to get the triangle mesh rendering correct now … But it is waaaaay to slow … Currently there’s an AABB tree in there for spatial subdivision, but apparently, that’s not a good choice. I’m trying to clean up the triangle mesh’s source code a bit so I can commit it to the CVS. There are also changes in LASS to make this work, so that will have to be updated as well …

LiAR rendering a triangle mesh ...

There will also be a new folder src/tools which will contain python scripts for file importers and stuff like that … Currently, there’s one: wavefront_obj.py to import wavefront OBJ files (this is of course entirely unrelated to the fact that the first model rendered by LiAR was a OBJ file ;) )

On a sidenote: I’m working to get Depth of Field in LiAR … shouldn’t be much of a problem, stay tuned to see the results!

3 Responses to “triangle meshes OK, but still slow”

  1. bramz Says:

    Well, yeah, I was more worried about getting it rendered correctly :) here’s the big one: http://users.skynet.be/bdegreve/wavefront_obj_big.jpg
    You can clearly see the compression artifacts on the car texture ;) There’s still some minor problems (see the right outline of the car). This render took more than 4 hours to render! (10562 triangles, 2000×1500 pixels, 9 samples per pixel, 3 point lights and reflecting floor). Fortunately, since this post I’ve been able to cut it down to a more sane 39 minutes. But I feel it must be able to get even faster.

  2. tomz Says:

    Looking good Bram! A minor comment on the scene: it’s too bad the rear wing disappears in the black background, but besides that: good work!

    I think it’s time I’ll check the code out myself ;) Any ideas about the render time for that image?

  3. thomas Says:

    yikes, 4 hours to 40 minutes! that must have been a nasty bug :D reminds me when i first coded kd-tree traversal, and didn’t stop on far-clips! (where t_intersect >= t_far)

    about jpegs for textures: yuck! ;) imo well-antialiased flat shaded triangles look very nice…