11.07.2015 Views

Hybrido White Paper - digitaltools.ro

Hybrido White Paper - digitaltools.ro

Hybrido White Paper - digitaltools.ro

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>Int<strong>ro</strong>duction | 21 INTRODUCTIONHYBRIDO is the name for the new fluid technology delivered within the RealFlow version 5, it stands for HYBrid laRge dImensionLiquiD solver.Up to now it was difficult to make realistic fluid simulations for medium to large scales using RealFlow. The main p<strong>ro</strong>blem is theparticle-based app<strong>ro</strong>ach that RealFlow uses for solving the fluid equations. This app<strong>ro</strong>ach is good for achieving the detail needed forsplashes, but for simulating the core of the fluid where no detail is required you still need to use a lot of particles. This is possible,but the simulation times for this number of particles is long.The best app<strong>ro</strong>ach to deal efficiently with the core simulation of the fluid is to use a grid-based solution. A grid is created in thespace where the simulation is going to take place and the fluid equations are discretized and solved at the grid points. However thisapp<strong>ro</strong>ach is not adequate enough to catch the fine detail needed for splashes - a super high-resolution grid would be needed toresolve the fluid where the fine detail is needed.There are app<strong>ro</strong>aches and techniques to separately alleviate the p<strong>ro</strong>blems of particle-based and grid-based methods, but in ou<strong>ro</strong>pinion the best way to deal with these limitations is to use a hybrid model where the grid-based app<strong>ro</strong>ach is used to solve the coreof the fluid and a particle-based app<strong>ro</strong>ach is used to solve the splash.HYBRIDO is a novel technology that combines a grid-based and particle-based app<strong>ro</strong>aches to deal with the complex task ofsimulating medium to large scale scenes. Other phenomena (also known as secondary elements) that are typical of large scales likefoam, mist and fine surface detail (displacement) are also addressed with this technology.As an example, In figure F.01 below you can see a screen shot of a typical simulation that can be created with HYBRIDO. All thesimulation data was rendered with Mental Ray© using the new version of the RealFlow RenderKit tools.F.01 Domain size is 100x20x60 meters© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>Concepts within HYBRIDO | 4Grid splashThe splash is generated automatically when an under-resolved region of the grid-based fluid is detected. The splash node is similar tothe particle-based emitters so actually you can have all the flexibility RealFlow p<strong>ro</strong>vides for this particle-based app<strong>ro</strong>ach. For instance,you can attach any daemon to the splash, or you can change the behavior of the particles f<strong>ro</strong>m fluid to dumb, there is no limitation.F.04 Grid splashThe representation of the splash node is just a box. This box delimits the volume f<strong>ro</strong>m where the splash is going to be generated,i.e. only under-resolved regions inside this box will generate splash. The splash particles won’t be removed when going outside thebox, they will be removed when they c<strong>ro</strong>ss the surface of the grid-based fluid and coming f<strong>ro</strong>m the “air”. It is important to note thatsplash particles don’t add mass to the grid-based fluid, i.e. there is no coupling between the particle-based fluid and the grid-basedfluid. Instead of that foam will be generated.Grid foamTexture-based and/or particle-based foam. Foam is generated when splash particles enter the grid-based fluid surface coming f<strong>ro</strong>mthe “air”. In the texture-based app<strong>ro</strong>ach a gray-scale image represents the foam, in the particle-based app<strong>ro</strong>ach particles representthe foam. When using the particle-based app<strong>ro</strong>ach for the foam you have the same flexibility than you have for the traditionalparticle-based emitters, so actually the foam particles can be simulated as a particle-based fluid.F.05 Particle-based foam© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>A case study, the lighthouse | 10There are many parameters that allow you to configure how the splash will be created and what p<strong>ro</strong>perties it will have once created.F.16 Grid splash parametersOne important parameter is “Detail threshold”, it can have a range between 0 and 1 and it’s a very “technical” value, connected tothe grid’s resolution. As mentioned before, the fluid engine is always looking for under-resolved regions. If the solver has detectedsuch a zone, HYBRIDO refines the grid internally to p<strong>ro</strong>duce the fine splashes. “Detail threshold” can be seen as the sensitivity of thisp<strong>ro</strong>cess. With 1, it can detect almost any under-resolved region in the scene, while 0 only p<strong>ro</strong>duces splashes in zones with a highneed for detail.One important addition in RealFlow version 5, which is actually not part of HYBRIDO but can help when trying to get splashes, is thenew Sheeter daemon. This daemon is specially conceived to create thin layers of fluid f<strong>ro</strong>m just a few number of original particles. InFigure F.07 above this daemon was used to get splash layers a<strong>ro</strong>und the lighthouse.For the final scene we created several splashes and placed them in some strategic places in the scene. We then used the newIDOC (Independent Domain Of Computation) concept and the new RealFlow Job Manager to compute them at the same time overa network of machines. The chaotic nature of the splashes allow us to compute them without considering their interaction, for thisreason they can be computed separately and at the same time. We will talk more about this new IDOC concept at section 3.8.It took 9 hours in a i7 to simulate the splash for 500 frames.3.07 ADDING SECONDARY ELEMENTS, THE MISTOnce the splash has been calculated we can use the cached data to create the mist. It is important to compute the mist before thefoam because the p<strong>ro</strong>cess of mist generation fragments the splash particles so they might disappear before entering the grid domain.A splash particle not entering the grid domain won’t generate foam, that’s why mist should be computed first.Mist is p<strong>ro</strong>duced when a fluid d<strong>ro</strong>plet is fragmented into smaller d<strong>ro</strong>plets. This fragmentation p<strong>ro</strong>cess is known as “d<strong>ro</strong>plet breakup”and is characterized by the ratio between ae<strong>ro</strong>dynamic forces and the d<strong>ro</strong>plet’s surface tension. Large water d<strong>ro</strong>plets have weakersurface tension forces compared to ae<strong>ro</strong>dynamic forces, so they have an increased chance of splitting into smaller d<strong>ro</strong>plets. Thoughwe’re talking about d<strong>ro</strong>plets here, it’s important to know that mist cannot be exported as particles. In RealFlow, mist is the graphicalrepresentation of a density field and hence completely different f<strong>ro</strong>m splashes.By default the mist is generated in the “Unbounded” mode, this means mist will be generated in all the grid domain. Usually youmight want to have it in the “Bounded” mode where you can place the mist and specify the region of interest and make of the mostof the resolution.When a mist is linked to a splash emitter the splash particles are being fragmented and its mass transferred to the mist. Once theradius of the splash particle is below some threshold the particle is removed. This means that the mist is actually changing the originalsplash. When using a splash in cache mode we don’t want to modify the original splash sequence. To avoid this, the mist detectswhen the splash is in cache mode and generate a version of that splash sequence. In the display p<strong>ro</strong>perties of the splash emitteryou will find a parameter “Fluid” where you can choose whether to see the original particle sequence “Primary” or to see the versionthat the mist is creating.© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>A case study, the lighthouse | 11F.17 Grid mist and paremetersIt took 1 hour in a i7 to simulate the mist for 500 frames.3.08 ADDING SECONDARY ELEMENTS, THE FOAMOnce the splash and mist have been calculated we can again use the cached data to create the foam. This way you don’t have tosimulate again and again your splash if you are happy with it, just use the cached data to setup your foam.Foam can come in two flavors, particle-based or texture-based. When the splash particle enters the grid domain it creates a foamparticle or seeds a foam value in the foam texture. For particle-based foam, notice that even if you have a displacement (more aboutdisplacement in the next sections) the foam particle is p<strong>ro</strong>perly placed. For a particle-based foam, a mesh can be created and texturedgiving quite realistic looking foam.It took 8 hours to simulate the foam, including the mesh, in a i7 machine for 500 frames. Please notice we are just talking here aboutthe particle-based foam. The texture-based foam was not used for the lighthouse.F.18 Particle-based foam with a mesh© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>A case study, the lighthouse | 12An initial state for the foam can be created f<strong>ro</strong>m user images so you are not just restricted to the foam created by the splash particles.Foam can be texture-based as explained before. To be able to see it in the RealFlow viewports you need a grid mesh. Please notethat the algorithm to simulate particle-based foam is totally different than the texture-based one, so if you simulate both they won’tperfectly match. The texture-based foam is based in a diffusion-dissipation algorithm where the particle-based are just regularparticles advected with the velocity field of the fluid at the surface.F.19 Texture-based foam3.09 IMPROVING SIMULATION TIMES, THE IDOC CONCEPTIDOC stands for Independent Domain Of Computation, it can be used to optimize the simulation times. Depending on your scene, andnormally when we are talking about big scale simulations, you can always divide your scene in different regions that don’t interact andtherefore can be simulated at the same time. The chaotic nature of splash when going to large scale give us the freedom of simulatedifferent regions at the same time. The main simulation must be done before in a single machine, but the rest of the secondaryelements can make the most of using the new IDOC nodes.The IDOC is a special node represented in the user interface with a box, this box encloses the region that is going to be simulatedwhen this IDOC is active. In the lighthouse scene there are four IDOCs, see them in the figure below.F.20 IDOCs© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>A case study, the lighthouse | 13For every IDOC we have created splash, mist and foam nodes. The panel of nodes looks like the figure below. Please notice that themain simulation node GridFluidDomain01 is also included.F.21 Nodes per IDOCEvery splash box is placed to match the box of the IDOC. This means that if you simulate only that IDOC, only splash particles aregoing to be generated at that box. Simulating every IDOC at the same time is possible even if the different splashes are not going tointeract. For large scale scenes this interaction can be avoided, of course it depends on the scene and you might need the splash tointeract, in this case all of them must be in the same IDOC. For the mist and foam, by default, they are created in the “Unbounded”mode - this means that foam and mist will be generated in all the simulation region and NOT just in the IDOC box, but because thefoam and mist are generated f<strong>ro</strong>m a specific splash there is some kind of limitation of what is being p<strong>ro</strong>duced in every IDOC. In figures4, 5 and 6 you can see the results f<strong>ro</strong>m the simulation of the IDOC 2.By setting the parameter “Simulation” of very IDOC f<strong>ro</strong>m “Active” to “Inactive” you can decide what to simulate in your scene but thereal power of the IDOC shows up when is used together with the new job manager. In the IDOC panel there is a button “Send to jobmanager” that automatically configures the current scene and sends it to the job manager.F.22 Job Manager interface© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>A case study, the lighthouse | 14In the figure above you can see how four jobs have been scheduled, one for every IDOC. As soon as there are job nodes availablethe simulation jobs will be started.One remarkable feature of the new Job Manager is the possibility of using an hete<strong>ro</strong>geneous g<strong>ro</strong>up of simulation nodes solvingautomatically f<strong>ro</strong>m a user given rules the paths of the different resources used by your scene. In our case we have Linux, Windowsand Mac simulation nodes, the scene was stored in a Linux machine named HUYGENS. We set the path translation rules shown in thefigure below in the scene before sending it to the Job Manager.F.23 Path translation rulesWhen the Job Manager sends a job it knows if the simulation node is Linux, Windows or Mac. Depending on that it will replace the“Prefix” string in the scene path with the platform string, making possible to load and simulate the same scene in all the supportedplatforms.In the table below, the simulation times for the secondary effects is shown (time is given in hours). Because all the IDOCs weresimulated at the same time we can see that the most restrictive IDOC is IDOC2 taking 18 hours to simulate.Splash Mist FoamIDOC1 5 1 6 12IDOC2 9 1 8 18IDOC3 5 1 5 11IDOC5 7 1 7 15Simulation time for IDOC2 plus the simulation time for the grid domain plus the generation of the grid mesh will give us the totalsimulation time for the lighthouse scene when using IDOCS.Grid Domain Grid mesh IDOC2 Total Time5 1 18 24 hours© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>A case study, the lighthouse | 153.10 RENDERINGAll the rendering was done using the RealFlow RenderKit (RFRK) rendering tools. These tools allow you, for instance, to create highresolutionpolygonal meshes f<strong>ro</strong>m the particles at render time. You can also render particles in a volumetric way to mimic the misteffect. A displacement tool is also p<strong>ro</strong>vided to p<strong>ro</strong>duce at render time the displacement created by the Grid Domain.There is RFRK for MentalRay and RenderMan . In this case the render was done in one pass with MentalRay and all simulationdata was rendered using the RFRK. Please notice how the huge amount of simulation data was rendered in one pass thanks to theRFRK management of memory.We used the RFRK_Mesher to create a mesh a<strong>ro</strong>und the foam particles at render time, in the figure below please notice how the foamdetail can be captured using a mesh. Because the foam particles are displaced using the displacement f<strong>ro</strong>m the simulation, the foammesh and the grid mesh plus the displacement match perfectly.We used the RFRK_Cloud to render the splash and the mist. The splash can be rendered using a mesh just as we did for the foambut it seems that a volumetric render of a huge amount of particles where they are very close to each other gives more appealingresults. In the case of the mist it is quite obvious that it should be a volumetric render.The grid mesh was exported f<strong>ro</strong>m RealFlow as a sequence of BIN mesh files that can be imported into the most important 3Dpackages using the RealFlow plugins. In this case we imported the sequence into Maya and used the RFRK_Displacement todisplace the grid mesh and get the final look you can see in the figure below.F.24 Lighthouse rendered using RFRK© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>A case study, the lighthouse | 16In the figure below we present some comparative tests of the RFRK_Cloud in action with different values for the “opacity” parameter.F.25 RFRK_Cloud opacity tests© Next Limit Technologies 2010


