Max exporter

Discussion related to the exporter plugin for Autodesk 3ds Max.

Moderators: Ratow, hedphelym, coordinators

Re: Max exporter

Postby losbellos » Wed Jul 08, 2009 9:26 am

yes, that was the problem.
Anyway thanks for the help, uvw looks fine with your code.
losbellos
 
Posts: 783
Joined: Wed Jun 24, 2009 4:59 am

Re: Max exporter

Postby PerPixel » Wed Jul 08, 2009 9:06 pm

New release

Its much easyer that I tought it would be. I'll keep adding more LuxRender material and texture but next thing I want to add is Area light.

Here my road map for the week,

Area light
Glossy Material
Metal Material
Glass Material

I also keep working on the C++ plugins that replace the render dialog. It make it possible to select LuxRender as a renderer from the render option and also render the materials preview with LuxRender. Its also much faster.

Material support: Matte
Texture Map support: Constant, Checkerboard, Image
Light support: point light
Render settings support: default

Install
1. Copy the script and plugins folder to your max folder.
2. Edit the LuxRender.ms from the script folder to match your installation.

Usage

1. model something
2. add a point light
3. add a material to you object and chose a material type starting with LR ex: "LR Matte"
3.a. Add a Texture map using one of type LR ex: "LR Constant"
4. Set perspective viewport or a camera. Make sure its active
5. Execute the LuxRender script
Attachments
lr_max01.jpg
LuxRender Max.zip
(3.95 KiB) Downloaded 100 times
PerPixel
Developer
 
Posts: 107
Joined: Fri Jul 03, 2009 7:13 am
Location: Montreal, Canada

Re: Max exporter

Postby klemar » Thu Jul 09, 2009 11:33 am

Thanx for script, perpixel, my script developing is stopped when I fight with maxscript manual for export geometry.
perhaps I can help with the development of some parts of the script?
klemar
 
Posts: 15
Joined: Sat Dec 01, 2007 10:42 pm

Re: Max exporter

Postby Radiance » Thu Jul 09, 2009 11:53 am

how about i open a max exporter development forum, and we open a HG source repository on our lux repo ?
like this you can all work together and create a neat exporter for max...

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

Re: Max exporter

Postby PerPixel » Thu Jul 09, 2009 12:14 pm

Give me some more time to get all the pieces together and then we can share development. I'm moving so fast right now and soon people can just take the matte material for example and extent it to metal or something.  Got the area lights done also :) I wish I could post here from my office computer but security is tight.... I had a very productive lunch hour.
 
PerPixel
Developer
 
Posts: 107
Joined: Fri Jul 03, 2009 7:13 am
Location: Montreal, Canada

Re: Max exporter

Postby PerPixel » Fri Jul 10, 2009 4:28 am

This update add the area light material. Apply it to a mesh.
Attachments
luxrender_3ds_area.jpg
LuxRender_Max.zip
(4.13 KiB) Downloaded 97 times
PerPixel
Developer
 
Posts: 107
Joined: Fri Jul 03, 2009 7:13 am
Location: Montreal, Canada

Re: Max exporter

Postby klemar » Fri Jul 10, 2009 7:07 am

Code: Select all
   format "Camera \"perspective\" \"float fov\" [45]\n" to:tmpLxs   
   format "Film \"fleximage\""    to:tmpLxs   
   format "\"integer xresolution\" [%]" renderwidth to:tmpLxs   
   format "\"integer yresolution\" [%]" renderheight to:tmpLxs   


My 2 cents :) code for width and height from 3dsmax render settings.
I looking for info on camera fov and instances.
klemar
 
Posts: 15
Joined: Sat Dec 01, 2007 10:42 pm

Re: Max exporter

Postby PerPixel » Fri Jul 10, 2009 7:12 am

If you can make a function that return the camera string that would be great. Need to get the active camera from the render panel. Need to write the render preset from luxblend also.
PerPixel
Developer
 
Posts: 107
Joined: Fri Jul 03, 2009 7:13 am
Location: Montreal, Canada

Re: Max exporter

Postby klemar » Fri Jul 10, 2009 7:26 am

maybe this code?

Code: Select all
fn dumpcam = (
   for c in cameras do  (
      if iskindof c camera do (
         format "LookAt   % % %\n   % % %\n   % % %\n\n"  c.position.x c.position.y c.position.z c.target.position.x c.target.position.y c.target.position.z  (c.position.x*(-1)) (c.position.y*(-1)) (c.position.z*(-1)) to:out_file_scene
   format "Camera \"perspective\"" to:out_file_scene
   format "   \"float fov\" [%]\n" c.fov to:out_file_scene
     format "   \"float screenwindow\" [-1.000000 1.000000 -0.750000 0.750000]\n\n" to:out_file_scene
      )
   )
)


I have idea that we can not do the processing instance, a to do something like mr proxy or vray proxy, when lxs model will be loaded through the scripted plugin modifier.

Little macro for for ease of launch script from toolbar:

Code: Select all
macroScript Macro_LR category:"Luxrender" buttontext:"LR Render" tooltip:"Render in Luxrender"
(
on execute do (filein "LuxRender.ms")
)
klemar
 
Posts: 15
Joined: Sat Dec 01, 2007 10:42 pm

Re: Max exporter

Postby losbellos » Mon Jul 13, 2009 1:55 am

Hej, just a note to your code, especially in the geometry export. Dont use functions in it. It will greatly slowing it down. Also, You will have to write the data out in smaller chunks, because on bigger models, and scenes, itt will be very slow, or fail. Furthermore, using - dotnetobject "System.ComponentModel.BackGroundWorker" you can have few threads exporting it, this way you could get full use of multicore processors, but minimise the use of the arrays (doesnt work well with multithreading)
Have one background thread as a manager, then while you export max will not hang.
losbellos
 
Posts: 783
Joined: Wed Jun 24, 2009 4:59 am

PreviousNext

Return to LuxMax (Autodesk 3Ds Max Exporter)

Who is online

Users browsing this forum: No registered users and 1 guest