rendering textures for yeti instances

310 views
Skip to first unread message

Francis Bezooyen

unread,
Jul 11, 2022, 11:26:10 PM7/11/22
to gaffer-dev
I'm currently ingesting a bird asset built with yeti/maya into our maya/gaffer workflow. It's gone fine for unique feathers (primary flight feathers) that use custom built attributes in the yeti network to control the uv coordinates. However, I'm having trouble getting textures to work for feathers that are instanced. In this case, yeti auto generates a different set of attributes for controlling the uv coordinates ( parent_s" = u, "parent_t" = v ") that are based on the location of the instance relative to the skin it is scattered across. The attributes are showing up in gaffer, according to the primitive inspector, but the textures won't render. The only notable difference that I've found between the setups is that the custom attributes that are working are vertex attributes, while the auto-generated attributes (parent_s, parent_t) are constant attributes. I suspect that converting the attributes from constant to vertex might resolve the problem but I haven't been able to work out a way to do this.

If you can think of anything that might help me resolve this matter, please share.

Francis Bezooyen

unread,
Jul 12, 2022, 1:13:10 AM7/12/22
to gaffer-dev
Edit: the parent_t and parent_s variables are coming through but, for some reason, they have no value. Checking the same alembic in houdini though shows that they do have values.

John Haddon

unread,
Jul 12, 2022, 3:00:56 AM7/12/22
to gaffe...@googlegroups.com
Hi Francis,
If you can share a simple `.abc` file that shows the problem, I can take a look. Doesn't need to be the production asset, just something minimal that shows the problem...
Cheers...
John

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/6a8c238c-48cc-4c2d-b164-65d70565d746n%40googlegroups.com.

Francis Bezooyen

unread,
Jul 12, 2022, 1:37:11 PM7/12/22
to gaffer-dev

John Haddon

unread,
Jul 13, 2022, 5:32:44 AM7/13/22
to gaffe...@googlegroups.com
Hi Francis,

I think Gaffer is actually doing the right thing here. The `parent_s` and `parent_t` primitive variables are arrays (which happen to have 1 element) in the Alembic file, and that's how they're being loaded by Gaffer, and also how Gaffer is exporting them to Arnold (I'm assuming you're using Arnold?). It's also how they are loaded by USD's own Alembic loader. If you look at a `.ass` file generated via the ArnoldRender node, you should see the expected arrays with the expected values, something like this :

```
 declare parent_s constant ARRAY FLOAT
 parent_s 1.91705763
```

You don't say how you're trying to retrieve the coordinates in Arnold, but my guess would be via a `user_data_float` shader, which it turns out doesn't support arrays. But it is possible to query array values via `getattribute()` in OSL - I've attached an example file which does that, and gives me the image below :

image.png

Hope that helps...
Cheers...
John


alembicFeatherTest.gfr

Francis Bezooyen

unread,
Jul 13, 2022, 6:02:44 PM7/13/22
to gaffer-dev
That worked. Thank you so much!
Reply all
Reply to author
Forward
0 new messages