PDA

View Full Version : Import Blender Fluids



clintonman
06-29-2013, 03:59 PM
115291
I created a script for importing the files generated from a Blender Fluids simulation and creating a sequence of lwo files. It's still in a rough state and thought I would ask for some advice/feedback.

The script reads the Blender .bobj.gz files to read the mesh and .bvel.gz file velocity data. Creates weightmaps and a morph target. I figure to animate the morph over 1 frame to enable motion blur.
It reads the particle files for type, position, velocity and size creating a particle cloud for the position. It creates a weightmap for the size, but I don't see any way to use it in layout with the hypervoxels. I chose to only import one type of particle and in fact I don't even know what the blender fluid particle types are. The velocity is ignored at this time. Maybe a morph target for the points can be created.

Does anyone have some Blender Fluids knowledge or some ideas as to how the whole process should work with respect to Lightwave?

The code can be found here:
http://www.clintons3d.com/plugins/lightwave/index.html

JohnMarchant
07-01-2013, 08:10 AM
Thanks mate

Greenlaw
07-01-2013, 10:46 AM
Thanks for creating this script! I really want to check this out soon. Let you know how it goes here.

G.

clintonman
07-10-2013, 09:10 PM
I updated the script and got the motion blur working for the fluid mesh and the particle mesh. The trick was to animate a null moving up in Y from frame 0 to 1, set post behavior to repeat and then use channel follower to make the morphs follow the null. Just a few more things to figure out then I'll make a more user friendly version of the script.

clintonman
07-14-2013, 04:40 PM
115615
It's done! As done as it's going to get anyway.
It's easier to use and I found out that the particle files aren't really needed. Their information is already used to add detail to the mesh files.
The script just has one major flaw in the form of a memory leak. The way around it is to set modelers undo levels all the way down to 1. The leak is still there but it's not as extreme as when the undo was set to 40 steps.

dee
07-15-2013, 06:07 AM
Can't get it to work in Modeler 11.5.1 x32. I've created the bin/Lib directory, extracted everything from python27.zip and renamed the zip. In Modeler I create a cube and assign a surface. Then I run the script, load a .gz file from the sim, let it run and get error code 2904. It creates two lwo's (fluidsurface_final_0000 and fluidsurface_particles_0000) and stops. The Console says:
import final mesh
import particle mesh
first frame = 0
last frame = 250

I've attached the first 5 frames from the sim.

clintonman
07-15-2013, 09:24 AM
It's fixed(I hope...). There was a leftover command I was using when trying to fix the memory leak. I noticed that your sequence looked inside out so I added a flip normals checkbox.

dee
07-15-2013, 03:09 PM
Works fine now, thanks for this nice script. :thumbsup:

If you don't mind I'd like to make some feature requeste that came into my mind while testing this:
- would be nice to have a indicator that Modeler is still working, maybe a small window that shows the number of the processed object
- is there a way to cancel the execution?
- a scale function to bring the lwo's into the right size

OnlineRender
07-20-2013, 06:38 PM
thanks

clintonman
07-21-2013, 05:23 PM
Works fine now, thanks for this nice script. :thumbsup:

If you don't mind I'd like to make some feature requeste that came into my mind while testing this:
- would be nice to have a indicator that Modeler is still working, maybe a small window that shows the number of the processed object
- is there a way to cancel the execution?
- a scale function to bring the lwo's into the right size
You must be a mind reader, because I'd also like to have the first 2 items you mentioned. It won't happen any time soon though. I have no idea how to make it work yet. Can you explain the scale request?

dee
07-22-2013, 08:38 AM
I made a simulation in Blender and it came in 100 times bigger than I wanted and the dielectric material properties didn't fit. So I thought it would be nice to have a scale factor so the lwo's are created the right scale. I could scale the null in Layout but having correct scaled lwo's is somewhat nicer.

I'm having some spikes in meshes which don't show up in Blender but in the lwo's. If you want to have a look at the particular frames just let me know and I'll PM you a link.

clintonman
07-22-2013, 11:52 PM
I made a simulation in Blender and it came in 100 times bigger than I wanted and the dielectric material properties didn't fit. So I thought it would be nice to have a scale factor so the lwo's are created the right scale. I could scale the null in Layout but having correct scaled lwo's is somewhat nicer.

