Jump to content
BeauFX

How can I use "pcwite" in a pyro shader ?

Recommended Posts

Hey ,

 

I've been trying to use the pcwrite node inside a pyro shader to output a point cloud that will hopefully contain the shading values at render time.

 

Ultimately Im hoping to use this point cloud to bake out a volume light and either use the point cloud or a volume created from it to shade my final renders.

 

Ive got a scene ive tried to get the pcwrite to work with, but ive had no luck.. I've only seen it working with polygon geometry and not yet in a volume. Ive tried combing the forums but haven't had any luck.

Any information or guidance would be great.

 

Cheers!

Edited by garciaone

Share this post


Link to post
Share on other sites

I know this is anything but helpful to your question, but to my knowledge the pcwrite node is exclusively for points so if the problem is your return is 0 (None) then it is prob because of this reason. I am still unclear on what you wish to achieve?

Share this post


Link to post
Share on other sites

Hey ,

 

I've been trying to use the pcwrite node inside a pyro shader to output a point cloud that will hopefully contain the shading values at render time.

 

Ultimately Im hoping to use this point cloud to bake out a volume light and either use the point cloud or a volume created from it to shade my final renders.

 

Ive got a scene ive tried to get the pcwrite to work with, but ive had no luck.. I've only seen it working with polygon geometry and not yet in a volume. Ive tried combing the forums but haven't had any luck.

Any information or guidance would be great.

 

Cheers!

Its fully possible to generate a pointcloud in a volume shader. Just make sure the pcWrite gets executed, it cant be placed in a dead end. I use to force it by connecting it to the condition in a two way switch and then just pass something Im sure will be executed(like cf) in both inputs.

Just keep in mind that it is dependent on your sampling and you are running the risk of generating LOADS of points.

 

If you just want to mimic the volume light point cloud, isnt it just easier to pre-render with that light and then use the generated point cloud from there in your final render?

Depentent on what data you want to bake, you might be able to bake it in SOPs.

Share this post


Link to post
Share on other sites

Its fully possible to generate a pointcloud in a volume shader. Just make sure the pcWrite gets executed, it cant be placed in a dead end. I use to force it by connecting it to the condition in a two way switch and then just pass something Im sure will be executed(like cf) in both inputs.

Just keep in mind that it is dependent on your sampling and you are running the risk of generating LOADS of points.

 

If you just want to mimic the volume light point cloud, isnt it just easier to pre-render with that light and then use the generated point cloud from there in your final render?

Depentent on what data you want to bake, you might be able to bake it in SOPs.

 

Hi Mawi, 

I've tried a ton of a different variations but I haven't had any luck.  I can get it to write out a point cloud when rendering polygon data fine, but i can't seem to get it working with the pyro shader. I've seen it work before with a cloud setup, but I can't work out what's going wrong in my scene.

I've attached an example setup, really basic...  I've tried to implement your two way switch trick.  Is there any chance you could provide an example or have a look at mine? 

Cheers,

Beau

Edited by garciaone

Share this post


Link to post
Share on other sites

Hi Mawi, 

I've tried a ton of a different variations but I haven't had any luck.  I can get it to write out a point cloud when rendering polygon data fine, but i can't seem to get it working with the pyro shader. I've seen it work before with a cloud setup, but I can't work out what's going wrong in my scene.

I've attached an example setup, really basic...  I've tried to implement your two way switch trick.  Is there any chance you could provide an example or have a look at mine? 

Cheers,

Beau

Works fine in  h13.0 only thing i did was to replace your inhouse mantra node and added a parameter to your fireball shader for where to store the point cloud.

pcWrite_v001_t01-2.hipnc

Share this post


Link to post
Share on other sites

Mawi ... yes! 

For some reason , My old scene started working. So I have no idea what was preventing it when I was testing it earlier. 

Either way, I found that when i took the two way switch out, it stopped working. So that was definitely needed in this case. However a colleague of mine is using it within a different shader and its works fine without the two way switch. He just has it as a branch of the shader that doesnt continue beyond on the pcwrite , So it must be circumstantial.

Either way, thank you for your help! 

Beau 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×