[Closed] obj seq importer
Hey all, I want to use this old script in 3dsmax 2010 but it return errors.
Can anyone helps?
The aim is to import Blender fluids in 3ds max.
BlendtoMax_float = NewRolloutFloater “Blender Fluids to Max v.1” 160 550
(
local object_list = #()
local object_names_list = #()
rollout Import_roll “Import Obj Sequence”
(
button import_btn “Import”
progressbar import_prog color:red
on import_btn pressed do
(seqpath = getSavePath caption:"Import Obj Sequence Folder" files = getFiles (seqpath+"\*.obj") sliderTime=0 animationRange = interval 0 files.count importper=files.count objectname = 0
for f in files do
(
objectname = objectname +1
–import current file in array files
importFile f #noPrompt
–set object name to framenumber
$.name = “Fluid” + (Objectname as string)
import_prog.value = 100.0*objectname/importper
)
)
)
addRollout import_roll BlendtoMax_float rolledUp:false
rollout objects_roll “Object selection”
(
button mult_btn “Pick All Objects” tooltip:“Pick all the geometry in the scene.”
listBox objects_lbox “” items:object_names_list height:5
button remove_all_btn “Remove all” tooltip:“Remove all objects from list”
on mult_btn pressed do ( local obj = selectByName title:"Select objects for Auto ID" single:false if obj!=undefined then ( for i=1 to obj.count do( append object_list obj[i].inode.handle append object_names_list obj[i].name objects_lbox.items = object_names_list ) ) )
on objects_lbox doubleClicked num do ( deleteItem object_list num deleteItem object_names_list num objects_lbox.items = object_names_list )
on remove_all_btn pressed do ( object_list = #() object_names_list = #() objects_lbox.items = object_names_list )
)
addRollout objects_roll BlendtoMax_float rolledUp:false
rollout create_roll “Create Animation”
(
button create_btn “Create” tooltip:“Create Animation”on create_btn pressed do ( undo "Add Object" on ( local animframe = 0 for i=1 to object_list.count do ( FluidObj=maxOps.getNodeByHandle object_list[i] selectKeys geometry (0) deleteKeys geometry #selection animate on ( animframe = animframe at time animframe FluidObj.scale=[0, 0, 0] animframe = animframe+1 at time animframe FluidObj.scale=[1, 1, 1] animframe = animframe+1 at time animframe FluidObj.scale=[0, 0, 0] animframe = animframe-1 )
)
) ) )
)
addRollout create_roll BlendtoMax_float rolledUp:false
rollout Import_roll “About This Script”
(
label lab1 “Created by Mark Theriault”
label lab2 “www.PartiallyFrozen.com”
)
addRollout import_roll BlendtoMax_float rolledUp:false
Hi loran,
I used this script in Max 2010 several months ago for an in-house test and it worked all right. I copied/pasted the whole thing to the script editor and ran it by selecting all and executing with Alt+E. Menu opens and it should work from there.
Does it return errors on importing or doesn´t even the window open? Did you use the Python script to export the Blender fluids correctly? I don´t have the fluid data anymore to test the script, so you´ll have to tell us a bit more about your errors.
Cheers
Chris
I think this should work:
http://www.youtube.com/watch?v=5PY9b62TDo8&
I’m also trying to get blender fluids into max, but having my own problems with it.
Did you use the new alpha 2 for simulation and if you did, how did you export the fluid from blender. None of the scripts I’ve tried so far work.
The 2.49 seems to export .obj sequences but when imported to max, all I got was the bounding boxes of fluid meshes.
Thank you Berglte for this link! this script look cool and works fine in 2010
I just don’t know how to launch the python exporter in blender
I know its off topic but can you help me dunkelzahn?
Phew, from the back of my head, you´d need to have some sort of Python enviroment installed, but I think that comes standard with Blender. Then there has to be some sort of scirpting window, that you can open/activate from the GUI. You would just run the Python script that you can download from the website and receive a bunch of OBJs to process into Max.
Don´t get your spirits too high. Our results weren´t that good (massive file sizes, bad quality) and we decided against it. Currently checking out Glu3D and RealFlow for that reason ;). However, if you got a radical machine and can set the Fluid matrix size higher than the standard values, then you might just geht what you want.
Anyway,
Have fun
Chris
Yup, that´s how it goes. It´s just a huge mountain of meshes merged into your timeline. Alle meta/simulation data from Blender gets lost in the export/import process.
I mean something went wrong in the exporting process. Instead of the generated fluid meshes it only exported the bounding boxes of them. But I propably just have missed a checkbox somewhere.
Originally Posted by dunkelzahn
Don´t get your spirits too high. Our results weren´t that good (massive file sizes, bad quality) and we decided against it.
Some guys make amazing thing this way (Blender fluid to 3dsmax) :
http://www.youtube.com/watch?v=3xjsAL0zB-I
I just can’t see the python script from the Script window in Blender 2.49 ://
The is a new exporter in Blender 2.5 but when I check the Animate check box It doesn’t work…
Been a long time since that script was hacked together. I haven’t even used it since it was written. I haven’t really heard much back from people using it. I am sure there is a better way then what the script does to get the fluid sims in. Not sure how.
I know one production shop that used it once. It was for a blood drop.
Glad to see its still got legs!
Enjoy!,
Mark