I'm having some spikes in meshes which don't show up in Blender but in the lwo's. If you want to have a look at the particular frames just let me know and I'll PM you a link.
Scale will be easy to add. The spikes will take some work. I did some tests and the mesh imports properly without the spike but when saving the spike ends up in the lwo file. It happened for me in 4 frames out of 26. I think LW might be in an unstable state after the import.
You can fix it manually by using the Polygon Statistics panel to select the non-planar polygons and delete them and re-save the file.

Edit: I found a clue. Some of the triangles are classified as degenerate/non-planar when importing. If I delete them the file saved will load back in properly.

dee
07-23-2013, 08:37 AM
Cool! BTW, this "The material for the sequence can be changed in Layout by loading/creating an object in the scene with the same surface name and setting the surface editor to "edit by scene" instead of object. The object sequencer fluid will adopt the new surface settings." doesn't work for me, if I advance a frame the surface goes back to the saved stated. But there's this little helper: https://www.lightwave3d.com/assets/plugins/entry/surf-rep/

clintonman
07-23-2013, 06:43 PM
New update is done. It fixes the spikes, adds a scale factor and the default scale has been reduced by a factor of 100. Blender cm was importing as meters in LW. I also added progress indicators. I haven't tried the surface plugin yet, but it sounds useful.

cgb777
10-16-2013, 04:05 PM
Cool! BTW, this "The material for the sequence can be changed in Layout by loading/creating an object in the scene with the same surface name and setting the surface editor to "edit by scene" instead of object. The object sequencer fluid will adopt the new surface settings." doesn't work for me, if I advance a frame the surface goes back to the saved stated. But there's this little helper: https://www.lightwave3d.com/assets/plugins/entry/surf-rep/

Same thing happens to me. When I advance a frame, the surface goes back to the saved stated. Any fixes or am I missing something?

clintonman
10-16-2013, 09:50 PM
Same thing happens to me. When I advance a frame, the surface goes back to the saved stated. Any fixes or am I missing something?
I don't know. It still works for me. The only time the trick doesn't work is if I switch the surface editor back to object mode or if I edit the material while in object mode and try to switch to scene mode afterward. It also doesn't work if the fluid is the only mesh with that surface name. The second mesh has to exist as a kind of "holder" of the surface. Did you try the plugin that Dee mentioned?

cgb777
10-16-2013, 10:03 PM
I don't know. It still works for me. The only time the trick doesn't work is if I switch the surface editor back to object mode or if I edit the material while in object mode and try to switch to scene mode afterward. It also doesn't work if the fluid is the only mesh with that surface name. The second mesh has to exist as a kind of "holder" of the surface. Did you try the plugin that Dee mentioned? The link to that plug-in didn't seem available but I think I found the issue. By creating a dummy object in modeler with my srf applied, I then ran the script and it applied that dummy object's surface to all the created lwo files in the sequence. Any tips for the best way to shade the particle sequence? with hypervoxel sprites?

clintonman
10-16-2013, 11:31 PM
The link to that plug-in didn't seem available but I think I found the issue. By creating a dummy object in modeler with my srf applied, I then ran the script and it applied that dummy object's surface to all the created lwo files in the sequence. Any tips for the best way to shade the particle sequence? with hypervoxel sprites?
Yep, that's step 3 of the usage notes. The layout trick was for the case when you need to change the material after the fact.
I don't think the particles are useful. I found out later that they are included in the final mesh. Before I found out the particles were used in the mesh I tried hypervoxels, but couldn't get the materials of the particles and the mesh to match up properly.

EastCoastCreati
10-18-2013, 11:48 AM
I was pointed to this thread because I am looking for a plugin that will effectively import blender fluid sims into lightwave. I am a complete newbie to blender but I do have project that requires a fluid animation.

I cannot figure out how to install the plugin...can anyone please tell me what I need to do in step by step process

EastCoastCreati
10-18-2013, 09:47 PM
Figured it out

spherical
10-18-2013, 10:28 PM
Figured it out

Why do people do that? HOW?

EastCoastCreati
10-19-2013, 11:03 AM
Another question

I'm good all the way up to adding a motionmixer to the mesh object in Lightwave the only thing under the deform tab there is no motionmixer only morphmixer is that what it suppose to be used?

