Material news

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: jromang, tomb, zcott, coordinators

Material news

Postby jeanphi » Tue Aug 30, 2011 4:35 pm

Hi,

I've just pushed a bunch of small material thingies:
- carpaint model now more closely matches the one described in the paper (still no flakes though), I find the results with the presets much nicer
- a new fresnelcolor fresnel texture allows to define the IOR from the normal incidence reflection color (the conversion is meant for metals rather than dielectrics)
- a new fresnelname fresnel texture that will try to load in order a SOPRA file, a Luxpop file or a IOR preset (to mimic what the metal material does)
- a new metal2 material that takes a fresnel texture instead of a name, combined with the fresnelcolor texture, it should open new ways to define metals.

The metal2 material might loose its fresnel parameter and use the interior property instead, I'm not yet sure of what approach is best.

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

Re: Material news

Postby Abel » Tue Aug 30, 2011 5:32 pm

Very nice! I'm looking forward to testing the car paint. And from what I gather after some IRC discussion, the new metal material will allow metals of any colour, right? I'm sure that will come in handy. :)

Those SOPRA and Luxpop files seem a bit exotic for my uses but I'm sure the more mystically inclined will be happy to exploit them right away. :)
User avatar
Abel
Developer
 
Posts: 1433
Joined: Sat Oct 20, 2007 8:13 am
Location: Helsinki, Finland

Re: Material news

Postby Lord Crc » Tue Aug 30, 2011 11:19 pm

Good stuff jeanphi!

Personally I think I like being consistent with glass2 by having the interior define the fresnel component.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4518
Joined: Sat Nov 17, 2007 2:10 pm

Re: Material news

Postby J the Ninja » Wed Aug 31, 2011 1:34 am

Lord Crc wrote:Good stuff jeanphi!

Personally I think I like being consistent with glass2 by having the interior define the fresnel component.


This would also make exporter implementation a lot easier, as at that point it is really just a copy of the metal mat code with the preset/file selector removed. :D

On the other hand, it does seem a little weird having to use the interior volume for something on a material that opaque. I do agree with LordCrc though that consistency with glass2 is probably a good thing. If we are going to add another material that is just an empty shell for another property, it should behave as much as possible like glass2, our other 'empty shell' mat. Users who are already familiar with glass2 should pick this up fairly easily.

Also, on the subject of car paint: here's one of the presets (either BMW 338 or Polaris Silber, now I can't remember which one I set :oops: ) rendered with the old code (top) and the new code (below). I've also adjusted the defaults in luxblend25, the new default paint is the third luxball. Also, since this seems to deal with the light loss at angles problem with car paint, I went ahead and simultaneously assigned the bug report to jeanphi and marked it as resolved. http://www.luxrender.net/mantis/view.php?id=1126

Old:
old copy.jpg


New:
new copy.jpg


New Blender 2.5 defaults (basically the polaris silber preset with values rounded off a bit and a brightish white base)
new_defaults copy.jpg
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2249
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: Material news

Postby jeanphi » Wed Aug 31, 2011 1:58 am

Lord Crc wrote:Personally I think I like being consistent with glass2 by having the interior define the fresnel component.

Me too, however metal materials, contrary to glass materials are often used on "double sided" sheets which have no interior (more precisely they need to have exterior=interior=ambient volume).
That's a bit tricky. Maybe allow a parameter specifying a volume name, then when void it uses the global interior and when defined it uses the specified volume?

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

Re: Material news

Postby jeanphi » Wed Aug 31, 2011 2:02 am

Abel wrote:Very nice! I'm looking forward to testing the car paint. And from what I gather after some IRC discussion, the new metal material will allow metals of any colour, right? I'm sure that will come in handy. :)

Exactly :)

Abel wrote:Those SOPRA and Luxpop files seem a bit exotic for my uses but I'm sure the more mystically inclined will be happy to exploit them right away. :)

They were all already available through the sopra, luxpop and preset fresnel textures, the new texture is just a place holder to eventually replace the code of the metal material to create the correct fresnel texture on the fly and just use metal2. I've not done it yet because I think that metal2 is actually slightly slower than metal, I need to benchmark it.

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

Re: Material news

Postby Lord Crc » Wed Aug 31, 2011 2:16 am

jeanphi wrote:Me too, however metal materials, contrary to glass materials are often used on "double sided" sheets which have no interior (more precisely they need to have exterior=interior=ambient volume)


Hmm, wouldn't it then be better to follow the glossytranslucent example and have a "doublesided" switch, which would swap the interior/exterior definitions if it hits the backside?
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4518
Joined: Sat Nov 17, 2007 2:10 pm

Re: Material news

Postby jeanphi » Wed Aug 31, 2011 7:11 am

Lord Crc wrote:Hmm, wouldn't it then be better to follow the glossytranslucent example and have a "doublesided" switch, which would swap the interior/exterior definitions if it hits the backside?

The thing is that BSDF::GetVolume wouldn't work anymore or we would need to add a BSDF property to tell if we are dealing with a volume or a thin mesh. That would require the user to set that property for all materials.

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

Re: Material news

Postby binarycortex » Wed Aug 31, 2011 9:17 am

jeanphi wrote:- a new fresnelcolor fresnel texture allows to define the IOR from the normal incidence reflection color (the conversion is meant for metals rather than dielectrics)
- a new fresnelname fresnel texture that will try to load in order a SOPRA file, a Luxpop file or a IOR preset (to mimic what the metal material does)
- a new metal2 material that takes a fresnel texture instead of a name, combined with the fresnelcolor texture, it should open new ways to define metals.

Jeanphi, could you please provide an lxm with an example of metal2, and if possible also fresnelname and fresnelcolor.
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club
User avatar
binarycortex
Developer
 
Posts: 1509
Joined: Fri Feb 22, 2008 10:44 pm

Re: Material news

Postby jeanphi » Wed Aug 31, 2011 10:15 am

Hi,

Here you are:
Code: Select all
Texture "customior" "fresnel" "fresnelcolor" "color color" [0.3 0.5 0.4]
MakeNamedMaterial "custommetal" "string type" ["metal2"] "texture fresnel" ["customior"] "float uroughness" [0.01] "float vroughness" [0.01]

I just found that fresnelname isn't consistent, I'll fix it before posting an example.
The fresnelcolor color parameter can be textured.

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

Next

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest