Blender HAIR for Lux

Discussion related to the 'LuxBlend' Blender 2.4+ python exporter script.

Moderators: Ratow, SATtva, coordinators

Re: Blender HAIR for Lux

Postby shadypepe » Sat Mar 20, 2010 2:44 pm

I think the integration of exporting hair natively to lux is one of the most important things to make blender/lux an alternative to commercial 3d suites. So is this project still alive? Or are there alternatives?
shadypepe
 
Posts: 7
Joined: Sat Mar 06, 2010 12:56 pm

Re: Blender HAIR for Lux

Postby SATtva » Sun Mar 21, 2010 11:20 am

It's on the list of priority tasks. Hope to finish it before 0.7 release.
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Blender HAIR for Lux

Postby shadypepe » Tue Mar 23, 2010 1:27 pm

hey that's great news, thanks!
shadypepe
 
Posts: 7
Joined: Sat Mar 06, 2010 12:56 pm

Implemented

Postby SATtva » Wed Apr 28, 2010 9:02 am

Hair export is in the repo. Implementation uses instanced primitive shapes and is loosely based on e_jackson's work. Added a new section in the LuxBlend's materials tab just below mesh properties to define hair thickness on a per-material basis. You can get the dev version of LuxBlend from here.

With large number and high complexity of hairs be prepared for very long export times, rendering speed can also drop significantly. You've been warned.

There is still some problem with motion blur -- these transform matrices drove me crazy. I didn't had time yet to look into the issue, but will in a couple of days. If you spot the culprit in the meantime, feel free to provide a patch.

hair-test1.jpg
hair-test1.jpg (91.41 KiB) Viewed 1315 times
Last edited by SATtva on Wed Apr 28, 2010 9:06 am, edited 1 time in total.
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Blender HAIR for Lux

Postby dougal2 » Wed Apr 28, 2010 9:06 am

Crazy and Awesome ! :D
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: Blender HAIR for Lux

Postby SATtva » Wed Apr 28, 2010 9:32 am

I'm exporting a testscene with 4000 hair particles (8 segments / 17 parts each) for two hours now on my laptop. :shock:
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Blender HAIR for Lux

Postby Lord Crc » Wed Apr 28, 2010 10:27 am

Uhm yeah that's speedy lol.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4450
Joined: Sat Nov 17, 2007 2:10 pm

Re: Blender HAIR for Lux

Postby SATtva » Wed Apr 28, 2010 10:36 am

And it's still exporting. :D About 3300 particles finished. I really need to look into code optimization in the exportObjects() method as the current state is simply awful. :(
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Blender HAIR for Lux

Postby Dade » Thu Apr 29, 2010 2:28 am

SATtva wrote:And it's still exporting. :D About 3300 particles finished. I really need to look into code optimization in the exportObjects() method as the current state is simply awful. :(


For what I remember it does some O(n^2) check to optimize the mesh, you could try to disable optimization to check if it is the main source of long export time.
User avatar
Dade
Developer
 
Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Blender HAIR for Lux

Postby SATtva » Thu Apr 29, 2010 2:59 am

Dade, there is no mesh export here, only spheres and cylinders (just a pair of them per hair material used). However in the long run we have to move to converting hairs to mesh on the fly. First, for GPGPU kernels; second, with the current approach performance drops linearly with the number of hair objects (on QBVH) what is really bad.

Doug already made some optimizations, but not enough I think. The main problem is not in hair export function (this just collects all the needed primitive objects), but in the main object export code which simply chokes on those tenth of thousands of objects.
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

PreviousNext

Return to LuxBlend (Blender Exporter)

Who is online

Users browsing this forum: Bing [Bot] and 2 guests