Jump to content

Houdini not exporting geometry to FBX?


rygo6

Recommended Posts

  • 9 months later...
On ‎2‎/‎3‎/‎2018 at 9:53 PM, Atom said:

I don't see any export ROP in the /out context. Try exporting from there instead of the File menu. Drop down a Filmbox FBX node in the /out context.

So I got to revive this old topic, took a bit of a break from my Houdini learning, but just renewed my indie license so back on it.

Your suggestion of the filmbox node worked. Thank you.

However, I had my geometry node generating multiple separate meshes inside of it. I wanted this to be exported as separate meshes into FBX. Not as separate files, just separate meshes in the same file. Is that possible? I believe inside my geometry node I am separating them by creating different polygon groups.

Edited by rygo6
Link to comment
Share on other sites

  • 2 months later...

This seems to be a recurrent problem for pretty much everybody.
The FBX export doesn't have this capability in and of itself.

If you want, you could look into the rbd_to_fbx from the gamedev toolset, they actually did it.
Their method is to create a subnet with a geo node for all the packed fragment, and export that subnet.

I believe this could be replicated inside of sop.

  • Like 1
Link to comment
Share on other sites

Here is a draft of the idea

It seems to work correctly on static meshes (haven't tested much, so there might be some problem)
It is painfully slow for animated sequence though. 20 seconds for a standard FBX export turns into 20 minutes or more. Sooo yeah, some work is needed on that area
Also, if some points or prims has the attribute, and some doesn't, those will be left out. Again, this is a draft. If some interest is shown, I might work on it a bit more.

I encourage anyone that feels like it to enhance the tool

The tool currently work with attributes, not groups.

fbx_export_v1.1.hip
FBX_export_v1_1.hda

Please let me know if the tool is useful

EDIT :
I updated the tool a bit
See the tool's help for some (I hope) useful info

I found out what's taking so long for animated export - it's the unpacking
Using the Fetch Unpacked Geometry from the dopimport was actually slower than an unpack under it, and an unpack was slower than using none before the export.
But hey, it's not made for animated geometry. I've had no problem using it for static geometry yet.

If the point or prim string split attribute is empty on some points or prim, the tool now exports them correctly.

Edited by Alain2131
  • Thanks 2
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

@zarralax
Sorry for the delay, didn't see it.
Unsure what you mean by saying "retain each objects' pivot"
This could apply to multiple things
1 - Inherit the container's pivot
2 - If it is a packed prim, take that pivot (packedfulltransform)
3 - Take the center as a pivot

They could be added as parameters to the tool, if this is what you mean

@art3mis
I'm glad it's useful !

Link to comment
Share on other sites

  • 2 months later...
On 2/5/2019 at 12:28 AM, Alain2131 said:

Here is a draft of the idea

It seems to work correctly on static meshes (haven't tested much, so there might be some problem)
It is painfully slow for animated sequence though. 20 seconds for a standard FBX export turns into 20 minutes or more. Sooo yeah, some work is needed on that area
Also, if some points or prims has the attribute, and some doesn't, those will be left out. Again, this is a draft. If some interest is shown, I might work on it a bit more.

I encourage anyone that feels like it to enhance the tool

The tool currently work with attributes, not groups.

fbx_export_v1.1.hip
FBX_export_v1_1.hda

Please let me know if the tool is useful

EDIT :
I updated the tool a bit
See the tool's help for some (I hope) useful info

I found out what's taking so long for animated export - it's the unpacking
Using the Fetch Unpacked Geometry from the dopimport was actually slower than an unpack under it, and an unpack was slower than using none before the export.
But hey, it's not made for animated geometry. I've had no problem using it for static geometry yet.

If the point or prim string split attribute is empty on some points or prim, the tool now exports them correctly.

Wow this works. Thank you.

I'm looking at this innards of this and am just baffled. How does this thing work? Is there some tutorial or article that would go through some of anything related to whats going in this that would let me better understand?

Also, would it be possible to get this to export the meshes to have the same name as the original group, and also the material that was applied to them?

 

 

 

Link to comment
Share on other sites

Hey @rygo6,

About tutorials for that, I don't have any specifics about this, I've just referred heavily on the documentation, and watched most of SideFX's vimeo channel videos
This is mainly (badly-written and not optimized) Python, and logic within the Houdini nodes
I've just one video on HDA building by Jeff Wagner, which certainly helped me. Sorry for not having more from the top of my head

As for the meshes to have the same name as the original group.
First, it doesn't use groups (since one point or prim could be in multiple groups)
So, I'm guessing that you could transfert the group with an attribute wrangle like so

string primGroups[] = detailintrinsic(0, "primitivegroups"); // Get all the groups

for(int i=0; i<len(primGroups); i++) // Run over all the groups
{
    int isInGroup = inprimgroup(0, primGroups[i], @primnum);
    if(isInGroup)
        setprimattrib(0, "name", @primnum, primGroups[i]); // If the current primitive is in the group, write the group's name in the "name" string attribute, which will be used by the export tool
}

This is for primitive groups, and needs to be ran in a wrangle set to run over prims. If one point or prim is in multiple groups, this wrangle will prioritize by inverted alphabetical order. Group "Zebra" will win over group "Wolf".

The tool will use that name attribute to separate the geometry in individual meshes, and the name will propagate to each meshes.

 

What was that about the materials ? I haven't done anything about them.
I'm guessing the issue is if the geo has a material on it at the OBJ level (and not on the actual geometry), the tool would ignore it.
That would require a small update to the tool if that is the case

P.S. Now I've got a question for you (or people that uses the tool)
Would you want groups to work with the tool ?
The workaround would be that if there is some point or prim that is referenced by more than one group, the tool will duplicate those and put them is the groups as specified
Now
This is just the idea, it may be more complicated than that. But hopefully it's as "simple" as that !

Edited by Alain2131
Link to comment
Share on other sites

  • 9 months later...
  • 1 year later...

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...