Kristen Eggleston
  • Demo Reel

Point Based Occlusion

6/20/2013

0 Comments

 
Picture
I'm trying to make point based occlusion by passing in occlusion to the point cloud as a variable and then filtering it out to use later. The point cloud gets created but when I use the VEX notation of
$success = pcwrite($file, "occ", $occlusion, "P", P, "N: Vector", N);
The point cloud gets twisted and inverted and lovely like the image to the left. This happens even when the code is simple like:
$success = pcwrite($file, "P", P, "N: Vector", N);
as it is in the actual pcwrite node. I found a pcwrite node that someone else made here, but the code is the same, just containing five elements. I may end up just using that until I can figure out why mine doesn't work.


Apparently the points need to be forced into world space. I must not've had the nodes hooked up correctly but the code
$success = pcwrite($file, "P", ptransform("space:world", P), "N: Vector", N);
works just fine.
0 Comments



Leave a Reply.

    Author

    Compilations and contemplations of my time as a Side Effects intern.

    Archives

    August 2013
    July 2013
    June 2013

    Categories

    All
    Discoveries
    Fun Renders
    It Totally Works
    New Feature
    Personal
    Problems
    Uber Shader

Proudly powered by Weebly