Jump to content

Exporting Transforms to Alembic


Recommended Posts

Hi,

I need to proceduraly generate transforms (just translation and rotation) to describe objects placement and animation (i.e. transforms created in Houdini, saved as Alembic, read by a render engine that instantiates highres models on transforms). Although it seems easy, I was not able to create transforms and export as Alembic?! Checked similar questions, and most answers say I need to create primitives and store them in different positions to build a list of transforms?! I Think a transform in Houdini is a point with "P" and "orient" attributes???

Notes:

-I've created some points and exported them by ROP Alembic + checked "Build Hierarchy from Attribute", but it did not work, i.e I got points in the generated Alembic with one top transform.

-In Maya, there is a node called "locator" that seems to store only a transform, but "transform" node in Houdini actually applies its transform on the model points. Is there an equivalent node in Houdini?

Thanks,

 

 

 

Link to comment
Share on other sites

Hey,

Indeed, in Mantra, instanciation at render time works with points who have N and up vectors, or alternatively an orient attribute (quaternion) that supersedes them if you have both.

In order to understand what you need to export, what does your external rendering package needs ? I know you can instantiate based on particles in Maya (instantiate some ass files for Arnold for example), but you talk about transform nodes ?

I don’t know if it helps, but in Maya you have indeed transform nodes (dagNode) and shape nodes (the « components » of your shape). In Houdini, the equivalent should be the Geometry node, at the root of sop context (/obj). Every geometry inside a geometry node is « transformed » by the information of translation and rotation and scale of this upper level node. I think this is why your points are all below this « top transform » you are talking about : they have been created inside the same geo node, correct ?

So I can’t help you more until I know what you need to export (what sofwtare / render engine), but if your goal is to have « top transform » nodes, then you need to create as much Geometry nodes (with proper TRS) as « locator » you need out of your Alembic. For that you would probably need to do it in Python if you need lots of « locators ». But that would be strange :-) There may be a better way.

Edited by StepbyStepVFX
Link to comment
Share on other sites

Man, thaaaaanks a lot for the time/details you put in your answer, seriously, I really appreciate it :)

Getting back to what I want to do: I am still experimenting/understanding the right way to do my task! the "task" general description is : use Houdini to create an alembic file has "many" empty transforms (i.e. each transform = translation + quaternion, maybe they are stored differently in Alembic format?), to be used by a render engine (called guerilla) for instantiation.

Your analogy (between Maya and Houdini ) makes lots of sense, so since I am exporting only one geo, all particles underneath appear as one object in Alembic. As you said, if I really want to create many empty transforms then I need to create many empty geos as well (in python for sure!). I was thinking maybe, there is a way to tell Houdini: use each point @orient and @P attribute to create a transform and store them independently in Alembic, but this seems to be a very specific task and I need to do it manually (in python). 

Alright, I think I need to more research about my render engine and see exactly what it needs first, then take it from there. But what it seems like a fact is I need to write a python script that converts points @P and @orient as top geo empty nodes IF I just want a list of transforms in an alembic file...

Once more, thaaaaaaaanks again :)

Edited by catchyid
Link to comment
Share on other sites

You can build a hierarchy with a string attribute, and then set the alembic_rop to build one for you. In theory if you make the same structure you can layer this in.

There is a primitive type called "AlembicRef", but i havent quite figured out how that works. https://www.sidefx.com/docs/houdini/vex/functions/addprim.html

 

Edited by ThomasPara
  • Like 1
Link to comment
Share on other sites

@Thomas: thanks for input, will investigate "AlembicRef" as I never heard about it before!

@Jo: sorry, I totally lost you here, can you elaborate more, I did not get what curves has to do with the orientation? and how it's related to a mesh?

Link to comment
Share on other sites

I just read the documentation of Guerilla. It seems their instancing system uses a base mesh (called a « scalp ») on which they scatter / instance objects (couldn’t understand if it is instanced on the points of the mesh or randomly across the surface). Guide curves (usually a kind of polyline) are used to determine orientation of instances. 
it is really similar to what’s happening in any grooming system under the hood.

That’s why I suggested using grooming tools, but I haven’t got further in my réflexion unfortunately :-)

That being said, it seems that they accept point cache files of particles. But I don’t know how to generate that from Houdini.

Edited by StepbyStepVFX
Link to comment
Share on other sites

  • 3 months later...

Hi mate,

have you sorted your problem?

I think i have exactly the same one and just wanted to check with you.

 

Creating primitive per point and generating hierarchy based on attribute would work for you. But in my case i need to transform only transforms, just like you would do in maya, so cant have any primitives in it.

Edited by martinkindl83
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...