HYBRIDO - <st<strong>ro</strong>ng>White</st<strong>ro</strong>ng> <st<strong>ro</strong>ng>Paper</st<strong>ro</strong>ng>A case study, the lighthouse | 174 CONCLUSIONWe have presented the key points of the new HYBRIDO technology, but we have only scratched the surface of what is possible withthis new technology.In RealFlow version 5 we have created a new rigid and soft body solver (named CARONTE) with the aim of simulating many objectsin an efficient way. A new concept has been int<strong>ro</strong>duced in the body solver, the “MultiJoint”. With MultiJoints you now have a modernand sophisticated way to connect bodies.The coupling between CARONTE and HYBRIDO opens up many new possibilities when dealing with large scale simulations.Go to www.realflow.com and ask for a demo version and try out all these new features.Thank you.© Next Limit Technologies 2010


© Copyright 2010 Next Limit SLRealFlow a registered trademark of Next Limit SLAll trademarks included in this catalogue belong to their respective ownersAll images in this book have been rep<strong>ro</strong>duced with the knowledge and prior consent of the artists concerned and no responsibility is accepted by p<strong>ro</strong>ducer, publisher, or printer for any infringement ofcopyright or otherwise, arising f<strong>ro</strong>m the contents of this publication. Every effort has been made to ensure that credits accurately comply with information supplied.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!