Houdini and Redshift Rendering issue

   9887   4   0
User Avatar
Member
116 posts
Joined: June 2016
Offline
Hello,

I applied now material to all my objects but arised new issue.
I f you take a look inside of my any geometry node.
For example: “torus_object1”
If you now clikc on “Switch” node you can see in “Select Input” expression $F > 10
and if you click on node named as “Set_Alpha” (Attribute Wrangle node)
You can see VEX expression:
float Alpha =1; //creates Alpha attribute and set it to 1.
if (@Frame < 10) // if current frame is less than 10
{
f@Alpha = 0; // set Alpha attribute to 0;
}

What that does it makes obect become visible in frame 10
All torus nodes have own time when they need to become visible

If i scroll to frame 1
and i start Redshift IPR i will see all those text and toruses eaven tho they should be invisible at that time.

When i use Mantra it works but with Redshift it does not.
Can you help me with it?
HIP file is attached

Attachments:
Question.hiplc (1.5 MB)

User Avatar
Member
7794 posts
Joined: Sept. 2011
Online
Although Alpha is not typically used to animate visibility, it can be done if you configure redshift object properties, and set up your material correctly.

Add Redshift object properties to your render objects, and add “Alpha” to the list of point attributes (it should appear in the dropdown menu if it exists in that object.)

In your redshift material network, use an RS Point Attribute node to import the Alpha value into your material. Connect the vector output to the rs material's opacity input to control opacity (in this case visibility).

Keep in mind that objects made invisible in this way will still be part of the scene sent to the renderer, and will still consume memory, which may or may not matter depending on how light your scene is.

The preferred way to animate visibility for an entire object is using the ‘display’ parameter on the object. This has the benefit of preserving proper motion blur.

If you have a single object with merged geometries, you can animate a switch to a ‘null’ so that an individual geometry will be empty with the switch is toggled. Deformation motion blur may not work properly with this method.

Attachments:
rs_object_vis_example.zip (84.4 KB)

User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
That's a really interesting use of logic I've never seen before in the prim wrangle:

@Alpha = invis != 0;

I was puzzled because I was assuming to think of it as an ‘if’ condition in that @Alpha would get the value of invis so long as it wasn't 0.

But it's taken as True/False; @Alpha getting that 0 or 1 ‘result’.
User Avatar
Member
116 posts
Joined: June 2016
Offline
Credit for creating that goes to
Jesper Rahlff
http://forums.odforce.net/topic/31755-how-to-make-object-occure-on-specific-time-frame-in-houdini/?tab=comments#comment-175638 [forums.odforce.net]

I am way too stupid atm to create this on my own.
I am just trying to learn Houdini

But thank you jsmack.
I was looking at samples with using display.
Can you explain it to me please
I see that there are Geometry nodes for every torus object. And they are connected and if i click on any of the nodes there is under “Render” tab at “Display” section expression:
(((opdigits(“.”)+($FF+5)/4.0)%5)/5)>0.25

Can you explain this expression please


TRhank you for all the help
Edited by ISUther - Nov. 5, 2017 12:11:13
User Avatar
Member
7794 posts
Joined: Sept. 2011
Online
ISUther
(((opdigits(“.”)+($FF+5)/4.0)%5)/5)>0.25

Can you explain this expression please
)

Certainly. This expression is creating a repeating pulse, with the numeric portion of the node's name (opdigits) as the offset in the cycle.

opdigits(“/path/to/node”) returns the number at the end of a node name. For example: opdigits(“../torus_3”) returns ‘3’. “.” means the current nodes, so in the expression, it gets the digits from the node on which the expression is being evaluated.

$FF means the current frame with floating point precision. In this instance $F would suffice, but using $FF is a habit of mine.

'%' is the modulus function. If you are unfamiliar, it returns the remainder of a division. I'm using it here to create a loop from 0-5, and then dividing by 5 to get a 0-1 saw tooth pattern.

The final inequality ‘>0.25’ means the pulse is high for the upper 75% of the pulse phase. Making the torus visible for 75% of the 20 frame cycle.
  • Quick Links