Jump to content

PCPack : subsurface, ambient occlusion, etc


Recommended Posts

  • 3 weeks later...
  • 3 weeks later...
where can i find the pcopen() and other new function usage?

i search the help contents, but find nothing about pcopen() , pcimport(), pcexport(), pcfarthest(), pciterate(), pcunshaded() and pcfilter() functions.

13947[/snapback]

Right here:

$HFS/houdini/vex/html/functions.html#pcloud

Link to comment
Share on other sites

// Obviously, the log(0.5) could be a parameter.  This determines how much
    // we inset the sample point from the surface.
    inset = -log(0.5)/extinct * 5;
    inset = 0;

    // Inset our point to 0.5 from the surface
    pp = p - normalize(n)*inset;
    pinset = pp;

Is this a bug in the code? Inset is set, then set back to zero... :huh:

Link to comment
Share on other sites

Is this a bug in the code? Inset is set, then set back to zero...  :huh:

13953[/snapback]

Hi Simon,

Not a bug... just left-over debris... ;)

The way I read it is that, at some point in the evolution of that shader, Mark started implementing the di-pole evaluation. He later dropped it in favour of a straight exponential decay. The code is fine as it is, in that "tolerance" is still being used (when calculating the radius of integration -- that "log()" bit is the inverse of the "exp()" extinction). But "inset" no longer plays a role in the calculation... I also notice he's added a lot of really nice comments, compared to the version I first saw :)

Anyway; I don't see anything functionally wrong -- "inset" is just a bit of a useless appendage, that's all (and, by extension, so is "pinset").

Cheers!

Link to comment
Share on other sites

Ah thought it might be something like that, but I was also wondering whether he meant to remove the the inset =0; after testing and just forgot. Or maybe that you could reinstate the log function to get more accurate although slower results. Thanks for the explaination.

On a slightly different note how do you cope with using displacement shaders and point cloud SS? I'm finding that it messes up the solution because the correct point cloud points aren't found. So I thought about making the displacement shader into a sop and applying that to the point cloud, is that the best way to go? Or can you export something from the displacement shader straight to the SS shader to fix it?

Link to comment
Share on other sites

Hi Simon,

Ah thought it might be something like that, but I was also wondering whether he meant to remove the the inset =0; after testing and just forgot. Or maybe that you could reinstate the log function to get more accurate although slower results. Thanks for the explaination.

Nah... I'd say your first guess is correct: he meant to take it out but forgot.

On a slightly different note how do you cope with using displacement shaders and point cloud SS? I'm finding that it messes up the solution because the correct point cloud points aren't found. So I thought about making the displacement shader into a sop and applying that to the point cloud, is that the best way to go? Or can you export something from the displacement shader straight to the SS shader to fix it?

13970[/snapback]

Yup. I think what you're doing is the only way to go: you have to displace the cloud in the same (*exactly* the same) manner that you displace the surface... just be careful with spaces! -- all pointcloud attributes/calculations are implicitly in *object* space, so watch out for that. But yes: buid a SOP vopnet that displaces the cloud using the same algo as the surface displacement vopnet, and tie one set of parameters to the other.

Which takes you directly to the question about motion blur... here you'll have to do the old trick of blending between file reads.

Cheers!

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...
  • 2 months later...

yeah i would also like to see this shader in action as i have not been able to get any decent results. I used a point cloud and tried to get some sort of scattering using really contrasting colours but one one colour comes through.

I dont know what is the weight value to tweak and im pretty much getting nowhere, do i have to use certain lights etc.

PLus how do i plug in a custom colour or diffuse map, is that something i will have to do with a seperate shader or do i have to find a way of exporting a vop texture etc.

Need some help with this one and the other sssfull5.

cheers.

-andy

Link to comment
Share on other sites

  • 6 months later...
yeah i would also like to see this shader in action as i have not been able to get any decent results. I used a point cloud and tried to get some sort of scattering using really contrasting colours but one one colour comes through.

I dont know what is the weight value to tweak and im pretty much getting nowhere, do i have to use certain lights etc.

PLus how do i plug in a custom colour or diffuse map, is that something i will have to do with a seperate shader or do i have to find a way of exporting a vop texture etc.

Need some help with this one and the other sssfull5.

cheers.

-andy

I am not sure whether you still need the answer -

I had some problems installing and using pcplastic and sfsss otls. Pcocclusion worked fine though. What needed to do is to recompilete shaders (actually create new shaders, copy the code and compile the stuff). This way all worked all right. Also pay attention to the necessary attributes that shaders expect work. (e.g. sfsss and pcocclusion need point normals along with point clouds, pcplastic and sfsss can also read Cd attribut from the pointcloud).

bbb

P.S. btw, Mario, finally I got some time to play with your shaders - such a cool work in so few lines of code (the pcocclusion really impressed me). SSS is also certainly cool, though I didn't dig the code much, but I read your PClouds presentation files. Great job! thanks.

Link to comment
Share on other sites

P.S. btw, Mario, finally I got some time to play with your shaders - such a cool work in so few lines of code (the pcocclusion really impressed me). SSS is also certainly cool, though I didn't dig the code much, but I read your PClouds presentation files. Great job! thanks.

Well... I'll gladly take the compliment for the SSS presentation files, and thank you! :)

But the shaders in this thread (the ones in "pcpack.tar.gz") were written by Mark Elendt as a quick demo of the kinds of things that can be done with point clouds. He wrote them almost immediately after point clouds became available -- or maybe even during development as a way to test possible applications... see, Mark wrote those pointcloud tools... as well as all of VEX... as well as a little something called "Mantra" (though Mantra's development is currently shared with Andrew Clinton -- both of whom are busy writing some mind-numbing stuff for H9's Mantra.... "shhhh!, do not disturb!").

Both Mark and Andrew visit here pretty frequently -- though Mark's handle is... a big mystery :ph34r:

Cheers!

Link to comment
Share on other sites

Well... I'll gladly take the compliment for the SSS presentation files, and thank you! :)

But the shaders in this thread (the ones in "pcpack.tar.gz") were written by Mark Elendt

Cheers!

:o

Douh! How stooopid of me!

Believe it or not for like a year, or even more - I had a strong impression that it was Mario who produced the shaders (maybe this was a psychic assimilation caused by the fact of PCPack presentation and Mario's SSS shader).

Mark, I really really sorry and wish to pay you tribute, that you certainly deserve!

As an excuse I can say that some praise (even if mistaken) can't harm. :D

Ok, ok. I shut up.

Link to comment
Share on other sites

  • 1 year later...

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