Houdini Eggsporter - issue and bunch of questions

Hey,

I’m writing a custom converter from Houdini (USD) to egg, and I struggle with exporting vertices data with plenty of questions that came to my mind.

I’m trying to pass custom data to the vertices, however on file load Panda seems to reject any non-predefined data I’m trying to pass (using both scalras, values and tags) and throws an error.
Is it possible to pass such custom data via egg vertices?

Unfortunately, I can’t upload stuff as a new user so here’s a simple example of the data I want to create:

 <Vertex> 4 {
					1 0.5 1
					<UV> { 0 1}
					<test> {1}
 }

Also, I’ve found out that on egg import Panda3D seems to remove the ‘unused’ hierarchy elements. I will need those for the future utilities and transformation of the models.
After reading the documentation I’ve added the <Model> {1} attribute, and it solves the problem, but I wouldn’t say I like it being non elegant :slight_smile:
Is there a way to force Panda not to do that or maybe is there any other more elegant solution?

I wonder why there is a Texture slot in Polygon. Is it sampling the texture in the shaders for each of the polygons separately somehow? I would love to understand its usage as I find it unusual. It would be great to know why is it here and what was the idea behind it :slight_smile:

I saw in the documentation that Panda3D supports the blending of the textures. Could anyone explain (or at least give a direction) to me how underneath and when the Textures are blended ? Is it some pre-sample blend or a feature built in an automatically generated shader, or maybe something different?

The syntax for custom vertex data is <Aux> test { 1 2 3 4 }.

The egg format is a little funky. Yes, you’re supposed to reference the texture per-polygon. The egg loader separates the polygons with different texture and material into different Geom objects, so they can be rendered with separate texture and material.

I think <Model> is the right flag to use if you need to be sure that you can still manipulate the node in Panda. It causes the node to survive a flattening operation.

There is only a basic kind of blending that works by having combine modes on multiple texture stages. This is achieved by specifying these combine modes under the <Texture> definition in the .egg file.

Great, thanks for the detailed answears. It worked, it seems however to accept only float4. Is that intended behaviour? Can other types be stored somehow?

On the other hand - I was looking for transferring an object-level animations and found this old topic. Object-level animations · Issue #457 · panda3d/panda3d · GitHub

Is there maybe any newer/ better solution to that yet?

If not I imagine keyframes to be stored in tags of individual groups and reapply transformation manually after the import along with other elements like custom shaders. What do You think about such an approach?

That’s possible, though what exactly would you construct on the Panda end? Intervals? Or the exposed-joint route? If the latter, you might as well consider going that approach on the .egg level.