Single general material?

Discussion related to the LuxRender Material system, programming API and Scene file format.

Moderators: jromang, tomb, zcott, coordinators

Single general material?

Postby paco » Thu Nov 25, 2010 1:22 am

It has occurred to me the material system is a bit complex. One of the first things you have to figure out is which of the various material you need to use to suit your purpose. If you know the materials that's not a big deal but if you decide to switch between them - ie, you started with a matte but now you want to add gloss or translucency it can be a bit of a hassle.

Anyway, its not a big deal, but a number of the materials could be condensed into a single material which might simplify it a bit.

For example, from what I can see the mirror, matte, matte translucent, glossy, rough glass, glass etc could all be combined into a single material like the glossy translucent.

For instance, the current glossy translucent can mimic most of the base materials. If you added a refractive component below the diffuse, and possibly a volumetric component then what other materials would you need? Of course internally it would make sense to optimise special cases (like matte, mirror, glass, etc) but from the user point of view you'd just be playing with certain components, rather than different materials

I don't have time atm to work on it but I was interested in what other people thought about the idea?
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: Single general material?

Postby tomb » Thu Nov 25, 2010 2:31 am

Hi,

With a material layering system like Jeanphi has talked about on various occasions, this could be done in the exporter UI - i.e. not necessarily needing a "übermaterial" with the properties of all the other materials. Heck, you could probably do quite a bit of it already just by using mix materials and tweaking the properties of the involved materials and/or putting some thought and heuristic code into a "unified" material editor. As for a lot of stuff, it "just" needs someone to do it :)

For the record, I do agree that from the end users point of view there is perhaps too many overlapping materials now and the exporters do not support "moving" from one type of material to another (i.e. such as adding "gloss" or "translucency" to a matte base).

Tom
User avatar
tomb
Developer
 
Posts: 1922
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: Single general material?

Postby jeanphi » Thu Nov 25, 2010 3:15 am

Hi,

One issue you'll be facing with an uber material is the overhead to determine which part of the model to take into account for every intersection.

Jeanphi
jeanphi
Developer
 
Posts: 6580
Joined: Mon Jan 14, 2008 7:21 am

Re: Single general material?

Postby paco » Thu Nov 25, 2010 4:24 am

I was just chatting with Inlite on IRC regarding how a mix material can be awkward to use - as opposed to a layered material.

If you defined a layered material as:

matA=top layer, with alpha
matB= bottom layer, no alpha.

You could create this by using a mix mat with

mat0=matA (without alpha)
mat1=matB(no alpha)
mix= alpha from matA

This could easily be done in an exporter (like Luxblend) which could export the mix equivalent. This wouldn't work if the base was not completely opaque though, but still, might be an interesting way to make the materials a little more intuitive
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am


Return to Materials, API & Scene file format

Who is online

Users browsing this forum: No registered users and 0 guests