Korhon Posted January 2, 2009 Share Posted January 2, 2009 Hello! Im using the "Hip Files From Point Cloud Presentation May 11th 2005" on the exchange and trying to understand how the amient occlution setup works in vops. And im wondering if anyone knows how to use the pcwrite to create a pointcloud file? So i dont need the scatter sop to create the pointcloud. Im guessing i need to use the pc_write when i want to use displacement with pointcloud ambientocclution If anyone could share a example file i would be werry nice! Thanks! Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted January 2, 2009 Share Posted January 2, 2009 Example from Houdini Help: surface dumpsomepoints(string fname = "points.$F4.pc"; int do_cull = 0; float keepamt = 0.05) { vector nn = normalize(frontface(N, I)); int rval=0; float A = area(P,"smooth",0); // area without smoothed derivs if( !do_cull || do_cull & (nrandom()<keepamt) ) { if( do_cull && keepamt > 0 ) { A = A/keepamt; } rval = pcwrite(fname, "interpolate", 1, "P", ptransform("space:camera","space:world", P), "N", ntransform("space:camera","space:world", normalize(N)), "area", A); // output an "area" channel in pc } Cf =abs(nn)*rval; } Quote Link to comment Share on other sites More sharing options...
Korhon Posted January 2, 2009 Author Share Posted January 2, 2009 Thanks for the reply Ive looked at the help example code. But im not that experienced with reading code. So it dont help me that much. Ive managed to make mantra output a pointcloud with the pcwrite now. But when im using it with the pc_occlution it wont create occlution. Just a black image. Got the hip file at work. But im recreating it here at home now. Can post the file when im done. If anyone would have a look Quote Link to comment Share on other sites More sharing options...
Korhon Posted January 5, 2009 Author Share Posted January 5, 2009 (edited) Hi again. Im working om the files from the Point Cloud Presentation May. Ive added a shader that writes a pointcloud. The whole setup works fine, but im getting some strange artifacts in the ambient occlution. Anyone got some tips on how to get rid of these artifacts? Also wondering if its possible to convert the shader to a light shader? Just like the vex_global_illumination shader works Thanks Pointcloud_ao.hip Edited January 5, 2009 by Korhon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.