and no I have not figured it out that is why I am asking as I am stuck at this stage so any help would be appreciated :)

LW 11.6

EastCoastCreati
10-20-2013, 04:48 AM
Error message and eventual Modeler Critical Crash.

A basic water sim seems to work okay but trying to import another fluid blender files causes Error message and eventual Modeler Critical Crash.

the download scene is here
http://ww.areandres.de/download/fliudsim-hq-new.zip

Error Report
-------------------------
import final mesh
first frame = 0
last frame = 42
frame: 0
Fluids: Importing points... 876
Fluids: Importing triangles... 1748
G:/fluidsurface_final_0000.bvel.gz does not exist.
Traceback (most recent call last):
File "C:\Program Files\NewTek\LightWave11.6\support\plugins\scripts \Python\read_blender_fluids.py", line 686, in process
self.processFiles(i, mod_command)
File "C:\Program Files\NewTek\LightWave11.6\support\plugins\scripts \Python\read_blender_fluids.py", line 506, in processFiles
self.saveLWObject(self._fluidType, frame, mod_command)
File "C:\Program Files\NewTek\LightWave11.6\support\plugins\scripts \Python\read_blender_fluids.py", line 473, in saveLWObject
numselpoly = mesh_edit_op.polyCount( mesh_edit_op.state, lwsdk.OPLYR_PRIMARY, lwsdk.EDCOUNT_SELECT )
AttributeError: 'NoneType' object has no attribute 'polyCount'

----------------------------------------------------------

clintonman
10-20-2013, 09:25 AM
Another question

I'm good all the way up to adding a motionmixer to the mesh object in Lightwave the only thing under the deform tab there is no motionmixer only morphmixer is that what it suppose to be used?

and no I have not figured it out that is why I am asking as I am stuck at this stage so any help would be appreciated :)

LW 11.6
Yes, morph mixer. Sorry about that.

I tried to download the crash scene but all I get is a blank page.

EastCoastCreati
10-20-2013, 12:48 PM
the download file above is not a crash file it's actual blender scene I was trying to import the fluids after baking but that is when I got errors and eventual modeller crash.

Another issue I've discovered. using a basic scene setup with a cylinder and a emitter the cylinder is hidden in the Blender screen grab

The converted blender file is flipped and stretched in Lightwave

am I doing something wrong here.

1. generated blender fluid scene
2. open modeler
3. create a dummy object and apply textured as required
4. launch the python script
5. select the either the first final or first preview file
6. run script and wait to finish
7. once script is competed clear modeler scene
8 open layout and create null
9. import the first lwo file and parent to null and assign object sequencer
10. rotate null as require
11. scroll through the time line and the morph happens no problem but it stretch and flipped

EastCoastCreati
10-20-2013, 03:03 PM
I ran another basic fluid test and import to modeler/layout and the python converted object is still stretched. I can manual stretch it back to correct position in layout but the disadvantage is each frame has to be manually adjust..that's not fun :)

typo

the download scene is here
http://www.areandres.de/download/fliudsim-hq-new.zip

clintonman
10-20-2013, 11:49 PM
I ran another basic fluid test and import to modeler/layout and the python converted object is still stretched. I can manual stretch it back to correct position in layout but the disadvantage is each frame has to be manually adjust..that's not fun :)

typo

the download scene is here
http://www.areandres.de/download/fliudsim-hq-new.zip
Thanks for the sample. I made some changes based on it.

It does not try to process a non-existent velocity file if Generate Speed Vectors is not checked in Blender. Note that it needs to be checked to get motion blur in Lightwave.
Fixed the flipped mesh.
Controls for individual scale were added. Your fluid domain was scaled non-uniformly in Blender. Set the x scale to 1.5 to match your domain.

I think I found the reason that the surface couldn't be changed in Layout. The trick of using scene mode for the surface editor to change the surface does not work with nodal surfaces. If someone could point me in the right direction for saving and loading surfaces to a mesh, I can probably fix that issue too.

EastCoastCreati
10-21-2013, 05:29 AM
the test scene is not the one I have been using I only added that download link to show that not all blender scenes would not import. I am working on a different project with a simple emitter and container.

Thank you for taking your time to make these changes and looking into problem I seem to be having. this script is worth more than just a freebee you should have a donation button to PayPal on your site.

