(Re)Implement LuxMaya as python scripted plugin

Discussion related to the 'LuxMaya' exporter plugin for Autodesk Maya.

Moderators: Ratow, coordinators

Re: (Re)Implement LuxMaya as python scripted plugin

Postby Radiance » Sun May 11, 2008 12:53 am

hey,

nice work :)

you don't need to invert anything,
the transmission colours are not absoption colours like other engines...

greetz,
radiance
User avatar
Radiance
 
Posts: 3968
Joined: Wed Sep 19, 2007 2:13 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby dougal2 » Sun May 11, 2008 12:54 am

fair enough, i think i was just usiong inappropriate values.
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby dougal2 » Sun May 11, 2008 11:04 pm

progress report:

camera:
perspective and orthographic both working and FOVs calibrated, complete with shift lens parameters - thanks to zuegs' luxblend for the screenwindow code :)

bump / color / float value maps:
All implmented. (with 1 minor quirk in bump maps to tidy up later)

area (mesh) lights:
Done.
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby Radiance » Sun May 11, 2008 11:14 pm

nice progress :)

Radiance
User avatar
Radiance
 
Posts: 3968
Joined: Wed Sep 19, 2007 2:13 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby dougal2 » Sat May 17, 2008 10:44 pm

As a pre-requisite to making the texture nodes today, I undertook a little refactoring too.
The source tree now looks something like:
Code: Select all
\
|   luxPlugin.py
|
\---Lux
    |   luxexport.py
    |   luxlaunch.py
    |   luxshader.py
    |   luxview.py
    |   __init__.py
    |
    +---LuxExportModules
    |       Camera.py
    |       ExportModule.py
    |       Film.py
    |       Light.py
    |       Material.py
    |       Mesh.py
    |       MiscNodes.py
    |       Nurbs.py
    |       Rendersettings.py
    |       __init__.py
    |
    +---LuxMiscModules
    |       glRoutines.py
    |       __init__.py
    |
    +---LuxNodes
    |   |   LuxNode.py
    |   |   luxObjectLocator.py
    |   |   ShaderNode.py
    |   |   TextureNode.py
    |   |   __init__.py
    |   |
    |   +---ShaderNodes
    |   |       arealightShader.py
    |   |       carpaintShader.py
    |   |       glassShader.py
    |   |       matteShader.py
    |   |       mattetranslucentShader.py
    |   |       metalShader.py
    |   |       mirrorShader.py
    |   |       plasticShader.py
    |   |       roughglassShader.py
    |   |       shinymetalShader.py
    |   |       substrateShader.py
    |   |       __init__.py
    |   |
    |   \---TextureNodes
    |           fbmTexture.py
    |           wrinkledTexture.py
    |           __init__.py
    |
    +---MayaShaderModules
    |       lambertShader.py
    |       phongShader.py
    |       __init__.py
    |
    \---Mel
            AEluxshaderTemplate.mel
            lux_Gui.mel
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby dougal2 » Mon May 19, 2008 12:37 am

Taking this refactoring a little further, and thinking about the GUI I think there should be further structural changes to the exporter:

Re-write the GUI in python instead of mel, which means that the main luxexport routine doesn't need to be a MPxCommand, I think it can get called directly.
However, it should instead probably become an MComputation (which I've no idea how to implement yet), so that the user gets
a) feedback on progress
b) a mechanism to cancel the export

Really the only MPxCommand that we actually need to register is a little stub that creates the GUI.
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby dougal2 » Mon May 19, 2008 1:35 pm

After a bit of research I've discovered that _all_ MEL can be implemented in python :)
(well, I knew that already, but never tested it). One remaining thing to test is the implementation of AETemplates as python commands rather than separate MEL files. (I think this ought to work, the AETempate MEL files simply define a proc of the same name, no reason why that proc can't be a python MPxCommand ?? )

It may well end up that the only command regsitered in Maya is lux_gui() which makes the GUI window, all other functions used by the GUI (ie, luxexport and luxlaunch) can be called directly from the python library without registering them as commands in Maya.

Regarding the MComputation stuff, that's not quite the right approach, and it's an additional API call rather than a replacement for MPxCommand.
Instead I've implemented MProgressWindow which shows export progress and handles the Esc key interrupt from the user.
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby Radiance » Tue May 20, 2008 3:19 am

let me know when your first testing version is here and i'll try and drum up some maya users to help you out...

Radiance
User avatar
Radiance
 
Posts: 3968
Joined: Wed Sep 19, 2007 2:13 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby dougal2 » Tue May 20, 2008 10:00 am

It''ll be soon. The GUI is pretty much complete, I just been to plumb up some controls and it's about ready.
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: (Re)Implement LuxMaya as python scripted plugin

Postby dougal2 » Tue May 20, 2008 5:10 pm

I've just plumbed up all the GUI settings, and I think the exporter is just about useable.

Off the top of my head I think the only things that remain are:
- GUI options to set whether to export Maya perspective camera as lux perspective or realistic
- Add support for sunsky, infinite, distant, goniometric, and projection lights
- Add the remaining procedural texture nodes, and the blender ports (a big job this one)


I'm now ready for testers, I'll post a package with installation instructions later :D
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

PreviousNext

Return to LuxMaya (Autodesk Maya Exporter)

Who is online

Users browsing this forum: No registered users and 1 guest