question

Maja Divjak avatar image
Maja Divjak asked ·

Creating a layered shader, what attrubute(s) do I plug my ramps into??

Hi,

I'm creating a layered shader to fake a cell with an outer cytoplasmic layer and an inner nucleus layer. I've got two standard surface nodes, one outer and one inner feeding into the layered shader, each controlled by a ramp and a sampler info node. Trouble is, now there is no refraction rollout in Arnold, I don't know what to plug the ramps into on the surface nodes. The outer ramp I've plugged into the transmission weight, which give a nice transparent centre and a coloured ring ie works nicely. The inner node is a different story and no matter what I plug the ramp into on the surface node, I get a burning white nucleus and not a coloured nucleus. See attached shader image and rendered result. Please advise as to what I'm doing wrong?

Thanks so much,

Maja

hypershadecapture.png

cellrender.png

shaderstransmission
hypershadecapture.png (101.7 KiB)
cellrender.png (59.8 KiB)
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Maja Divjak avatar image
Maja Divjak answered ·

Thank you both so much for your answers. @Nicholas Woolridge you have gone way above and beyond in providing that shader. It looks beautiful and I will play around with it some more on Monday. Lee, I will definitely have more of a play around with the mix shader and facing ratio node. I did have a play with the layered shader and the facing ratio node without much luck, so I'll try it with the mix.

Have a lovely weekend, both of you.

Best wishes,

Maja

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Nicholas Woolridge avatar image
Nicholas Woolridge answered ·

I think it is overly complex to use two surface shaders (at least it is for my brain!). I dusted off my very rusty Maya skills and more or less rebuilt my suggestion... I haven't fully tested it in a scene...

cell-material.zip


10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Nicholas Woolridge avatar image
Nicholas Woolridge answered ·

@Dr Maja Divjak I'm not using Maya, but here is an Arnold setup for a "fake" cell shader using facing ratio plugging into the standard surface in C4D... Should be transferable to Maya.

I'm piping the facing ratio into ramp shaders to modulate the gradient from cell edge to centre. The most important one is the one which attenuates the transmission weight, and which allows for the "fake nucleus" effect. The others modify the surface and transmission colour.

I'm also using a couple of procedural noises to displace the surface, and to create create fake cytoplasmic complexity (organelles, etc.).

Part of what sells it is the specular highlight that crosses the cytoplasm/nucleus boundary; this is enabled by turning up the coat weight.


cell-surface.jpg (194.8 KiB)
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Nicholas Woolridge avatar image
Nicholas Woolridge answered ·

@Dr Maja Divjak I used a 3D noise (or a volume noise) specifically to avoid seams; in our field it is so much easier not to have to deal with 2D UV layouts when you don't have to... I'm not sure why it wouldn't work for you. And yes, I should have mentioned that getting good displacement results usually requires subdividing the mesh in the Arnold settings for the geometry...

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Maja Divjak avatar image
Maja Divjak answered ·

Hello Lee and @Nicholas Woolridge,

Lee, I tried connecting my inner and outer layers to a mix shader with a facing ratio node as the mix connection and also connecting a couple of facing ratio nodes to the v co-ord of my ramps and both these attempts yielded the same result ie the cytoplasm on the outside, but a hole where the nucleus should be with my skyDome HDRI image reflected in it. Also tried adding the mix node to the latter situation, with the same result.

I got your shader to work Nicholas, with a a 2D bump map (wispy noise) applied as a displacement shader node. The volume noise you had didn't seem to work in my scene. It took me a while to work out that objects with displacement nodes applied need some tweaking in the Arnold subdivision and displacement attributes rollouts, specifically set Type to 'catlark', iterations to 3 and height to 0.05. Otherwise your spheres render as cubes!

One problem I had is that the 2D bump map gives a seam I couldn't get rid of at about 2 o'clock on the cell. If you have any suggestions for that, I would much appreciate it! Images attached.

Thank you both so much!

nwoolridgeshadernetwork.png nwoolridgerenderwithseam.png

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Lee Griggs avatar image
Lee Griggs answered ·

Try connecting a Facing Ratio to the Mix Weight of a Mix Shader. An example at the bottom of this page.

Can you upload a simple scene and I will have a play with it? Did you try a Facing Ratio shader instead of the sampler info shaders?

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Maja Divjak avatar image
Maja Divjak answered ·

@Nicholas Woolridge Thanks for your reply. I tried to make sense of what you did, but I found in Maya I couldn't actually connect the standard surface node to rgb ramps, but I can connect to Maya ramps. So, I struggled on with my layered shader and I tried the mix shader you suggested Lee. Shader network and image is attached. Again, the rendered image shows a hole where the nucleus should be with my HDRI image, which is attached to my skyDome light, reflected in it! I kept finding throughout the day that my HDRI kept showing up in my render. Where do I turn this off please? I tried turning off every option under the LightShape visibility to no avail.

Then I tried a fresnel shader with ramps connected to standard surface nodes via opacity. Image is attached. This was far more successful, but I found I couldn't adjust the size of the nucleus or cytoplasm with the ramps readily, so I ended up with a cell with a very large nucleus, as seen in the attached image. Finally I gave up in frustration and just applied a transmission shader to a smoothed cube for the cytoplasm and a standard surface shader to another cube for the nucleus. Looks good, but I want to achieve the result with a single shader network and not two separate pieces of geometry. Not sure what else to do.

Thanks so much for your help,

Maja

mixshaderhypershade.png

mixshaderrender.png

layeredshaderviaopacity.pnglayeredshaderwithopacityrender.png


10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Lee Griggs avatar image
Lee Griggs answered ·

This tutorial might be of some use (the shader is attached to the page). It's not exactly a cell but it uses a Facing Ratio shader with Multiply shaders to achieve a similar effect. Have you looked into using the Mix shader also?

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.