I have a suggestion, you've been updating this and other scripts based on peoples input could you maybe list all your plugins with a revision number like
so people who know when to download updates.

I've give the latest version a try later today.

EastCoastCreati
10-21-2013, 07:43 AM
Ijust got it DOH! I need to set the all the values for the Blender Domain, that worked.

Surfacing: being able to edit surfaces in layout would be nice...it can be done manual for each frame and it does not stick I need to render each frame one at a time fun stuff...I jus need to make sure my texture values are correct when setting up in Modeler. Test render in Layout to finalize texture values is an extra step then redo the modelr portion and reset up the scene, a few more steps but hey the import works which is awesome!!!!!!!!

What would be great if you could somehow be able to import objects (with motion path) with the fluids

the image is single frame. postioning the tank was not big deal as it is static throughout the anim. I was able to manually reposition and rotate to fit.

EastCoastCreati
10-21-2013, 02:09 PM
Still having problems in the Modeler Phase textures applied the dummy object (NO Nodes only Standard LW Textures) are still not being applied the converted lwo files when imported into Layout.

clintonman
10-21-2013, 09:28 PM
Still having problems in the Modeler Phase textures applied the dummy object (NO Nodes only Standard LW Textures) are still not being applied the converted lwo files when imported into Layout.
Does the surface show in modeler ok or is it only wrong in layout? Did you name the surface? If the name is "Default" maybe other objects with same surface name are interfering.

cgb777
10-22-2013, 04:29 PM
Here is the quick test I did. Pretty happy with the results and the import process was great with the script.


http://youtu.be/5FI73hHobIw

tyrot
10-22-2013, 04:35 PM
can somebody make a quick video tutorial? :) i am totally new to blender - and i need to learn just fluid stuff for a demo :)
a simple scene - starting from blender - using this plugin in lightwave ... thanks in advance:))))

JohnMarchant
10-23-2013, 01:20 AM
can somebody make a quick video tutorial? :) i am totally new to blender - and i need to learn just fluid stuff for a demo :)
a simple scene - starting from blender - using this plugin in lightwave ... thanks in advance:))))

I too would be very interested to learn the fluids in Blender to.

tyrot
10-23-2013, 03:31 PM
after couple of hours i got it work but i also have surface issue. in cageman's tutorial the plugin he was using has a feature called surf library for loading same surface at each frame..

i hope there is an easy way ... for surface update . i will use it with octane...

thankssss

Actually i followed other threads - this program is very helpful and worked with Octane materials too..!

http://www.mediafire.com/download/go4z7w79d7rzd24/surfrep.zip

tyrot
10-23-2013, 06:23 PM
Also i really have a big problem with workflow.

1- In lightwave i have a basic scene : A character holding a bottle and filling the glass with water.

2- I baked the translation of bottle as MDD and export it to Blender using (built in) LWO and MDD loaders.

3- LWO is good but when MDD kicks in rotation goes bananas.

4- Also how i can attach IN FLOW object into top of bottle ?

can somebody guide me ?

EastCoastCreati
10-24-2013, 06:35 PM
Still problems with surfacing, re-tried both ways

1. adding surface to the default
2. adding new surface tot he object

both result in LW critical crash I sent the report to your email address hope you receive it.

I have an alternative way to use Blender fluids at this point

1. once the blender scene has baked export to obj select animation and any other attributes you require. I only need the objects
2. once it's exported as obj import the first obj file into layout
3. under properties select go to Object Displacement and chose object sequencer
4. scroll through the time and the fluid flow
5. in order to surface you need "IL Save Transformed Object Sequence ls script but I have yet to find it it's an older script" which is used in Modeler.

- - - Updated - - -

@CGB that is not a quick setup...took awhile to produce that scene, looks more like a full blender scene render than a lightwave import...either way it looks great nicer work

cgb777
10-24-2013, 06:52 PM
@CGB that is not a quick setup...took awhile to produce that scene

Nah, not too bad at all. Took literally seconds to setup in blender. Domain box, volume box, sphere primitive with a handful of keyframes moving it to intersect the volume. Used the default settings in blender for the water domain, only changed the subdivisions to 2 and tracer particles to 1 (not even sure what they do).

From there, took an hour or so to run the simulation at a res of 100.

