New "band" texture

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

Moderators: jromang, tomb, zcott, coordinators

New "band" texture

Postby jeanphi » Tue Dec 07, 2010 9:43 am

Hi,

I've just pushed a new band texture to enable complex gradients. It is currently available as a color or a float texture.
The parameters are:
- "float amount" texturable parameter to select inside the gradient (equivalent to the mix amount)
- "float offsets" float list defining reference points for the gradient in the (0-1) range, in ascending order
- "texture tex*" where * is the index of the corresponding reference point in the above list (eg tex1, tex2), it is the gradient value at the reference point

I just realized that "tex*" parameters are numbered starting from 0 instead of 1 which is inconsistent with the current numbering schemes in the SDL, and I also forgot to check that offsets are in ascending order, so I'll probably push an update soon to fix those 2 issues. Please report if you find something else.

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

Re: New "band" texture

Postby jeanphi » Wed Dec 08, 2010 10:21 am

Hi,

I just made the announced tweaks (numbering from 1 instead of 0 and check for offsets in ascending order).

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

Re: New "band" texture

Postby Carbonflux » Wed Dec 08, 2010 5:40 pm

This is going to be a very useful imo, thank you, I look forward to testing it :)
www.carbonflux.org - photographing the imagination.
User avatar
Carbonflux
Developer
 
Posts: 1403
Joined: Thu Aug 07, 2008 7:22 pm
Location: Seattle, WA, USA.

Re: New "band" texture

Postby neo2068 » Thu Dec 09, 2010 12:08 pm

Could you give a simple example? I don't get it working (material is black). This is what I did. But the texture parameter seems to be wrong. ('Parameter tex* not used' in log output)
Code: Select all
Texture "Tex1" "color" "constant" "color value" [0.700000 0.000000 0.000000]
Texture "Tex2" "color" "constant" "color value" [0.000000 0.700000 0.000000]
Texture "Tex3" "color" "constant" "color value" [0.000000 0.000000 0.700000]

Texture "Band::Kd" "color" "band"
   "float amount" [0.25]
   "float offsets" [0.0 0.5 1.0]
   "texture tex1" ["Tex1"]
   "texture tex2" ["Tex2"]
   "texture tex3" ["Tex3"]

MakeNamedMaterial "Band"
   "string type" ["matte"]
   "texture Kd" ["Band::Kd"
i7 860, 16 GB RAM, NVIDIA Geforce GTX 560 + GTX 460, Windows 7 64bit, Blender 2.66
neo2068
Developer
 
Posts: 487
Joined: Sun May 03, 2009 2:11 am
Location: Germany

Re: New "band" texture

Postby jeanphi » Thu Dec 09, 2010 2:22 pm

Hi,

Yes, I've spotted it too, a fix is now available.

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

Re: New "band" texture

Postby neo2068 » Fri Dec 10, 2010 2:50 am

Thanks, now it works.
i7 860, 16 GB RAM, NVIDIA Geforce GTX 560 + GTX 460, Windows 7 64bit, Blender 2.66
neo2068
Developer
 
Posts: 487
Joined: Sun May 03, 2009 2:11 am
Location: Germany

Re: New "band" texture

Postby jeanphi » Fri Dec 10, 2010 3:59 am

Hi,

Just a quick test of the new texture, color is controled by a "band" texture, transparency is controled by another "band" texture.
luxblend-preview.jpg
band test
luxblend-preview.jpg (13.8 KiB) Viewed 890 times


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

Re: New "band" texture

Postby tomb » Fri Dec 10, 2010 4:10 am

That's a really, *really* nice type of texture! I can't wait to see what people do with it :D
User avatar
tomb
Developer
 
Posts: 1942
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: New "band" texture

Postby neo2068 » Sat Dec 11, 2010 8:07 am

I did a first test to create a complex wood texture.
wood.png

wood1.png
i7 860, 16 GB RAM, NVIDIA Geforce GTX 560 + GTX 460, Windows 7 64bit, Blender 2.66
neo2068
Developer
 
Posts: 487
Joined: Sun May 03, 2009 2:11 am
Location: Germany

Re: New "band" texture

Postby SATtva » Sat Dec 11, 2010 11:20 am

Christ! That is awesome! :shock:
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5547
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Next

Return to Materials, API & Scene file format

Who is online

Users browsing this forum: No registered users and 1 guest