View previous topic :: View next topic |
Author |
Message |
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Sat Aug 25, 2007 8:59 pm Post subject: How to use a material library? |
|
|
If I export a material library from one file, how do I then import that material library in another? I can't see any way of referencing a material library file, except by setting the default material library, which I need to set before I even create a file. |
|
Back to top |
|
|
espritcool Member
Joined: 02 Aug 2006 Posts: 91
|
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Wed Aug 29, 2007 9:31 pm Post subject: |
|
|
It is easier to just go into settings and choose my .dml file as the default -- doesn't even mean replacing any material library file on disk.
However, that is of limited usefulness. If I rememer that I have material Q in some other map file N, and I want to use the same material in file M, is there no way to transfer the material from N to M?
Or, even worse, what if I change the material in N? Ideally, it would be possible to add references to one or more material libraries in a map, and those materials are stored as external references, so if the material changes in the material library, they change on screen as well. Perhaps the map could keep a cached copy of the data about the material, so in case the material library goes away, you could "flatten references" on materials, and get fully independent materials. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Thu Aug 30, 2007 5:56 am Post subject: |
|
|
I am all for the idea of better managed material libraries, but referencing might just be a tad too complex for the average user. You simply want to change one material, and suddenly you have to think "hey, will this affect any other models I use this material in... wait, perhaps I better run a local copy". Of course the system could aid in those decisions but such power-functionality has to be 100% non-obtrusive for the ordinary users somehow.
On a sidenote, some decoupling will be introduced when we introduce shader script support, as such scripts can be shared by multiple materials across scenes.
I'd also like to point out that thus far our materials are fairly simple, so functionality like this has never been very urgent as recreating any material takes just a couple of clips. However, materials are getting more and more properties over time so better management is indeed becoming much more of an issue.
As a workaround to your original question: Merging two scenes imports all materials from a scene, so by storing materials in empty scenes (effectively using those as material libraries) you can more or less merge libraries. This is a little rough around the edges (for one, it doesn't seem to merge the materials properly currently, so you'll end up with duplicates of the system material and any other material that was defined in both scenes), but it will work. |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Fri Aug 31, 2007 6:53 pm Post subject: |
|
|
Interesting.
I think it's perfectly fine if you have to manually add a reference to your material library for it to be "referenced" not "cloned." The default material library could still be cloned into each new scene. That way, it's totally transparent to current and new users, and only users explicitly adding a "reference" would have to worry about cascading changes. |
|
Back to top |
|
|
|