Opened modeler, created a dummy object (ball) with the Default surface name, applied my water texture to the dummy object, ran the python script, pointed it in the direction of the water cache from blender, and then it created a lwo sequence from the cache data with the Default name for each frame of the water being what I set on the dummy object.

Open layout, set 1 area light, load lwo sequence, import fbx data for the ball's motion, turn on caustics, render.

Took maybe two hours to render 210 frames across 8 mac minis. 1280x720 1 - 5 passes adaptive 0.03 oversample 0.15

I'm currently in nightmare client mode but will upload my files when I get a sec if you want to pick them apart.

EastCoastCreati
10-24-2013, 07:30 PM
no need to upload

I am doing the same as you but the script is crashing LW 11.6 wonder if that is the problem? and when it does work the textures are not applied..is there a limit if number of object this can handle as I am importing 300

clintonman
10-24-2013, 07:52 PM
no need to upload

I am doing the same as you but the script is crashing LW 11.6 wonder if that is the problem? and when it does work the textures are not applied..is there a limit if number of object this can handle as I am importing 300
I've been using LW 11.5.1 so I'm not sure if that's a factor or not. Did you set Modeler undo levels to 0? If not the script will eat up your memory and probably cause a crash. How is your surface defined? I've only done very simple surfaces and a simple diffuse texture test.

I'll try LW 11.6 to see if that's the problem.

EastCoastCreati
10-24-2013, 08:21 PM
yup forgot I had change it back last night for another project thanks

clintonman
10-26-2013, 11:26 PM
I made a small update to the UI. It has a yes/no question at the top as a reminder to set the undo level down.

Just finished a Layout script that will copy the surface of one object to a sequence of objects. Most of the time it works, but it will randomly crash Layout and it only works when the Object Replacement is not active. It has to be set to none while changing the surfaces. I think that's as good as it can get since the script uses a few undocumented commands from the SDK. My original plan was to directly load the surface definitions from a file, but the result of those commands immediately crashed Lightwave.

cgb777
11-01-2013, 08:57 AM
Here is another test I did, this time shading the particles with hypervoxels.


http://youtu.be/pKSdpVAInG8

Greenlaw
11-01-2013, 09:16 AM
Some nice tests being shown here. Wish I had been paying more attention earlier because I can use this for the job I'm on now. I'm getting inspired to study Blender once things settle down a bit--seems like a great 'plug-in' for LightWave. ;)

Clintonman, thanks for creating the script, and thanks to everybody else for testing and showing your results.

G.

clintonman
11-06-2013, 08:28 PM
I found the reason for the crash in the sequenced object surface script. The sequence object was changing the name of the item even after it was set to None and that name change was enough to cause the crashing. Now, the script has an error message to avoid it. The script has also been updated to work with other object sequences besides just "lwo" files. That part of the script is untested though.

clintonman
11-08-2013, 05:03 PM
Another quick update. The crash caused by the sequence object name is fixed and the sequence does not have to be turned off while the surfaces are updated. Also added a monitor dialog with an abort button. This should be the last version of the script until I find a way to directly load surfaces from disc without crashing.

clintonman
11-19-2013, 10:13 PM
The changes in the final release version of Lightwave 11.6 broke the script. It's fixed now, so come and get it. I'll repeat the page link here for convenience.
http://www.clintons3d.com/plugins/lightwave/index.html

Greenlaw
11-19-2013, 11:40 PM
Thanks again for continuing to develop and support this script! :thumbsup:

G.

allabulle
11-20-2013, 01:56 AM
Thank you so much, Clinton.

Dodgy
11-20-2013, 04:17 PM
Why do undo levels have to be set to one Clinton?

clintonman
11-20-2013, 09:16 PM
Why do undo levels have to be set to one Clinton?
Because the script eats up memory like crazy when undo is set to it's normal value. I don't know why or how to get around it.

Dodgy
11-20-2013, 10:49 PM
Have you tried using the 'undogroupbegin();' and 'undogroupend();' commands? Wrap them around anything that does multiple undos and it makes it into one undo function, very clean for the user.

clintonman
11-20-2013, 11:34 PM
Have you tried using the 'undogroupbegin();' and 'undogroupend();' commands? Wrap them around anything that does multiple undos and it makes it into one undo function, very clean for the user.
Yep, tried it, but it didn't make any difference. If I set it for the whole thing the memory gets eaten and if I try it on a portion of the code the memory still gets eaten up. I think I need to create a simpler test case to see if those commands would work for me or if I'm just doing something wrong.

