material uid problems

General discussion about Indigo Materials - material requests, material developement, feedback, etc..
Post Reply
8 posts • Page 1 of 1
FakeShamus
Posts: 512
Joined: Wed May 02, 2007 11:34 am

material uid problems

Post by FakeShamus » Sat Dec 22, 2012 5:12 am

ok, I had a feeling this might lead to some issues - I am getting materials mixed up in my scene because when created and saved out as igm files through indigo they have the same material uid. when I assign these as external materials in Blendigo my objects sometimes get the wrong material applied due to this double id. you can use the material picker in the Indigo gui while rendering and it correctly shows the material and its settings for each object, but in the render itself the object renders with the wrong material.

FakeShamus
Posts: 512
Joined: Wed May 02, 2007 11:34 am

Re: material uid problems

Post by FakeShamus » Fri Dec 28, 2012 2:41 am

maybe I should post this in the bugs forum, I'm having more trouble due to the material uid system and no responses here so far.

so, whenever I generate a new material from scratch in Indigo it assigns some random low number for the mat uid. when I assign those materials as external igm's in Blendigo they often come into conflict with other materials exported from my scene. so instead of rendering the material I've created, it renders as one of the other materials in my scene which happens to have the same material uid.

now, this gets even more complicated when creating nested blended materials, or, for example, the new double-sided materials. in order to solve the conflict you have to manually change all of the mat uid's in a text editor and make sure that all the references link up correctly in the blended material - if this is not done correctly Indigo crashes immediately when opening the scene that uses the blend material, with no explanation or error message.

I don't know what the solution is aside from going back to the regular naming convention that was used previously, it is really messing with my workflow. can someone respond with ideas for a fix?
thanks!

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: material uid problems

Post by CTZn » Fri Dec 28, 2012 6:41 am

Hi Fakeshamus, I'm answering by principle but in reality I haven't implemented the model2 yet; it's not documented afaik and the crashes aren't helping indeed. I think that UID may not coexist with named references.

Keep in mind that Indigo 3.6 is at a beta stage atm.

As for (p)igm files with UID, the fix should be easy, yet is it to come. Replacing an existing material by another one would be a good option if it wasn't happening at "random" :D
obsolete asset

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: material uid problems

Post by OnoSendai » Thu Jan 03, 2013 4:28 am

Hi FakeShamus,
Materials saved out from the latest Indigo save out their UIDs, which they didn't in the past.
Exporters will need to take this into account from now on when importing materials or using external materials.

If that is too tricky I might revert the change that saves out UIDs.

nick

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: material uid problems

Post by CTZn » Thu Jan 03, 2013 4:44 am

Regardless of the implementation for exporters, this could be a nice option I think:

Upon importing a (P)IGM with an embedded UID clashing, ask the user wether it should update the material already defined with the same UID, or be a new material with an overriden UID. Users don't have a control on UID's anyways.

This could be declined into a File menu item: update selected material, in addition to import.

It's a feature ;)
obsolete asset

FakeShamus
Posts: 512
Joined: Wed May 02, 2007 11:34 am

Re: material uid problems

Post by FakeShamus » Thu Jan 03, 2013 5:26 am

I was thinking a quick fix for this could be to just assign some random, high uid number when creating materials from scratch in Indigo. as it is, they all seem to get "8" by default, which almost always conflicts with something. maybe reserve 4-digit uid's for newly created external materials, something like that.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: material uid problems

Post by CTZn » Thu Jan 03, 2013 5:55 am

That would still mean exposing Indigo to eventual clashes, any thin the margin.
obsolete asset

FakeShamus
Posts: 512
Joined: Wed May 02, 2007 11:34 am

Re: material uid problems

Post by FakeShamus » Thu Jan 03, 2013 6:22 am

right - eventually you would want some conflict-checking system built in, but I think for most cases this would avoid the problem. can I ask what the benefit is to the uid number system vs the old naming convention? if it has to be a number, could the uid be somehow determined by the material name? translate the name into a numerical code?

Post Reply
8 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 12 guests