Jump to content

Using a Point Cloud in a Shader?

Recommended Posts

I have been fiddling with making a rust texture that has features that are able to be controlled from a point cloud.  That way I can have a bit more artistic control, while still being entirely procedural.  That is kind of the essence of the assignment I am working on.  Unfortunately I am pretty sure that I am doing something wrong with the point cloud in the VOP network, because It will go ok without an error for a bit, but then it will suddenly start giving me an error that some shader doesn't exist, and the name is something like Ѣæŗ.vfl or some other random ascii code.  I go reoutput my .sc file and it works for a bit, then suddenly breaks again.

Also, I tried to use an op reference to it at one point, and it didn't really like that either.  Any ideas?


Link to comment
Share on other sites

yeah, don't use pcimport unless you're manually looping over your point cloud.  from your shader code, it looks like you're really just using the point cloud to isolate areas so a pcfilter vop instead of the pcimport is what you're looking for.  that will do the loop for you and put out a single filtered(averaged) value based on what it finds in the point cloud.  in this case, the point position coming out will be an average of those points found in your file.

also, you need to transform the incoming search P to whatever space the point cloud is in.  shaders operate in camera space.  depending on how your point cloud was written, it's probably in world space or more likely in some object's space.  you should make sure it's exported in world space (ie, it's in an object that has no rotate/translate/scale).  then transform your shader P to world space (from "current").


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.

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...