question

Nicola Birtch avatar image
Nicola Birtch asked ·

How to animate material based on intersection with another object?

Hi I am trying to animate the path of a needle guide (green line) as it covers the blue region of the prostate, first top half then bottom half.

I also tried using a texture object mask, with a plane, but it's too straight, the coverage should be arc like. Using a bend modifier did not help.

I wanted to animate the path covering the top half and the the bottom half. I can do this with a bitmap, but it's very difficult to do and make it look accurate.

The material also has emission, so I want the blue area to emit blue and the green area to emit green. Any suggestions would be greatly appreciated.

Fig 1. Using Plane with Object Texture Map


Fig 2. Division is straight rather than curved like actual path

I would like the green area to just cover the upper half


Fig 3. Plane with Bend modifier shows actual path, division should be curved like this

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

rachid Hadj Abderrahmane avatar image
rachid Hadj Abderrahmane answered ·

I don't have 3dsmax but it's the same thing

Use state_vector Node with geometric normal
a range Node to animate the cut
rgb_to_float to extract whatever the channel you want to use it as a cut
switch_shader with 02 material ()
map the index with with rgb_to_float
Hope this help


statevector.jpg (570.3 KiB)
1 comment Share
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.

Nice. A similar scene file can be found here for MAXtoA.

0 Likes 0 · ·
Lee Griggs avatar image
Lee Griggs answered ·

Maybe this would be easier using animated booleans to separate the prostate using the green geo? That way you could assign separate shaders to them?

If they were separate objects then maybe the curvature shader could also be useful.

Not sure if that is what you want?

2 comments Share
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.

Thanks for the response. I'm not sure what you mean. I tried separating the prostate into quadrants using the slice modifier that way I can work with top/ bottom halves, but I still can't figure out how to make the highlight division curved like a cone.

0 Likes 0 · ·

>how to make the highlight division curved like a cone.

I'm not sure what you mean tbh. Is this a modeling or a shading task? If you could share the scene, maybe I could understand better.

0 Likes 0 · ·

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.