Jump to content

Analogue of Attribute "cull" "backfacing" [0],


Recommended Posts

Hi.

I want to ask a question about baking in mantra. I will describe my actions because I am not assured of their correctness. Shader which I use for baking looks so.

bake.jpg

Shader which I use for reading baking data looks so.

read.jpg

If I render scene for baking and then I render scene for reading baking data, everything will look normally.

render01f.jpg

But if I change camera orientation and render this with reading shader, there will appear black areas.

render02s.jpg

It is correct. Because on back side of surface are no points.

pointst.jpg

In renderman I will easy add missing points by addition of three attributes in rib:

Attribute "cull" "backfacing" [0]
Attribute "cull" "hidden" [0]
Attribute "dice" "rasteroriented" [0]

Whether there is a similar option in mantra?

I have one more small question. How can I bake more than 2 attribute in point cloud? In pcwrite node there are only two attributes(channels) for bake.

pcwrite.jpg

Edited by atap3d
Link to comment
Share on other sites

Hi atap3d. The parameter you'll want to add to your rop is Enable Hiding. You'll probably want to add Scanline Measuring, ZImportance, and Measure scale as well to control how the micropolygon grids and the resultant point clouds are generated.

Link to comment
Share on other sites

Thank you. All points have appeared.

points.jpg

But if normal of point isn't turned to the camera, shader on this point doesn't execute.

28052531.jpg

How to make, that shader has executed on all points?

Edited by atap3d
Link to comment
Share on other sites

Thank you. All points have appeared.

But if normal of point isn't turned to the camera, shader on this point doesn't execute.

How to make, that shader has executed on all points?

I think they are - but you might running into a Bias issue where the ray origins are biased toward camera and then intersecting the surface immediately. Try adding a "Bias Along Normal" (vm_biasnormal) RenderingParameter and it may help?

I do believe Mantra does shade each and every point it generates.

Link to comment
Share on other sites

Yo atap3d the current artifact isn't really an artifact at all - the shader is running as expected on all the micropolygons. Somewhere in your shader however, there is a faceforward routine that is flipping the normals towards the camera and therefore causing the faces to be shaded as though they were facing the interior of your object. You'll want to get rid of this by unchecking any "ensure faces point forward" parameters.

Edited by brianburke
Link to comment
Share on other sites

The underlying VEX function can do it: http://www.sidefx.com/docs/houdini10.0/vex/functions/pcwrite

Perhaps look into using the Inline Code VOP and add the line yourself?

You'll find there are quite a few things that you can do in VEX that haven't been properly exposed in VOPs. <_< It's always useful taking a look at the VEX functions inside VOPs every now and then.

Thank you, brianburke.

How can I bake more than 2 attribute in point cloud? In pcwrite node there are only two attributes(channels) for bake.

pcwrite.jpg

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