clintonman
12-03-2013, 10:37 PM
Made some more changes.

The prefix for the lwo files can be set to a custom name so that more than one fluid sim can be loaded into a scene.
Particle files have weightmaps for the vertex velocity. This was only in the fluid mesh before.
New option to save the 3 types of particles to their own sequence files.

allabulle
12-04-2013, 07:54 AM
Nice!

zapper1998
12-04-2013, 10:41 AM
oh wow
how did i miss this thread
wow
thanks

Mike

Greenlaw
12-04-2013, 01:58 PM
Thank you for continuing to support this tool. I think I will be able to use it on my next two gigs, so this tool is very much appreciated. :)

G.

clintonman
12-08-2013, 11:52 AM
Did somebody say tutorial?

I just finished my first Lightwave video tutorial. The subject is "Blender Fluids for Lightwave". I hope you find it useful and don't be shy about telling me what I did wrong or how I can improve for any future tutorials.

http://www.clintons3d.com/tutorials/blenderFluidsForLightwave.html

Greenlaw
12-08-2013, 11:55 AM
Thank you! I am going to try out this week and your tutorial will be very helpful. :)

geo_n
01-26-2014, 11:33 PM
Thanks for making this. And the tutorials are really great and easy to read the buttons.
I finished watching it and have one question. Is there any issue if the scene in blender was rotated to match the lightwave scene? Its a bit akward to work with a tilted scene in blender.

erikals
01-27-2014, 12:19 AM
very nice!

wonder, is this SPH fluids?

is there two types of fluids in Blender?
SPH and Particles?


---------------------------------------------------
(self-note) http://forums.newtek.com/showthread.php?138766-SPH-fluid-simulations&p=1354124&viewfull=1#post1354124

Greenlaw
01-27-2014, 12:35 AM
I think they're two different systems: http://www.youtube.com/watch?v=ZrLl07d57hc

allabulle
01-27-2014, 07:10 AM
Thanks for the tutorial and for taking the time to present it well, documented and with download links. Much appreciated!

erikals
01-27-2014, 02:54 PM
Thanks for making this. And the tutorials are really great and easy to read the buttons.
I finished watching it and have one question. Is there any issue if the scene in blender was rotated to match the lightwave scene? Its a bit akward to work with a tilted scene in blender.

i thought about this too,
but then again, it's just a matter of rotating the perspective view in Blender... > Fixed

http://erikalstad.com/backup/misc.php_files/smile.gif

--------------------------

by the way, excellent tutorial Clinton, just watched it... http://erikalstad.com/backup/misc.php_files/king.gif

geo_n
01-27-2014, 05:36 PM
i thought about this too,
but then again, it's just a matter of rotating the perspective view in Blender... > Fixed

http://erikalstad.com/backup/misc.php_files/smile.gif

--------------------------

by the way, excellent tutorial Clinton, just watched it... http://erikalstad.com/backup/misc.php_files/king.gif

It might not be as simple as that. If it was Clinton would have done it in the video and not worked on a tilted scene. Blender and lw have different coordinate systems.

erikals
01-27-2014, 05:45 PM
some apps have limits, Maya for example can't roll over the Y channel (a hassle when modeling!)

but should be easy in Blender, just roll the Camera or the Perspective on the Bank/Pitch...

geo_n
01-27-2014, 06:39 PM
Its not the rolling limits in y I'm concerned with. The fluid sim is a physics engine following real world physics. If the scene is tilted thats something. If you rotate the scene itself to correct the orientation this could lead to I/O mismatch with lw. No time to r and d and still using splotchdogs plugin currently.

erikals
01-27-2014, 07:01 PM
no, just rotate the Camera, then rotate it back when the simulation is done. should work just fine.

----------------------------
what's nice about splotchdog's btw is the ability to subpatch the mesh. nice for adding displacements later on.

clintonman
01-27-2014, 07:54 PM
Thanks for the feedback and encouragement. It's always good to hear people find your work useful or at least interesting.

