I've started writing a MAXScript exporter for Sunflow. It's not very advanced at the moment, and the code is a complete mess (which is why it's encrypted), but someone may find it useful...
What's in there at the moment:
All camera types
Point and directional lights
Primitives (sphere, torus, plane, teapot)
Everything else gets turned into a generic mesh
Shaders: all objects get a diffuse shader with the object colour
Support for single frames and animations
You can download it here: http://www.maxplugins.de/r9_files/sunflow/max2sunflow01.mse
I don't know how often I will be updating this, but I would like to get the sunlight stuff sorted out, add all of the options for the GI engines, and try and get materials sorted out. Eventually I will release the script UNencrypted, and then anyone can work on it.
I also need some help with the particle data-file format. If anyone has got a file they could send me, I can put that in as well (the Max side of things is already in there, I just need to know the format to save it to).
Fantastic work Dave!
About the particle file format - its quite simple:
just a flat binary file of xyzxyzxyz... for each particle center. Each coordinate is written as 32 bit float in big endian byte order. If its more convenient for you to write little-endian files via maxscript I'd be happy to add an option for that in the parser.
The number of particles to read is automatically determined by the size of the file. You can limit the number of particles to read by specifying "num <number of particles>" after the "filename" statement.
I'll be happy to put your script on the webpage or simply link to yours, whichever you prefer.
Great work once again!
thanks for the little-endian offer. If it's not too much of a problem, that would be great (unless anyone knows how I can do a little-endian to big-endian conversion in MAXScript). Feel free to put the script on the webpage if you want.
Forget the last post, I can do the conversion in Max now. I'll see if I can get the new script posted tomorrow.
I'll add the little_endian option shortly since it might help other people wanting to write their own particle exporters.
I've added particle export to the script, and zipped it all up with a couple of extra files needed for the endian conversion. The new version is available here: http://www.maxplugins.de/r9_files/sunflow/max2sunflow011.zip
Nice to see that there is finally a Max Script! Hope that many other programs will follow soon to make SunFlow even more popular :)
Another minor update, it fixes a few problems with transforms going wrong on some objects.
Nice work Dave! thanks for releasing a Max6 verison as well! :D
Testing it out right now. Latest Sunflow is a pleasure to use.
mmm, my geometry shows up half way stuck in the ground (I mean in the plane I'm using as floor). Anyone having a similar issue?
Hi Alvaro, can you send me a Max file that shows the problem, then I can fix it for you.
Sure Dave, it's a very simple scene but shows the problem right away:
scene here (Max6 version)
Thnx for lookin ginto it! ;)
PS. Dave, forgot to ask.
What light types are supported and which represents which in Sunflow? (I mean , which mould be a mesh emitter, which sunlight, etc etc)
I've fixed your problem. It happened because I always use Center creation for spheres and not Edge, which is what your scene used. You can download it here: http://www.maxplugins.de/r9_files/sunflow/max2sunflow013.zip
At the moment, all omni lights get converted to point lights, and any spotlights or directional lights (free or targeted) get converted to directional lights. The next step will be getting the sunlight system sorted out.
Great! Thanks for the fix. Downloading and testing now. Please keep us informed of any updates :D
It's great to see your script evolve gradually ;)
I've updated the exporter to v0.14, you can get it here: http://www.maxplugins.de/r9_files/sunflow/max2sunflow014.zip
Changes for this version are:
- Adds support for PFlow particle systems
- Adds all of the GI options for Sunflow
Christopher, maybe it would be better just to link to this thread on the front page, because I've been looking at my site-stats, and people are still downloading the old version that you've linked to, and not the newest version available here.
No problem. Will you eventually set up a little homepage for your exporter that I could link to directly (like for the XSI script) ?
Great work btw.
Nice! Thanks Dave! :D
Christopher, I've set up a homepage for the exporter that you can link to:
Perfect! I'll include it in the next update.
Time for another update :o)
This version (v0.15) adds photon settings, support for IES_Sun, mr_Sun and Daylight systems, and fixes a problem with particle export.
You can get it here: http://www.anidesign.de/sunflow/max2sc.htm
Nice! but the page doesn't load Dave :(
Could you still mirror it at Maxplugins.de?
Huh? It works fine here...
Just go to www.anidesign.de and click on 'Downloads' in the menu
This is so awesome!!! Thanks a LOT Dave!
By the way Dave: It fails when I try to open the .sc file into SunFlow right after exported from MAX 9... It seems like it puts the "Filter" setting into the "image" settings. Like this:
resolution 400 300
aa 1 2
Isn't it supposed to be left outside like this:
resolution 400 300
aa 1 1
Any ways; Great work Dave!!
PS: Any plans for the material editor as well? I hope you don't feel like im pushing, but I'm just so exited :)) and i just can't hide it :)
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.