Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Arnold ClipGeo in the Maya viewport (ShaderFX?) or "on Render Booleans"

3 REPLIES 3
Reply
Message 1 of 4
mitch.s
161 Views, 3 Replies

Arnold ClipGeo in the Maya viewport (ShaderFX?) or "on Render Booleans"

Hi everyone

We are looking for a shader (or to build one with ShaderFX) that does the same as the Arnold ClipGeo.
In Modo those are called 'Render Booleans'


Arnold's ClipGeo is a great shader that opens up a lot of unique workflows.
The problem is that this happens at rendertime. So there is no way that Animators can preview this in the Maya viewport.

Here is an example of what we'd like to achieve. But with the classic booleans.
It's a simple 'punch hole' boolean of a sphere and a deformed cylinder. (Possible Easy/Versatile and Fast workflow for cartoony Facials!)
ShaderFx_BooleanShader_001.gifShaderFx_BooleanShader_002.gif
The problem is that the classic booleans are way too slow to use in animation, do cause the geometry to be unstable and are messing with the vertex-count/order.

We could also use a 'TRANSPARENCY MAP' to achieve the same result (fast + clean geo + point order unchanged)
But there's no way to control the transparency map directly from Maya.

My pinky tells me that there must be a solution using ShaderFX to make '@ Render Booleans'.
Even if it's just a 'punch hole', it would be very useful for all kinds of stuff.

So, is there some shaderFX wizard that could make a shader or point us the way to do the same as Arnold ClipGeo but in the Maya Viewport? (So that the riggers/animators can use this feature)

Thx in advance

3 REPLIES 3
Message 2 of 4
mitch.s
in reply to: mitch.s

Halfway there:
We managed to make an intersection colorSet in Bifrost and link this colorSet to the opacity of the viewport shader in ShaderFX.

mitchs_0-1718187232890.png

ShaderFX_Boolean_wire_Hires.gifShaderFX_Boolean_Hires.gif

But we cannot use this in production:
The resolution of the mesh/vertex-map needs to be high enough to properly display.
Bifrost bottlenecks when calculating the intersecting verts on a hires mesh...
Framerate drops from over 200fps to 40fps

Blistering fast but insufficient quality @lores

mitchs_1-1718187704876.png

mitchs_2-1718187752371.png

 

Acceptable quality but way too slow @hires:

mitchs_3-1718187832205.png

mitchs_4-1718187869070.png

 

So we are looking for a resolution (subdiv) independent solution @shader-level. ShaderFX is probably the way to go but we don't have the expertise:

  • Mimic the Bifrost workflow in ShaderFX.
    In short: Dot product of the vectors of the closest points and the intersecting object's normals. negative dotproducts do intersect/positive do not.
  • Another approach would be to transfer the occlusion casted by the intersection object to the opacity or transparency in ShaderFX

 

Are there any shaderFX wizz's out there who can help us out with this?
@emouillet, @johnsonttf , @santd , @karlloveridge , ... ?
although quasi no ShaderFX question ever gets answered... 😭

Maybe there is a way to do this with arnoldnodes 'in the Maya Viewport'?

Message 3 of 4
emouillet
in reply to: mitch.s

Hi mich.s, 

I am not an expert in viewport shader. But i would say that shader fx and writing your own GLSL code and load it with the  glslShader plug-in are the 2 options you have. The third one would be to write your own shader throw the API. 

 

- shader fx is not maintain anymore, it's close to abandonware, there are some bug that are never corrected and i stop using it for this reason. 

 

- glslShader also look to be a pretty old school choice because it need to run in core profile mode

https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=GUID-41D74556-0699-4F4E-8382-F9E69FBFC158 

Basically you need the help of someone familiar with GLSL shader writting inside Maya. 
And i would highly recommand to post your question on this forum :

https://discourse.techart.online/ 

The creator of shader FX use to post a lot on it, and you will find true dev / td that could help you , on your question. 

 

If i had to do something like this i would check GLSL code exemple on shadertoy or ask on openGL forum
https://community.khronos.org/c/opengl-general/34
to get some Code Exemple to write a CSG shader in GLSL 
https://www.shadertoy.com/view/MddSD7

This is a easy task for a solid dev, but quite tricky for a technical artist like me


Cheers

E

Message 4 of 4
mitch.s
in reply to: emouillet

Thx for the info @emouillet.
We will check it out.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report