AMBIENT OCCLUSION POINT CLOUDS with deformations

AMBIENT OCCLUSION POINT CLOUD BAKING

1. Attach ptc_write shader to geometry, put in output name in eg “scene.ptc”
2. set attribute on geometry in 3delight- cull hidden surfaces, cull backfacing surfaces, raster orientated dicing to off
3. set up camera view to encompass the geometry
4. Render settings: Quality – Pixel Samples 1,1 Pixel Filter – Box Filter
, top camera. the quality can be cack cause your outputting the point cloud.
5. Render out .ptc file
6 Open ptc view and have a look at the .ptc file. spin it around like a crazy fool.
5 create bkm ( brickmap) file from ptc on command line put in ptc2brick “C:\scene.ptc” “C:\scene.bkm”
There other commands you can put in to vary quality etc, but that will get you going.
6, Attach bake_occlusion_Pref shader to geometry. Put in scene.bkm into the shader.
7 set bias in shader low to avoid white creases
, set the other setting how you see fit.
8. set attribute on geometry – cull hidden surfaces, cull backfacing surfaces, raster orientated dicing to on
set 3delight geometry attribute Visibilty to diffuse Rays(occlusion) Shader Color & opacity
10 Reset the rendering quality setting to the default or whatever you want.
11 Render

additional

POINT CLOUD BAKING FOR GEOMETRY THAT IS GOING TO DEFORM
1) Select Geometry – Maya Menu – Rendering – Texturing – Create Texture ref object.
2) Add attribute Reference Geometry in 3delight, output Pref, output Nref

3) Follow steps 2-10 above

shader (modified following instructions by mkesson, check out the 2 previous entry)

surface
bake_occlusion_Pref
(
string bake_file = “”;
float maxtDist = 1;
float samples = 64;
float bias = 0.05;
varying point Pref=(0,0,0);
)
{
extern point Pref;
extern normal N;
normal Nn = normalize(N);
color ao = occlusion ( Pref, Nn, samples, “maxdist”, maxtDist, “bias”, bias );
ao = 1 – ao;
bake ( bake_file, s, t, ao );
Ci = ao;
Oi = 1;
}

3 comments for “AMBIENT OCCLUSION POINT CLOUDS with deformations

  1. Sachin Shrestha
    December 18, 2008 at 7:39 pm

    Could this be a method to use baked occlusion for fur on animated characters based on a pixar presentation where they “baked” fur occlusion at different lengths along the fur strands and reused it later throughout their show?

  2. luke
    December 22, 2008 at 11:57 am

    I’ve not done any work with fur yet – so i dont know.You use curves for the fur right? so maybe if you use a curve as the reference geometry it should work. Give it a go! and email back to the blog on how you get on. If you want to write something about the Pixar pres, I’m sure everybody would like to see that.

  3. Sam
    February 9, 2012 at 4:47 pm

    Hi,
    I tried out this method. I wasn’t able to compile the shader for 3delight it gives me an error in Line15
    ao = 1 – ao;

Leave a Reply

Your email address will not be published. Required fields are marked *