If there is no animation (only one key at 0 time) in the scene exported from Lightwave it will import to Blender in the expected orientation. That's to say up will be up. If this is the case be sure the fluid domain is at (0,0,0) and 0 rotations in Blender before running simulation. When importing back into Lightwave parent the fluid to a null and rotate null -90 in pitch and 180 in bank. That should make it line up with the scene.

If there is animation that interacts with the fluid then it gets more involved. I only have a vague idea how it would be done. The scene would be imported with keyframes like in the video and the scene would be parented to a empty. The empty would be rotated to make up, up. Then the scene items would somehow need to be unparented, but keep the world animation as if it was still parented. You want it unparented because the fluid sim has limitations when applied to parented items and armatures. You would need to use some kind of Blender equivalent of follower maybe drivers along with key baking to capture to keyframes.
So you would have to know what direction is best to rotate the null, how to use drivers feature and how to bake a curve in Blender. This is why I left the scene on it's side. A lot more to learn/figure out and more steps in the whole process.

Sebasvideo
02-12-2014, 12:40 AM
I'm eager to try this tutorial. Just a quick question, the scene in the tutorial, it's not available for download, is it?

Sebasvideo
02-12-2014, 05:43 AM
I reproduced the scene as best as I could, but I ran into a few problems, although I still haven't finished all 5 videos, but I already ran the sim and imported back into Lightwave. One problem I had was that that "sink" item, that had to be designated as an outflow, would crash Blender each and every time after baking frame 129. I don't know why I had a feeling that might be the problem, so I unassigned the fluid property and it baked all the way through and much faster.

Another issue I had is that the sequence is 15 frames off when brought into Layout. The offset can be adjusted so it's not a problem, I'm just curious as to why it happened to me but not to Clinton. And the other problem is that it came much smaller, I had to resize it so it would take the same space it was supposed to.

But really cool tutorial, it took me a couple of tries because I don't know Blender at all, and actually I really dislike the interface, but being able to do fluids that look so real is great, especially if I can bring them back into Lightwave, and perhaps Modo at some point.

EDIT: actually, now it's crashing Blender every single time right after frame 129, no matter how light the sim settings are. Evidently something went bad with my scene, but I'll build something easier now that I know the principles.

clintonman
02-12-2014, 10:29 AM
Don't know why it would crash at a specific frame but the size problem is from scaling. If the domain is scaled that scale does not make it into the fluids files. So be sure the domain scale is 1,1,1 location 0,0,0 and rotation 0,0,0.

I think I recall having crashes if the collision is set to volume instead of surface.

I added the scene file to the page.

Sebasvideo
02-12-2014, 10:42 AM
Actually the first time I ran it with no scaling, and everything at 0, but that sent the domain below the container. Of course this was my scene that I tried to copy from yours with my not so great handling of Modeler so I'm sure now that I got your scene it should go fine.

Sebasvideo
02-12-2014, 11:01 AM
Just curious, because I don't know any Blender, but can somebody explain to me why the scene gets imported into Blender rotated 90 degrees, but the Y axis shows parallel to the grid?

clintonman
02-19-2014, 10:03 PM
New update:

Includes the version number in the dialog title
New minimum particle size field to remove the tiny particles that don't add anything to the result. It also makes the result closer to what would occur inside Blender and fewer particles is faster so that's good too.

Sebasvideo
02-21-2014, 09:47 AM
This didn't come out exactly as I intended it to, but I wanted to show it here anyway so you guys get an idea of how great this set of tutorials and scripts are. This is not the project in the tutorial, I learned from it and I used it on another tutorial for Blender, which then I imported into Lightwave using Clinton's script. I surfaced it in Lightwave also using the sequence surface loader script.

Here's the video: http://youtu.be/y7OhklHGg18

I know the small pools of water are jittery, that's something that they still didn't get quite right in this simulator, but of course it's free and the alternatives are Houdini and Realflow, both $4,000 (or learning editions at $100 that you can't use for any commercial purposes).

The invisible thing in the middle is supposed to be my name, which is an idea from a tutorial for Blender (http://youtu.be/2c5zp32QQB4) but I wanted to make it more splashy so I animated the virtual faucet. Unfortunately that rendered the text too difficult to read. But well, it looks cool anyway.

Thanks to Amleto render manager and some ancient machines I was able to render this in a few hours rather than a whole day.

Greenlaw
02-21-2014, 09:55 AM
Even with the few errors you mentioned, that looks pretty neat!

G.