Materials & Polygons

Discussions concerning programming of SOFTIMAGE©
Post Reply
User avatar
TwinSnakes007
Posts: 316
Joined: 06 Jun 2011, 16:00

Materials & Polygons

Post by TwinSnakes007 » 13 May 2013, 21:09

How do you determine which material a polygon uses?

For instance, say I have a grid with two clusters on it. There's 3 materials: The object material, and 1 material per cluster.

Now, I can tell which polygons are in each cluster by the elements property, but is there a easy way to determine which polygons should get the object material?

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: Materials & Polygons

Post by EricTRocks » 13 May 2013, 21:30

Wouldn't that be the list of polygon ids minus the ids of the ones in the clusters with a local material?
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

User avatar
TwinSnakes007
Posts: 316
Joined: 06 Jun 2011, 16:00

Re: Materials & Polygons

Post by TwinSnakes007 » 13 May 2013, 21:35

EricTRocks wrote:Wouldn't that be the list of polygon ids minus the ids of the ones in the clusters with a local material?
Yeah, that's what I came up with too. But, I was scared the performance would be horrible.

EDIT: I'm gonna check to see how LuXSI does it.

EDIT2: LuXSI doesnt support multi-material either! Rats! X(

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

Re: Materials & Polygons

Post by Mathaeus » 13 May 2013, 22:02

TwinSnakes007 wrote:
Yeah, that's what I came up with too. But, I was scared the performance would be horrible.

EDIT: I'm gonna check to see how LuXSI does it.

EDIT2: LuXSI doesnt support multi-material either! Rats! X(
Just for reference, in 3Delight, multi-material is implemented as some kind of boolean switch - as multi-material isn't supported by Renderman standards, too. Implementation is a bit more sensitive than in MR, the best way is to put all polygons into clusters, if multi-material is used - but it works. Mix of master material and materials on cluster isn't good idea, anyway.

User avatar
TwinSnakes007
Posts: 316
Joined: 06 Jun 2011, 16:00

Re: Materials & Polygons

Post by TwinSnakes007 » 13 May 2013, 22:13

Well, another thing I was considering is just using ICE Materials instead of the clusters. Using ICE, it would be super easy and fast. I'd know how many materials are involved and there is a per-polygon MaterialID attribute to read. But, I havent played with that yet to see how its visualized. Clusters+Materials is visible using Shaded view. But, I'm not sure if ICE Materials is visible in Shaded view also.

Edit: I opened the MaterialID sample scene and ICE Materials are indeed visible in shaded view. So, looks like I'll be using ICE Materials. :D

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests