Vous êtes sur la page 1sur 9

:: connectivity with Maya ::

Maya plugins:
Installation If you have previous versions of the Maya RealFlow plug-ins you have to get rid of them. Please note that no previous versions exist for Maya Mac OS X. Just remove the following lines from /Maya/scripts/startup/userSetup.mel:

o o o o o

source source source source source

Realflow_Mesher_panel.mel; SceneData.mel; Realwave_Surface.mel; RealwaveFloatingObject.mel; RealflowParticleLoader.mel;

To install the plug-ins, uncompress rf_plugins_mayaX_X_win.zip (or rf_plugins_mayaX_X_Linux.tar.gz for Maya Linux or rf_plugins_mayaX_X_OSX.sit for Maya Mac OS X). You will have the files listed previously. Copy all the *.mll (or *.so) files to /Maya/bin/plug-ins, and all the *.mel files to /Maya/scripts/others except AERealflowEmitterTemplate.mel, you have to copy this file to /Maya/scripts/AETemplates. In the case of Maya Mac OS X you have to copy the *.bundle files to /Users/Shared/Aliaswavefront/maya/plug-ins and the *.mel files to the folder /Users/Shared/Aliaswavefront/maya/scripts. Copy the *.bmp (or *.xpm) files to /Maya/scripts/others. Or in the case of Maya Mac OS X copy them to /Users/Shared/Aliaswavefront/maya/scripts. Finally activate the plugins in the Plugin Manager in Maya go to Window>Setting/Preferences>Plug-in Manager.

Use

Once the files have been placed in the correct folders, the RealFlow plug-ins can be accessed from the main menu toolbar under the Next Limit tag, on the right of the main menu. The exception is the SD import/export options that now will appear when you try to Import/Export via the Maya menus. These plug-ins allow the following:

o o o

Export a scene with animated polygonal objects to the RealFlow environment: sdTranslator. Import a RealWave mesh: sdTranslator. Import the objects dynamics exported from the RealFlow environment: sdTranslator.

o o

Import a fluid mesh sequence in Maya: REALFLOW Mesh Loader Import RealFlow particles in Maya: REALFLOW Particle Loader

The way to work with RealFlow and Maya is straightforward. First of all export your Maya animated scene to RealFlow using the SD format (this new format will appear as another file filter in the Maya Export window). In RealFlow import this scene by pushing the SD icon. Add your emitters and meshes to the RealFlow scene. Export particle data and meshes by saving it in separate folders (.bin sequences of particle and meshes files). Once the fluid simulation0 has been calculated, use RealFlow Mesh Loader in order to bring mesh surfaces to Maya. You can also import Realflow particles in Maya by using RealFlow Particle Loader.

:: Maya to RealFlow ::
Exporting objects
RF supports obj file format. This file formats can be saved from Maya but there are some limitations:

o o o o

Only polygons are allowed. All polygons must be 3 sided polygons, so quad or more than for side polygons must be triangulated. Subpatched objects are not allowed (supported by sd file) All uv maps will be ignored (supported by sd file)

Those objects can be animated in RF and bring back the animation into Maya using the sd loader

Exporting SD ( sdTranslator): Objects, textures & camera


This plug-in allows the user to export scene data to RealFlow environment. But before we have to take in account some importantes: Only polygons are allowed. All polygons must be 3 sided polygons, so quad or more than for side polygons must be triangulated. To triangulate the objects go to the MODELING Maya menus and click the menu "Polygons->triangulate" while the objects are selected. Subpatched objects are alowed. All objects must contain uv maps are alowed. Only one camera will be exported both in "All" and "Selected" mode. IMPORTANT: The camera exported will be the active in Maya interface Viewport, so don`t try to do multiple selection for more than one cameras, always will be exported the active in Viewport. One-node and three-node animated cameras are converted internally in two-node camera for Real Flow.

Exporting to Maya The scene data exported is the objects geometry and the objects animation. You can export just the selected objects or export all the objects in the scene. It is very important to have the objects triangulated. If the object is not triangulated the plug-in will complaint and the object/s not triangulated wont be exported. Be sure your names objects wont be duplicated, this is very common when groups of objects in Maya are duplicated. If you are going to use your exported geometry to create the wet/dry effect in RealFlow you have to create a "File" node texture first and apply it to your geometry for instance to color. When you simulate dynamics with objects from Maya, be sure to ungroup the objects to avoid importing animations with offsets. This is because RealFlow does not support hierarchies and so it is best to export the objects ungrouped and freeze transformations of them to reset their space coordinates.

If you have a deformed geometry and you want to export that geometry you have to explicitly set the "Export Deformation" checkbox that you will find in the "Export Selection Options" dialog box. In the next image you can see the specific options for the "sd" format.

To export to the SD format go to the "File->Export All" or "File->Export Selection." Maya menus. Select the .sd file filter and select the target folder and filename. Exporting skinned surfaces Maya objects are composed of two nodes: the transform and shape node. To transfer the velocity to the object vertex you need to select the shapeNode of your object and then go to Edit>Key>Bake Simulation, and all vertex will be keyed automatically. Then export the object. To check if your object has this information in RF, press Ctrl+Alt+Shit+V and you should be able to see the vectors.

:: RealFlow to Maya ::
Importing SD ( sdTranslator): Objects, textures & camera
This plug-in allows the user to import scene data to Maya scenes. You also can import information related to animation of objects from RealFlow. RealFlow have the wave simulator RealWave integrated, the wave simulation is now exported as a SD file and you have to use this plug-in to import that information into Maya. Importing into Maya You can import new objects or animation for objects already existing in Maya. The plug-in uses the object names to detect if an object is present in Maya or it is not present and have to be created. At this moment, only SD files exported with RealFlow are valid. If you try to import a SD file created, for instance with Maya, the plug-in will complaint and show you a message about it.

To import a SD file first you have to be sure you have in the scene the objects you want to update. You don't need to select those objects because the sdTranslator will find the objects by name. If the plug-in don't find an object that should be updated it will inform you via dialog box. To import a SD file go to the "File->Import." Maya menu. Select the .sd file filter and browse the file you want to import. Importing cameras into Maya Importing cameras is a little tricky. It is possible that the camera from RF doesn't exist in your Maya scene, so you can do it in two ways. The first one is to have a camera with the same name as in RF so when you import the camera the animation data will be transfered to the maya's one. The second one is to create a new one of one-node type that we will constraint in position and rotation, using the toolsin Contraints>Point andContraints>Orient.

Importing particles: Particle Loader

A lot of improvements have been made on this plug-in. Users of the old version will notice a great difference in the using of this new one. One of the main features of this new version is that you can load different particle sequences using the same emitter node. Just with a few mouse button clicks you will have in Maya all the particle sequences you have in your RealFlow scene. Another major feature is the collection of particle attributes that are accessible. These new particle attributes are: viscosity, density, pressure, mass, temperature, normal vector and force. The meaning of all the attributes is clear by name, except "normal vector". "Normal vector" cancel when a particle is surrounded by other particles and point to the surface when that particle is near the surface. You can access those attributes in Maya using their names: rfDensity, rfPressure, rfMass, rfTemperature, rfNormalVector, rfForce, rfViscosity. Launch the plug-in by clicking in the "Particle Loader" menu under the "NextLimit->Realfow" main menu. You will be prompted to browse to the sequence/s of .bin files you want to load. You have to select just a .bin file and the plug-in automatically will search for all the sequences contained in the folder. It will show you a dialog box filled with all the sequences it has found. Take a look at the aspect of this dialog box.

The "Load" column allows you to select which sequences you want to load. The rest of the columns inform you about the sequence. The "Options" button will prompt you for additional information. Clicking the "Options" button the following dialog box appears.

You can select which kind of information you want to load, if you are not going to use some information is better for you to turn off the appropriate option; the load process will speed up. The "Offset", "Range", "Use Range" and "Clip Range" need some extra comments. Offset. Scene frame where our sequence will start playing. Range. Sequence range to be played. It is only working when the "Use Range" check control is enabled. "Clip Range" will make the range start to playing at the "Offset" frame.. By pressing the OK button in the plug-in dialog box you will get the sequence/s in Maya. A new emitter node will appear controlling the sequence/s, by accessing the properties of this node you can change the sequence/s parameters. Below you have the attribute editor for the new emitter node.

You will see a "Sequences" section in the attribute editor where all the sequence/s information can be modified.

There is another very important feature added to this version. In the "Basic Emitter Attributes" you will found a control named "Level Of Detail". It controls de number of emitted particles you want to load from the sequence/s. It is very useful when you have simulations with a huge number of particles and you want to load the sequence in Maya just for a preview. Take a look at the following picture.

Visualizing particle properties in Maya

Some times is necessary to visulize the RF particles properties in Maya interface as we can do in RF interface. Doing that is quite simple. Next short tutorial will lead you on this task. Load the particles with the Particle Loader. Select RFParticle and open the Atribute Editor, select RFParticleShape tab. Add color in the Add Dynamics Attributes folder clicking in Color and choosing Add Per Particle Attribute check box. Now we have a new propertie called rgbPP in Per Particle (Array) Attributes folder. You can see all particle properties loaded from RF too, rfVelocity, rfVorticity, rfTemperature, etc. Now we are going to color particles depending on velocity, so in rgbPP field create an expresion with RMB. Expression Editor is opened, in Particles choose Runtime before Dynamics and write next script: o //rfVelocity is a vector so we convert this value in a magnitude. o $velParticles= mag(RealflowParticle_RealflowParticleShape.rfVelocity); o //We change the value of one channel depending on the particle velocity, in this case the Green channel. The value of rgb channels goes from 0 to 1, so that we divide the value of velocity by "7.83" which is my higher value in RF simulation, you can check it in Emmiter>Display properties in RF to see your higher value in your simulation. o RealflowParticle_RealflowParticleShape.rgbPP=<<0,($velParticles/7.83),0>>; Now you can see how the particles color change when velocity is higher.

Rendering RF particles in Maya


You can change the type of particles and make caches from RF in the same way you usually do. Motion Blur is supported too, look at this picture:

Importing meshes:RealFlow mesh loader

Select RealFlow Mesher. The RealFlow Mesh Loader panel appears. Select the folder location for the sequence of .BIN mesh files. Just click over one file of the sequence. The file prefix is automatically set if you pick one of the files of the sequence. If other, change it yourself.

Frame offset is the number of scene frames to skip before inserting the mesh sequence. For example, if we set this value to 5, our first sequence frame will be inserted in the 6th scene frame. So, skipping 5 scene frames before insert our sequence. Motion Blur Clamp. To achieve the motion blur effect we use the vertices speed attributes. Some times, depending on the simulation, these values get very high values that introduce some artifacts in the motion blur effect. To get rid of these values you can set this clamp value. Just play with it until the artifact disappears. Level Of Detail View. When working with heavy meshes it could be useful to use this control just to control the number of polygons you want to visualize. Level Of Detail Render. You can have a different level of detail value for rendering and for visualizing.

NOTE: If you want to render in a render farm remember to load the mesh and particles bins from net address use //nameRenderNode/etc/

Clipping objects
There is an interesting functionality added to this version of the plug-in. You can clip parts of the mesh you are not interested on. For example, you have a mesh symbolizing a river and you are working with a character that is swimming in one part of the river. For this situation, maybe it could be useful for you to clip away all the polygons of the mesh where the action is not playing. The way this functionality works is very simple, just create a polygon cube and give to it the name starting with the root rfmesherclipper. Now, play the animation and you will notice that only the mesh polygons inside the cube are shown. You can add the number of cubes you want. The image below show you this new functionality working:

Vous aimerez peut-être aussi