New Blender 2.5 exporter for LuxRender 0.7

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

Moderators: Dade, Ratow, SATtva, coordinators

New Blender 2.5 exporter for LuxRender 0.7

Hey guys,

if anyone wants to extent + test my little unfinished(!!)

LuxRender 0.7RC1 exporter (no "exporter framework" needed!)

download the render script here (you have to change the path in the script where luxrender is):

http://d7z.de/tmp/index.php?file=engine_render_lux.py

Please help by extending it Still many things missing but i thought I would just start it instead of just waiting and complaining.

Please post only if you have a bug (not a missing feature!), or if you have some patch for me.

Thanks!
Daniel / Genscher

Functional:

04-09-2010:
* Exporting geometry
Genscher

Posts: 11
Joined: Wed Jul 02, 2008 7:30 pm

Re: New Blender 2.5 exporter for LuxRender 0.7

Hi,

Thanks for your efforts, but why don't you just start with the current Blender 2.5 exporter work in progress at http://src.luxrender.net/luxblend25/ ?

Jeanphi
jeanphi

Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: New Blender 2.5 exporter for LuxRender 0.7

Actually, if you've got exporting geometry working then you've done the perfect compliment to the luxblend25 that I have started

So far, I have written all the material editor and rendering settings panels, but nothing on the geometry side.

It would be nice to see both combined into a complete exporter/integration. It is worth noting that luxblend25 is still somewhat waiting for the pylux bindings to mature, however that part of the exporter could easily by swapped out for an lxs file writer.

I hope that some collaboration can happen here, rather than ending up with 2 divergent exporters

dougal2

Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

Re: New Blender 2.5 exporter for LuxRender 0.7

dougal2 wrote:Actually, if you've got exporting geometry working then you've done the perfect compliment to the luxblend25 that I have started

So far, I have written all the material editor and rendering settings panels, but nothing on the geometry side.

It would be nice to see both combined into a complete exporter/integration. It is worth noting that luxblend25 is still somewhat waiting for the pylux bindings to mature, however that part of the exporter could easily by swapped out for an lxs file writer.

I hope that some collaboration can happen here, rather than ending up with 2 divergent exporters

I totally agree with that. and I'm looking forward to see some testing 2.5LuxExporter release (having to learn Blender almost from the ground I didn't invest too much time in the "old" 2.4x, and since I tried 2.5 I'm so in love I simply cannot come back - yes I know most of the things only changed their "surface" from 2.49 to 2.50 but as a newbie I just thought it wasn't useful to get amused with the old fashioned app... and then change again)

funny the 2.5 exporter for SLG seems way ahead right now (but I can imagine SLG has a smaller amount of things to implement too...?)

anyways, keep up the great work guys... very appreciated
MacBookPro@2x2.4GHz/4Gb/OSX10.6.4 (Master) - P4HT@3.85GHz/2Gb/WinXP32 (Slave) - Blender 2.53 (.the.Jens.release.) | LuxRender 0.7 - SLG 1.6b2
SurfingAlien

Posts: 104
Joined: Fri Nov 27, 2009 11:52 am
Location: Italy

Re: New Blender 2.5 exporter for LuxRender 0.7

SurfingAlien wrote:funny the 2.5 exporter for SLG seems way ahead right now (but I can imagine SLG has a smaller amount of things to implement too...?)

699 lines of code (http://src.luxrender.net/luxrays/file/3 ... lluxgpu.py) Vs 7753 lines (http://src.luxrender.net/luxblend/file/ ... end_0.1.py), it is a bit simpler

Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: New Blender 2.5 exporter for LuxRender 0.7

SurfingAlien, you are kidding , right ?

Jens

jensverwiebe

Posts: 3429
Joined: Wed Apr 02, 2008 4:34 pm

Re: New Blender 2.5 exporter for LuxRender 0.7

of course yes, Jens... just forgot a "sarcastic" smiley in my post. I'm no programmer but even I can see (or "imagine") that
what surprised me is having a 2.5 exporter for SLG in such a short time, not that making LuxBlend for 2.5 takes longer.
and that's all, I really don't want to be misunderstood or hurt somebody (I appreciate so much all the effort and passion and time you developers are putting into this project!)

cheers,
Alessandro
MacBookPro@2x2.4GHz/4Gb/OSX10.6.4 (Master) - P4HT@3.85GHz/2Gb/WinXP32 (Slave) - Blender 2.53 (.the.Jens.release.) | LuxRender 0.7 - SLG 1.6b2
SurfingAlien

Posts: 104
Joined: Fri Nov 27, 2009 11:52 am
Location: Italy

Re: New Blender 2.5 exporter for LuxRender 0.7

Hey dougal2,

great work on the latest luxblend25 enhancements.

One thing I found is that self.wf() doesn't take "file" as argument (and therefore the script crashes/doesn't work):
Code: Select all
def attributeBegin(self, file=None):         self.wf(Files.GEOM, '\nAttributeBegin', file=file)
I just deleted that last "file=file" and it worked nicely.

I have one question about how I can give "integer indices" as argument, or how I can supply "integer indices []"
Code: Select all
def shape(self, *args):        self._api('Shape', file=Files.GEOM)

Doing simple
Code: Select all
l.shape('trianglemesh')
works for the tag, but the index, normal, uv and point arguments cannot be supplied to l.shape().

Thanks for helping out,
daniel / genscher
Genscher

Posts: 11
Joined: Wed Jul 02, 2008 7:30 pm

Re: New Blender 2.5 exporter for LuxRender 0.7

further parameters are passed as a list of tuples:
Code: Select all
l.shape('trianglemesh', [ ('indices', [0, 1, 2, 0, 2, 3 ... etc ...]), ('otherparam', 'paramvalue')])

or, in a different form as you can see in luxrender.__main__
Code: Select all
shapeparams = { 'indices': [0, 1, 2, 0, 2, 3 ... etc ...], 'otherparam': 'paramvalue'}l.shape('trianglemesh', list(shapeparams.items()))

dougal2

Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

Re: New Blender 2.5 exporter for LuxRender 0.7

Genscher wrote:
Code: Select all
def attributeBegin(self, file=None):         self.wf(Files.GEOM, '\nAttributeBegin', file=file)
I just deleted that last "file=file" and it worked nicely.

I was playing around with a mechanism to ensure that AttributeBegin/AttributeEnd code is written to the correct file (they can appear in the main file as lightsource definitions, or in the geometry file), I probably forgot to remove some old code or haven't finished it yet

It is looking likely that an extra method may be needed in the Custom_Context classes to switch the output file (of course, the implementation in pure_api will do nothing).

Ideas on how to achieve this without having to create useless extensions on the Context class would be welcome

As ever, this is all subject to change as we slowly discover the best way to make it work

dougal2

Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

Next