Exampel how to Use? Mantra Chop-channels

   774   2   0
User Avatar
Member
120 posts
Joined: Aug. 2017
Offline
Just need ex on How to use Get Chop channels(node) In Mantra ???
Manipulate colors for ex.
Conservation of Momentum
User Avatar
Member
6 posts
Joined: Aug. 2023
Offline
Let's say you have a scene with a rotating object, and you want to change the color of the object based on its rotation angle.

Setting Up the Scene:

Create a geometry object (for example, a simple cube) that you want to rotate and manipulate the color of.
Create a Camera to view the object.
Create a Light to illuminate the object.
Creating Chop Channels:

Open the "Chop Network" context in Houdini.
Inside the "Chop Network," create a "Chop Channel" node.
In the "Chop Channel" node, create a new channel. Name it "rotation_angle."
Use an expression or animation to control the rotation of the object and feed this rotation angle value into the "rotation_angle" channel. This could be done using a "Channel" node or expressions based on animation frames.
Manipulating Colors Using Chop Channels:

Go back to the "Sop Network" context.

Select the object you want to manipulate the color of.

In the Object's parameters, find the "Material" section and assign a shader (like a Mantra Surface shader).

In the shader parameters, find the color parameter (usually called "basecolor" or similar).

Click on the color parameter and go to the parameter expression field.

Here's an example expression to manipulate the color based on the rotation angle:
ch("../chopnet1/rotation_angle") > 180 ? {1, 0, 0} : {0, 0, 1}
In this example, the color will change based on whether the rotation angle is greater than 180 degrees. If the angle is greater than 180, the color will be red; otherwise, it will be blue.

Rendering Using Mantra:

Go to the "Render" context in Houdini.
Create a "Mantra" node to render the scene.
Configure the rendering settings, such as image format and resolution.
Click the render button to generate the rendered image with the color manipulation based on the chop channel.
User Avatar
Member
120 posts
Joined: Aug. 2017
Offline
Thank you for Your Time @DyktaT. that's a One way ..just curious how to use values from chop on this Node inside Mantra Vop...to manipulate some values trigonometric Colors shaping .

Attachments:
erwww.jpg (143.5 KB)

Conservation of Momentum
  • Quick Links