
The Mystery of Ghost Triangles in RealFlow
This issue of white triangles rendering black is more common than you think when working with RealFlow meshes in Maya. You've correctly diagnosed the issue: it's duplicated or overlapping faces that RealFlow generates during the meshing process, which Maya interprets conflictively during rendering. These ghost triangles appear and disappear in different frames because RealFlow's meshing system doesn't always generate consistent topology frame by frame.
The problem arises because RealFlow's meshing algorithm sometimes creates redundant geometry when calculating the liquid surface, especially in areas of high turbulence or where particles rapidly change density. These duplicated faces compete with each other during rendering, causing the visual artifacts you describe.
In RealFlow, ghost triangles are like duplicated fingerprints: Maya doesn't know which is the real one and which is the copy
Solution in Export from RealFlow
The best solution is to prevent the problem at the source. Adjust the meshing parameters in RealFlow before exporting to generate cleaner geometry.
- Filter method: change to Yes or Yes, Yes for aggressive smoothing
- Relaxation steps: increase to 2-3 for more stable topology
- Polygon size: reduce slightly for higher resolution
- Export format: try Alembic (.abc) instead of OBJ
Optimized Meshing Configuration
Meshing parameters in RealFlow are crucial to avoid corrupt geometry. An overly aggressive configuration can create these artifacts.
Reduce the Blend factor value and slightly increase Radius. This produces a more stable surface with fewer problematic faces 😊
- Blend factor: 25-40 instead of higher values
- Radius: 1.5-2.0 for more conservative smoothing
- Resolution: do not exceed 100-120 for most cases
- Motion blur steps: 1 to reduce complexity
Geometry Cleanup in Maya
Once the mesh is imported into Maya, you can use native tools to automatically clean the geometry.
Select the mesh and go to Mesh > Cleanup. Configure the options to remove duplicated faces and non-manifold geometry.
- Faces with zero geometry area: enable
- Faces with zero map area: enable
- Lamina faces: enable for overlapping faces
- Non-manifold geometry: enable
Automatic Cleanup Script
For long sequences, manually cleaning frame by frame is unfeasible. This MEL script can automate the process.
Copy this script into Maya's Script Editor and run it to clean the entire sequence of imported meshes.
// Script to clean RealFlow meshes
string $meshes[] = `ls -type "mesh"`;
for ($mesh in $meshes) {
select -r $mesh;
polyClean -constructionHistory true;
polyTriangulate -ch 0;
polyCleanupArgList 4 { "0","2","1","0","0","1","0","0","0","1e-05","0","1","0" };
}
Method with Alembic Instead of OBJ
The OBJ format can exacerbate these problems. Consider exporting from RealFlow in Alembic (.abc) format, which handles animated geometry better.
Alembic preserves topology better between frames and has better handling of problematic faces during import into Maya.
- Export as Alembic: in RealFlow use .abc instead of .obj
- Import settings in Maya: use "Connect" instead of "Import"
- Frame range: import only necessary frames
- Cache updates: Alembic updates automatically
Material Configuration in Maya
Materials can exacerbate the problem. A material with high reflectivity makes these artifacts more visible.
Use more diffuse materials during development and add reflectivity only in the final render once the geometric problem is solved.
- High Diffuse: 0.8-1.0 during development
- Low Reflectivity: 0.1-0.3 for testing
- Reduced Specular: avoid highlights that reveal imperfections
- Matte materials: to identify geometric problems
Prevention in Simulation
Sometimes the problem comes from the simulation itself in RealFlow. Poorly distributed particles generate problematic meshes.
Check that your simulation has no areas with excessive density or isolated particles that can cause artifacts in meshing.
- Resolution: balanced throughout the simulation
- Particle separation: consistent values
- K Age daemon: to remove isolated particles
- Controlled Noise: avoid excessive turbulence
Post-Processing Solution
If the problem persists, consider rendering with the artifacts and cleaning them in post-production. Sometimes it's more efficient.
Render an object ID or material ID pass that allows you to easily select problematic triangles in your compositing software.
- Render separate passes: beauty, object ID, material ID
- Selective compositing: remove artifacts in post
- Depth-based cleanup: use depth for corrections
- Frame blending: smooth temporal artifacts
Normals Verification
Inconsistent normals can cause similar rendering problems. Verify that all normals point in the correct direction.
Use Mesh Display > Reverse to correct inverted normals and Mesh Display > Set to Face to reset problematic normals.
- Display normals: enable for visualization
- Conform normals: for consistency
- Soft/hard edges: define correctly
- Normal maps: avoid if there is corrupt geometry
Preventive Workflow
Implement this workflow to avoid the problem in future projects. Prevention is more efficient than correction.
Establish a consistent pipeline from RealFlow to Maya with quality checks at each step.
- Step 1: Stable simulation in RealFlow
- Step 2: Meshing with conservative parameters
- Step 3: Export in Alembic when possible
- Step 4: Automatic cleanup in Maya
After applying these solutions, your RealFlow meshes should import cleanly into Maya without those ghost triangles that ruin the render... though you'll probably develop a critical eye for detecting geometric problems that previously went unnoticed 🔧