Tuesday 22 March 2022

un pinning vellum constraints

in a pop wrangle, inside the vellum solver, do something like this


 if(@Frame>1175){i@stopped=0;}

as far as i know it works on Pin constraints, set to "stopped".


this vid from Sidefx explains it towards the end, sort of.

https://youtu.be/t_lyBo1U1t8

Tuesday 22 February 2022

Getting Point Attributes in CHOPS

Scenario - Had some points that were moving in unison, I wanted to stretch/squash each point's animation individually so they'd move at different rates. 
I made a point attribute for each called "shift" and gave them a random value between a min and max.

Then I made a CHOPNET and imported the geometry with the tx,ty,tz and shift channels.
Next we need a foreach chop node, be sure to specify all the channels in the parameter box.


Now dive into the foreach node and make a Stretch node.

I just wanted to use the shift attribute in the main Length Scale parameter, so I use the "chopi" function which seemed the simplest out of all the chop_ functions available. It evaluates the channel specified in quotes at the index you give it. This index is meant to be along the timeline, I believe - but since our value is a constant you can throw in any number.

chopi("../Foreach_Iteration/shift",10)

The Stretch node goes to the built in output node...make sure that one is being exported.

This should work now...each point's transform animation stretched according to the shift attribute.

Another thing I found whilst trying to figure this out was the Reorder node. It lets you sort the channels according to different rules. So if you use the number suffix, then it will "group" all the same point channels together. shift0, tx0,ty0,tz0, shift1,tx1,ty1,tz1....etc.... Could be useful if you have some sort of nth based logic going in a script or something, although I really think this for each method works much better.

I'm sure there are better ways to get point attributes in CHOPS.....I just can't figure them out haha. Let me know in the comments, if I've remembered to enable them.

Friday 26 November 2021

baking textures with Redshift

This youtuber explains how to bake lightmaps... Textures is a very similar process
 https://www.youtube.com/watch?v=N5LcTTywUVs

The key points.. I will do a proper write up later.
Tick "bake rendermaps" in your Redshift Rop.
Ensure the object you're baking is specified in both the Rendermap & Objects tabs
The baker will just bake whatever it is given - so for noise/triplanars, you might want to make a new material with just that node pulled in, using a material merge. Or you might want to pull in the whole diffuse colour etc.
For bumps/float values, I use a "Color maker" node as an "out" null.. Nulls don't seem to behave. (could be wrong on this)


oh - and make sure in the IPR tab of the rop, IPR Progressive Rendering is turned OFF.

oh oh - remember to put the objects and/or lights you might want to be baking into the usual objects bit of the ROP!

Wednesday 3 November 2021

switch node or blending transforms at object level

If you need to switch or blend between two (or more) null transforms, eg to parent an object use the BLEND OBJECT. Kinda simple, goes to show how much I work at SOP level ha.

You'll probably want to use the Sequence mode, with "Shortest Path Rotation Blending" ticked, to avoid weird flipping (depending on what and how you're blending stuff)

Thursday 1 April 2021

attaching nulls to parts of a moving/deforming object. rivet.

At SOP level, select 3 points of the geo you need to attach a rivet to, this is to calculate rotation (if your object/mesh-area is rotating/deforming)

Make a group with these points, call it something like "pivot_group".

 Go up to Object Level and make a Rivet node.
Here, specify the SOP eg - /obj/geo1/object_merge1

and the pivot_group in the Point Group dialog box.


You can now parent a NULL or something else to the rivet. Something I noticed, was the rotation of the null can be a bit offset, and I've been manually adjusting the rotation...

If you're exporting a null for Flame, you might be better off parenting a camera object, as the alembic export seems to ignore the null. Maya will import a null, although it will show up as an invisible point, so again you're probably better off using a camera for this too.

I've been exporting the null using the File-Export-Alembic tool..

Wednesday 31 March 2021

alternative to attribute interpolation, point specific?

This is quite a simple tip, but I always forget about it..

I had a a bunch of points that, over time, would get stretched out along the z axis. The stretching was dictated by a few random attributes, so it wasn't obvious which would end up the furthest away from the starting point.
Later it turned out I needed to adjust the pscale of each point, based on it's position. ie; the tip would be largest, the tail would be smallest.

So, timeshift and hold your points to the last frame. In a point vop, use a "relative to bounding box" node and get the delta vector. Output it to however it works for you - in my case I used a vector-to-float node to isolate the Z value and I called it pscale_z. Very original eh?

For whatever reason, I wasn't able to get attribute interpolation to work - I thought I could just plug in the moving points and the static end frame into the node, but the arrays and values just weren't working for me.. Leave a comment if you know how to get it working! (it does work for scatters and primitives, as the sourceprim and uv get created for you...)

Anyway, my work around was to use a point wrangle. Plug the moving points into the first input (0), and the static points with the pscale_z attributes into the second input (1).

f@pscale_z=point(1,"pscale_z",@ptnum);

 that's it! The moving points will now take the pscale_z attribute from input "1" . As long as you don't mess around with point numbers, this will keep working. (or if you do need to do that, I guess, give it an @id value somehow)