About anoop a k

Artist, Programmer, Technology Enthusiast. Technical Director @ Dreamworks Animation

3D Rendering on Raspberry Pi using Aqsis renderer


The first thing I do once I buy a new computer is to put it to test to see how it performs when it comes to rendering complex 3d scene. Being a technical artist, its our job to innovate the most efficient workflow to get the best out of the available resources. So what If a 3d rendering task is thrown at the Raspberry Pi?

I decided to go with Aqsis, a 3D rendering solution adhering to RenderMan standard. Why Aqsis? Because its Open Source. So its just a matter of few hours to get Aqsis built for your distro running on Raspberry Pi (Raspbian in my case). It took approximately 4 hours for me to build Aqsis from source, including the time taken to build libTiff, one of the package dependencies for Aqsis. The rest of the dependent packages were readily available for Raspbian and it took only a few minutes to get all of them installed.

I used one of  the example scenes that comes with Aqsis installation to test the same. Cranked up the resolution of the output image to 1920×1080 with the pixel samples set to the default value of 4×4. From the logs, it showed that it took less than 3 hours to render the frame including the time taken for shadow map generation at 512×512 resolution. Shown below is the rendered image converted to PNG (from native TIF format)

The logs below shows the detailed report of CPU time spent. I don’t intend to do any benchmarking against a workstation grade CPU which could render the same image in less than a minute, but I would like to emphasize the fact that this tiny computer has got enough horse power under the hood to carry out any task you may throw at it without failure. I will be carrying out further tests using complex scenes that I can get hold of. So stay tuned!


----------------------------------------------------------------
Timings at 02:40:56 07/30/12
----------------------------------------------------------------
Surface shading took 2971.50 seconds (called 17,852 times)
Render MPGs took 2789.23 seconds (called 49,139 times)
Filter samples took 1636.11 seconds (called 4,088 times)
Frame took 826.11 seconds (called 3 times)
Bust grids took 712.46 seconds (called 35,704 times)
Prepare bucket took 471.13 seconds (called 4,088 times)
Display bucket took 425.60 seconds (called 4,088 times)
Displacement shading took 133.93 seconds (called 3,385 times)
Dicing took 119.49 seconds (called 17,852 times)
Occlusion culling initialisation took 118.80 seconds (called 4,088 times)
Project points took 87.87 seconds (called 17,852 times)
Combine samples took 73.99 seconds (called 4,088 times)
Splitting took 44.43 seconds (called 18,823 times)
Post surface took 25.99 seconds (called 37,838 times)
Dicable check took 23.54 seconds (called 36,675 times)
Occlusion culling took 7.14 seconds (called 40,963 times)
Parse took 0.77 seconds (called 3 times)
Make texture took 0.55 seconds (called 2 times)
Transparency culling micropolygons took 400.00 milli secs (called 17,852 times)
Input geometry:
144 primitives created

0 subdivision primitives
0 blobbies
0 NURBS primitives
0 polygons
0 curves
0 points
37820 patches
0 quadrics

GPrims:
37838 allocated
19015 used (50.253712%), 1072 peak,
558 culled (2.934525%)
4288 occlusion culled (22.550617%)

Geometry:
Curves:
0 created
0 split (0.000000%)
0 (0.000000%) into 0 subcurves
0 (0.000000%) into 0 patches
Procedurals:
0 created
0 split (0.000000%)
0 dynamic load,
0 dynamic read archive,
0 run program

Grids:
0 created, 797 peak,
17852 initialized (0.000000%),
17852 shaded (0.000000%), 0 culled (0.000000%)

Grid count/size (diced grids):
+------+------+------+------+------+------+------+------+
|<=  4 |<=  8 |<= 16 |<= 32 |<= 64 |<=128 |<=256 | >256 |
+------+------+------+------+------+------+------+------+
|     0|     0|     0|    13|   830| 16959|    50|     0|
|  0.0%|  0.0%|  0.0%|  0.1%|  4.6%| 95.0%|  0.3%|  0.0%|
+------+------+------+------+------+------+------+------+

Grid count/size (shaded grids):
+------+------+------+------+------+------+------+------+
|<=  4 |<=  8 |<= 16 |<= 32 |<= 64 |<=128 |<=256 | >256 |
+------+------+------+------+------+------+------+------+
|     0|     0|     0|     1|   211| 15586|  2054|     0|
|  0.0%|  0.0%|  0.0%|  0.0%|  1.2%| 87.3%| 11.5%|  0.0%|
+------+------+------+------+------+------+------+------+

Micropolygons:
3139480 created (0 culled)
104226 peak, 0 trimmed, ( 0 completely ) 500318 missed (15.9%)

MPG Area:    1.0 average
0.0 min
22.2 max

% of sample hits:
+------+------+------+------+------+------+------+------+
|<=12,5|<=  25|<=37,5|<=  50|<=62,5|<= 75 |<=87,5|<= 100|
+------+------+------+------+------+------+------+------+
|  0.0%|  0.0%|  0.0%|  0.0%|  0.0%|  0.0%|  0.0%|  0.0%|
+------+------+------+------+------+------+------+------+

Pushes:    1 MPGs pushed (0.0%)
0 forward (0.0%), 0 down (0.0%),
0 far down (0.0%)

Sampling:
Samples per Pixel: 16 (4 4)
82470787 samples
Hits: 32830146 (39.8%), bound hits: 45888592 (55.6%),
misses: 3752049 (4.5%)

Attributes:
8 created

Parameters:
113989 created, 3421 peak

Textures            : 0 bytes used.
Textures hits       :

The detailed log for the render can be found here

Advertisements

Mummified custom case for Raspberry Pi

Another weekend went by, another productive one, I should say. From the day my Raspberry Pi arrived, I have been thinking about building a custom case for the same. Guess what, this weekend I was successful in building one:). I was lucky enough to get a hard shell case of “kenneth cole reaction” that could  accomodate the Pi, from one of my colleagues at R&H. The next task was to customize the same. I decided to build a theme based case instead of building just another “meet the purpose” case. Went to the hardware shop nearby and was glancing at things that I could possibly make use of, to build one. Came across few stuff and then I decided I am going to build a mummified case for the Pi. Why mummify the Pi? I believe something extraordinary like this need to be preserved for generations to come.

And here I present the mummified case for Raspberry Pi

Below Image show the tools and the raw materials used for building the case

And the mummification itself!