Showing posts with label maya. Show all posts
Showing posts with label maya. Show all posts

Friday 2 February 2024

look at constraint but only in the X or Y etc

 


There's a Look At Constraint, in the Constraints tab, however if you only want this aim to work on the X, or maybe just the Y, you have to dig into the constraint, then go to the Common Tab (see top screenshot) and then only specify the rx or ry in the scope.

Remember to use Nulls to set custom pivots etc, then parent your desired geometry to the null.

Thursday 22 September 2022

camera projection uv, texture reference object a la Maya

A simple thing..

In Maya, you can project UVs from a camera. To prevent textures from swimming if you do animate the object, you must create a Texture Reference Object. Here's how you do it in Houdini.

The gist is - 

  • use the UVTEXTURE node to project your uv's. Set the texture type to Perspective from Camera and specify the projection camera in the appropriate box.
  • freeze the object on the frame you want the projection to occur at, using a TIMESHIFT.
  • copy the uv attribute back onto the moving object, using the ATTRIBUTE COPY node.

Friday 29 March 2019

2d zoom pan

ctrl alt rmb drag..
if there's an image plane, lock the camera movement

Thursday 23 November 2017

multiple colour sets on alembics, for Maya

This probably contradicts something I've written before, but you CAN export multiple colour sets in Houdini, for alembicking. The key is in the attribute creation. Make sure you use an explicit attribute create node, specify a float, of colour type. Oh and make sure it's on the vertices, because Maya. It will now show up along trusty ol' Cd in Maya's Color Set Manager.

Friday 14 October 2016

Exporting simple multiple objects from Houdini to Maya

Assuming... you've duplicated objects around, animated them etc... AND the objects are single mesh things. Eg. a Sphere, a torus.... Not a multi-object thing.

Create a "connectivity" node and set the connectivity type to Primitive. This should be connected to the group of objects you're exporting.

This creates a Primitive attribute which assigns an integer value, based on the object's "shell".
eg. the primitives in Cube 1 might have a value of 0, Cube3 might have a value of 4 or whatever..

Connect a Primitive Wrangle and put in:

s@path = 'fish_GRP/fish_' + itoa(i@class) + '_GEO/fish_'+ itoa(i@class)+'_GEOShape';

where the path attribute created is making a group called "fish_GRP" and objects called "fish_1_GEO" and their respective Maya shape nodes called "fish_1_GEOShape".

It seems necessary to build the complete hierarchy for Maya, otherwise the individual shape nodes are not so easily accessible..

Finally, using a ROP_Alembic node, output your file, making sure that you have
"Build Hierarchy from Attribute" ticked ON, and set to "path".
The other bits are left as default...

Thursday 6 October 2016

Importing an Alembic Camera from Maya

Create an alembic archive and bring the .abc file in that way.
If you need to scale it to account for Maya's scene scale, make a Null node, scale it as you will & plug the Alembic Archive beneath it.
If you mess about with any frame-time-offsets, be sure to click the Push Parameters to Children button.

Tuesday 4 October 2016

velocity volume fields like Maya

It's possible to make a piece of geometry, pump it through a PointVOP and give it some velocity, using constants, curl noise or whatever method you like.
Then convert the polygon to a VDB, using the V point attribute. Name the field "vel".

Within POPs/dynamic network use an advect with volume operator. The defaults should keep the velocity's affect within the volume created.

If this doesn't work as expected you might need to use a Geometry Wrangle (within the POP/Flip/dynamics)
Using the code below, you'll want to set the 2nd input (in the input tabs) to the velocity volume created earlier.

vector vel = volumesamplev(1,0,@P);

v@force += vel * ch("scale");

v@a = vel;

Basically we're affecting the velocity via a force, rather than adding directly to it - to avoid overly strong changes in velocity. We also have extra control with a scale slider & the "a" attribute is a little debug value to watch out for in the Geometry Spreadsheet.
Note - you might have to really crank up the velocity values, depending on the current velocity of the existing particles/fluid/whatever.

*NOTE* The Geometry Wrangle should be plugged into the particles tab of the solver! (2nd one)