Jump to content

pcwrite


Korhon

Recommended Posts

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!

Link to comment
Share on other sites

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;
}

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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 by Korhon
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...