VOP Pattern Nodes in Redshift

   8595   17   2
User Avatar
Member
10 posts
Joined: Oct. 2015
Offline
Hello!

Is there a way to use Houdini's VOP nodes in Redshift (namely the patterns)? I know I can create a RS Vopnet on mat level, but I can't pipe anything into it and the Houdini VOP nodes are not available inside the RS Vopnet? Or am misunderstanding some basic concepts about RS shaders on mat level?
Houdini Indie 19.0.455, Windows 10
User Avatar
Member
2528 posts
Joined: June 2008
Offline
Just assign the result of the SOP based VOP to an attribute then fetch the attribute inside the Redshift Material and route it to Color or other material parameters.

If you are trying to use Mantra based patterns inside Redshift just render them out as maps and use an attribute from map to get them into an attribute Redshift can use.

Or if you are in COPs, you can fetch the result of a COPs operation into the rsTexture filename field using the op: prefix.
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
10 posts
Joined: Oct. 2015
Offline
I knew about the SOP based Cd attribute to RS, but I'm trying to use Mantra based patterns. Thought about rendering the maps out, but hoped for another solution.

Thanks a lot anyway!
Houdini Indie 19.0.455, Windows 10
User Avatar
Member
603 posts
Joined: July 2013
Offline
To use Houdini textures with Redshift, you have to set them up in COPs first, and then you can reference the COPs node in a RsTextureSampler node using the op: prefix.

Behind the scenes, Redshift will take care of baking the textures down for you automatically, including MipMapping the textures.
Edited by TwinSnakes007 - April 4, 2018 18:12:32
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
129 posts
Joined: June 2016
Offline
https://vimeo.com/232492057 [vimeo.com]
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
That's great and all if you only want to render grids, but any other geometry would require uv coordinates, ruining the simple Cartesian relationship between the pattern space and the geometry.
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
If they are only available in mat networks, it is probably because they are only valid in a mantra surface shading context. The reason is usually because derivatives are used to anti-alias the pattern, which are only defined in shading context.
User Avatar
Member
603 posts
Joined: July 2013
Offline
jsmack
That's great and all if you only want to render grids, but any other geometry would require uv coordinates, ruining the simple Cartesian relationship between the pattern space and the geometry.

Not sure I follow, without some kind of projection, how can you use them even with Mantra without UV's?
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
710 posts
Joined: July 2005
Online
3D noise patterns don't require UVs. EDIT- although I think most of the ones in that screenshot are 2D patterns that do…
Edited by Siavash Tehrani - April 5, 2018 14:35:13
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
Procedural patterns in mantra very rarely use UV's. FX geometry is generally procedurally created and cannot have good seamless UV's. Noises and other patterns are most often based on Cartesian coordinates (XYZ space.) Sometimes space transformations are applied to create other spaces such as polar/cylindrical/toroidal spaces. Cartesian space has the benefit of being continuous and uniform, so patterns do not stretch or have seams, something that is impossible with 2D mappings of 3d surfaces (UV coordinates.) Orthographic projections can avoid seams, but have terrible stretching in all but the projection direction. Triplanar mapping is sometimes used to apply seamless patterns in game engines, but is generally unsuitable for production renders as the loss of contrast repeating patterns are unacceptable.
User Avatar
Member
603 posts
Joined: July 2013
Offline
Thanks for the explanation guys…are there any 3rd party renderers that natively support Houdini textures without baking?
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
No, mantra nodes are for mantra. Some of them used to work in RSL, but that is no more.
User Avatar
Member
8525 posts
Joined: July 2007
Offline
it'd be the most tedious task if some renderer wanted to support Mantra patterns as they are built using VEX and therefore there is no guarantee that user didn't tweak them, therefore such renderer would have to fully support VEX, which is not happening
Maybe if one day Mantra supports OSL it may be easier to get renderers on the same page

however there are renderers with their own set of pattern nodes or math nodes you can build patterns from

so as an exercise you can have a look inside of some Mantra patterns and see if you can rebuild them in your renderer using it's math nodes
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
603 posts
Joined: July 2013
Offline
tamte
Maybe if one day Mantra supports OSL it may be easier to get renderers on the same page

That would be the way to go actually, alot of 3rd party tools are adding support for OSL, so a single investment by SESI, would add alot of value to Indie Licenses that use 3rd party tools that support OSL. Lets see what H17 brings to the party in this space.


tamte
so as an exercise you can have a look inside of some Mantra patterns and see if you can rebuild them in your renderer using it's math nodes

I took a peak inside Boxes, and the main work horse is a VEX function called vop_StampPattern - so, how can I find the source code for that?
Edited by TwinSnakes007 - April 8, 2018 13:10:20
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
8525 posts
Joined: July 2007
Offline
Daryl Dunlap
I took a peak inside Boxes, and the main work horse is a VEX function called vop_StampPattern - so, how can I find the source code for that?

in the Outer code of the Inline VOP inside you can find the includes

so just look into $HFS/houdini/vex/include/voplib.h
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
603 posts
Joined: July 2013
Offline
tamte
so just look into $HFS/houdini/vex/include/voplib.h

Well, well…SESI is the gift that keeps on giving. Lemme see what I can do with this.

Thanks a ton!
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
603 posts
Joined: July 2013
Offline
Okay, well, my simple test with Boxes is going really well - less than 100 Math nodes to reach 95% feature parity between Mantra and Redshift (RS doesnt expose Derivatives) - yipeee….no baking!

..so, I want to also have Viewport support to assist with LookDev…and from reading the Docs, I can add a Tag ogl_glsl_shader to a VOP parameter and then point that to a OGL Shader file on disk and that should give me Viewport support as well.

Has anyone had any success with doing that?, before I waste research and testing time on finding out.
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
603 posts
Joined: July 2013
Offline
After several hard crashes to desktop, I did manage to write the OpenGL shader, but I couldnt get UV's into it for some reason, even though they are defined, I tried point and vertex level, but the OGL shader would not read them.

I wish there was someway to just override a portion of the Viewport OGL draw, instead of all or nothing - I just want to override Shaded mode and use the Houdini defaults for everything else.
Houdini Indie
Karma/Redshift 3D
  • Quick Links