Double sided geo?

   5485   12   3
User Avatar
Member
5 posts
Joined: Aug. 2011
Offline
Hi guys,


I have very thin wings, and how do I turn on double sided geo? or shader?

I was trying to use two sided node in material, but seems not working.


Best
User Avatar
Member
8525 posts
Joined: July 2007
Offline
Karma seems to be rendering thin poly surfaces as double sided by default (regardless of doubleSided property)

but there are 2 properties that you can try:

Mesh Edit LOP
- create/check Double Sided property

but also there is

Render Geometry Settings LOP
- create/set Cull Backface to Off (default)
Edited by tamte - May 27, 2022 10:40:24
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
inki
Hi guys,


I have very thin wings, and how do I turn on double sided geo? or shader?

I was trying to use two sided node in material, but seems not working.


Best

do you mean thin film refraction shader, or different material on each side? (double sided shader). Karma renders both sides of meshes by default as Tomas said.

If you want thin film, I believe there is the option in the mtlx standard surface (although I've not tested it so your mileage may vary)

Two-sided materials can be done with material layering, or texture layering, with a two-sided material vop (only for vex shaders)
User Avatar
Member
273 posts
Joined: Nov. 2013
Offline
At least from a USD schema perspective, doubleSided means only visible when viewing the normal direction and invisible/culled when viewing the backside.
User Avatar
Staff
31 posts
Joined: June 2018
Offline
I've got it working in Karma. See attached .hip
Edited by lucap1 - May 28, 2022 00:21:03

Attachments:
two_sided_v1.hip (262.5 KB)
two_sided.jpg (273.9 KB)

User Avatar
Member
1 posts
Joined: Dec. 2014
Offline
Is a similar construction possible for MtlX materials? for Karma XPU? I can't figure out how to achieve such a result.

UPD: solution that works Karma XPU with MtlX.

(Pre-create an attribute at the SOP level in the Geo node)
@N_fg = @N;
@N_bg = @N * -1;
Edited by Oleg Talanov - Aug. 16, 2022 03:54:49

Attachments:
ref.JPG (58.7 KB)
result.JPG (40.6 KB)

User Avatar
Member
710 posts
Joined: July 2005
Online
Oleg Talanov
Is a similar construction possible for MtlX materials? for Karma XPU? I can't figure out how to achieve such a result.

For Karma CPU you can use MtlX Thin Surface if you are comfortable building materials using the BSDF nodes. Doesn't seem to work with XPU unfortunately.
User Avatar
Member
7 posts
Joined: Nov. 2017
Offline
Oleg Talanov
Is a similar construction possible for MtlX materials? for Karma XPU? I can't figure out how to achieve such a result.

UPD: solution that works Karma XPU with MtlX.

(Pre-create an attribute at the SOP level in the Geo node)
@N_fg = @N;
@N_bg = @N * -1;

Hi. sir. got it .and here is my question.
How to apply different texture to many plane(with different attribute to define path at prim level) ?
s@path = "../filename_"+itoa(@primnum)+".jpg";
then use geoproperty node to read this path.plug into usduvtexture.but this can not work. how to got this ?
User Avatar
Member
2529 posts
Joined: June 2008
Offline
Sorry, this is non-solaris, but related.

Still having a problem constructing a two-sided material that consistently works. I wonder if ray:direction or the normal node are correctly forwarding the information?

The ray:direction is the direction from the camera, right? And the normal node grabs the normal from the surface the camera ray strikes? The normal defaults to object space, but does it need a connection?
Edited by Enivob - Feb. 25, 2024 11:45:26

Attachments:
2-sided.gif (597.6 KB)
ap_kr_two_sided_grid_image_120123.hiplc (997.6 KB)
Untitled-1.jpg (92.7 KB)

Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Staff
466 posts
Joined: May 2019
Offline
Enivob
Still having a problem constructing a two-sided material that consistently works.

Sorry I couldn't find the material in the supplied scene, so I created a simple one myself to show this working.
Things to watch out for..
  • mtlxnormal node needs to be in "worldspace" mode
  • make sure your dotproduct node is correctly on vector3 (given I don't see any dotted lines, I assume it is fine)
  • the kma_rayimport node is on "vector3" mode

We also have a "backface" rayimport, which sadly has been left off the dropdown list box UI :/ (we'll fix this for the next version of Houdini), although it is in the documentation.
https://www.sidefx.com/docs/houdini/nodes/vop/kma_rayimport.html [www.sidefx.com]

My example shows both the normal-dot-raydir and backface options working.

Attachments:
double_sided.hip (170.9 KB)
normal_dot_raydir.PNG (848.1 KB)
backface_rayimport.PNG (869.6 KB)

User Avatar
Member
2529 posts
Joined: June 2008
Offline
Thanks for the HIP file, but when I try to use that technique with turning book pages, it doesn't work. Notice your sphere it perfectly fine. Do I have to adjust how I model the pages?
Edited by Enivob - Feb. 26, 2024 18:02:20

Attachments:
2-sided.gif (333.2 KB)
ap_sidefx_double_sided.hiplc (201.2 KB)

Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
8525 posts
Joined: July 2007
Offline
I wouldn't use MtlX Normal node, for one it would most likely use normal primvar which may contain custom directions (as it's your case, since all your normals are {0,1,0})

I'd use kma_rayimport and inport
ray:hitNg
which should be true geometric normal in the same space as
ray:direction

in my test that works, and produces the same result as mentioned
ray:backface


EDIT: but of course I'd still suggest either recomputing or removing N attribute on pages to not cause other shading issues
Edited by tamte - Feb. 26, 2024 18:39:01
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2529 posts
Joined: June 2008
Offline
Thanks, Tomas.

That works.
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
  • Quick Links