Context trouble. One more time ...

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

Context trouble. One more time ...

Post by Pancho » 11 Jan 2016, 02:21

I ran into this problem again. Context. I want to import custom user normals from Houdini.

In SI ICE I can set the Node user normal. I just wonder, since it's in node context, how to transfer my "per point" or "per vertex" vectors into the node normals. I always sucked in terms of understanding this context stuff. But this time I can't find anything. Even of Mr Blair's site.

Can somebody please help me out?

Cheers
Tom

P.S.: To keep it simple: Point context to node context.

User avatar
mattmos
Posts: 445
Joined: 02 Dec 2009, 16:59

Re: Context trouble. One more time ...

Post by mattmos » 11 Jan 2016, 03:25

In emTools there is a compound called "Per Node to Per Point". Could take a look into it and reverse engineer?

Edit - actually, there is also a per point to per node compound :)

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

Re: Context trouble. One more time ...

Post by Pancho » 11 Jan 2016, 08:47

Thanks, Matt!

Very early this morning it seems I also stumbled across a solution.

self.NodeToVertex > Select in Array (Index)

Point data > Build array from set > Select in array (Array)

Select in array > Set Data

Don't know why Autodesk never came up with a page demonstrating all this visually for all context conversion types. : )


Cheers and thanks!
Tom

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Context trouble. One more time ...

Post by Mathaeus » 11 Jan 2016, 12:49

Should be simple to learn this once and remember forever, imho. First node who gets location, defines the ICE context in ''row''. So, get > self.nodeLocation > get something from this, is ''sample" or "node" context, usable to set something into user normal property ( if there's one, already). Get > self.pointlocation puts everything later into point context, and so on.
No need to build any array or anything.
But, how you got normals from Houdini. Last time I've checked out with H 13 and obj files, no any normals in exported obj (don't know for other formats), so had to do workaround by setting the normals into exported UV and export separate files, two additional times, to get third vector component. Generally, if normals are present, SI will take them as user normal property, automatically.

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

Re: Context trouble. One more time ...

Post by Pancho » 11 Jan 2016, 12:56

Crate sucked big time with variables. At least I didn't understand the whole thing. Too complicated. And for an importer that's very bad.

SI 2015 SP2 Alembic export works fine. You can export from H whatever you want. In SI I slap an ICE tree onto the geometry which then sets all I want. Like in this case the NodeUserNormal.

You just need to be careful with UV stuff and exporting N on a primitive and point context will likely crash SI. But with custom names no problem.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Context trouble. One more time ...

Post by Mathaeus » 11 Jan 2016, 13:35

Pancho wrote: SI 2015 SP2 Alembic export works fine. You can export from H whatever you want. In SI I slap an ICE tree onto the geometry which then sets all I want. Like in this case the NodeUserNormal.
Nice. If normals are coming as "node" or ''sample'' attribute to SI (I know you know that: equivalent in H is 'vertex class', where ''class'' in H is our ''context''), theoretically, should be enough to get data from node location, and set into user normal property if one already exists, or - according to docs, since SI 2013, could be a ''plain" set data into an ICE attribute, too.

Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests