Irawan and Marschner Woven Cloth model

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

Moderators: jromang, tomb, zcott, coordinators

Irawan and Marschner Woven Cloth model

Postby tomb » Thu Oct 18, 2012 11:29 am

Hi all,

I've just commited a rough first version of a new "cloth" material, using a BRDF from "Specular Reflection from Woven Cloth" by Irawan and Marschner, ACM Transactions on Graphics 31:1, Jan. 2012. More details can be found in Irawans PhD thesis "Appearance of Woven Cloth".

It is largely based on code from Mitsuba renderer by Wenzel Jakob (used by permission), which again is based on code from Piti Irawan (used by permission).

Attached is the scene I've used for testing - look into the lxm file for how to use the material. The u and v stuff controls the scale of the weave - and yes,
the object needs to have u and v coordinates (either implicitly or explicitly).

There is something fishy about the specular component of the brdf as it tends to blow up here and there, which leads to fireflies.
I'm will into it as soon as I find some more time, but help is of course welcome. I probably made some silly mistake in porting it to lux.

Enjoy!

denim.png

silk_shantung.png
Attachments
cloth_example.zip
(128.01 KiB) Downloaded 625 times
User avatar
tomb
Developer
 
Posts: 2407
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: Irawan and Marschner Woven Cloth model

Postby cwichura » Thu Oct 18, 2012 12:07 pm

That first render looks particularly promising. Will be fun to try this out.

One comment from looking at the checkin. Would it make sense to change the repeat_u and repeat_v parameters to be consistent with the uscale and vscale parameters used elsewhere in Lux (e.g., for textures)?

Edit: This is actually the thread fiber repeat values, and not texture I gather after looking at the thesis paper. So uscale and vscale probably don't make sense.
Last edited by cwichura on Thu Oct 18, 2012 1:17 pm, edited 1 time in total.
cwichura
 
Posts: 485
Joined: Sun Feb 12, 2012 11:31 pm

Re: Irawan and Marschner Woven Cloth model

Postby Lord Crc » Thu Oct 18, 2012 12:09 pm

Awesome news tomb, looks great :)
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4932
Joined: Sat Nov 17, 2007 2:10 pm

Re: Irawan and Marschner Woven Cloth model

Postby zsolnai » Thu Oct 18, 2012 12:21 pm

Incredible stuff, thank you! If anyone's interested, I think this is the related thesis work: http://www.cs.cornell.edu/~srm/publicat ... Thesis.pdf
zsolnai
Developer
 
Posts: 369
Joined: Sun May 22, 2011 6:17 pm

Re: Irawan and Marschner Woven Cloth model

Postby cwichura » Thu Oct 18, 2012 1:01 pm

From skimming over the thesis paper, I get that warp and weft are strands woven at right angles to each other. If one wanted to use this material with a texture map driving Kd (e.g., a cotton tie-dyed shirt), does it work to use the same map in both warp_Kd and weft_Kd? Or does one need to rotate one of the maps 90 degrees?
cwichura
 
Posts: 485
Joined: Sun Feb 12, 2012 11:31 pm

Re: Irawan and Marschner Woven Cloth model

Postby Dade » Thu Oct 18, 2012 1:05 pm

:shock:
User avatar
Dade
Developer
 
Posts: 5964
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Irawan and Marschner Woven Cloth model

Postby B.Y.O.B. » Thu Oct 18, 2012 1:19 pm

Wow, that looks extremely realistic!
User avatar
B.Y.O.B.
 
Posts: 2182
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: Irawan and Marschner Woven Cloth model

Postby tomb » Thu Oct 18, 2012 1:50 pm

cwichura wrote:From skimming over the thesis paper, I get that warp and weft are strands woven at right angles to each other. If one wanted to use this material with a texture map driving Kd (e.g., a cotton tie-dyed shirt), does it work to use the same map in both warp_Kd and weft_Kd? Or does one need to rotate one of the maps 90 degrees?


I haven't actually tested, but I think you can use the same map. Lets find out ;)
User avatar
tomb
Developer
 
Posts: 2407
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: Irawan and Marschner Woven Cloth model

Postby Carbonflux » Thu Oct 18, 2012 7:34 pm

beautiful :D
www.carbonflux.org - photographing the imagination.
User avatar
Carbonflux
Developer
 
Posts: 1489
Joined: Thu Aug 07, 2008 7:22 pm
Location: Seattle, WA, USA.

Re: Irawan and Marschner Woven Cloth model

Postby maleficmax » Fri Oct 19, 2012 2:24 am

Some closeups?
User avatar
maleficmax
 
Posts: 84
Joined: Thu Jul 01, 2010 7:02 am
Location: Ukraine, Kremenchug

Next

Return to Materials, API & Scene file format

Who is online

Users browsing this forum: No registered users and 1 guest