So after experimenting with the use of fluid containers and particles systems for a couple of weeks I see potential for their combination, regarding this project. By agitating the water within the fluid container I can create waves of a sort, and with the particle system floating on top of the fluid, it makes for a reasonable foamy substance.
What I find frustrating is the confines of the fluid container, it makes generating waves difficult because of the limited space, increasing it doesn't really help or hinder, the backwash of the wave hitting the opposite side makes it painfully obvious that the scene is taking place with a bath tub, not an ocean.
Even without this flaw the system still aggravates me as no matter the forces I apply to the fluid within, the result is generally the same, the fluid acts as a whole rather than a series of particles. For example when applying a wind factor the fluid will move forward in a wave like motion, but it will be nearly the entire fluid moving at one.
It feels like the fluid in the containers sticks together too readily, I toyed with the idea of using multiple fluid containers reacting to the same forces but that resulted in some identical boxes with water flopping about. An option to get around this was to create a particle system and fill an object that would serve as the base of the ocean.
This approach led to some problems with the particles reacting too violently to forces, breaking apart too readily and not keeping a the shape of a wave. I solved this by some careful tweaking of the particle's friction and stickiness, while being careful not to turn the fluid into mustered.
There would be no problem with this normally however the foam particle system became buried rather quickly. I attempted to compensate by increasing the foam emitter's spawn and decay rates so that foam would stay a visible feature. This worked to a degree but I'm still not satisfied as to how it turned out.
As for the foam system itself I found creating a realistic effect very difficult. At first it worked really well get it to float and having the stickiness setting quite high allowed for it to bind together well when moving a top the waves. However because of this stickiness after a period of time clumps of sea foam would build up and because of the fact I was working within a confined space with the fluid container and then a set geometry these clumps would quickly bind together.
The problem was magnified by the fact I was using motion fields move the foam with the waves for a more realistic effect. One way I thought of to get around this was to create an object which when collision occurs between a foam particle and it, the stickiness attribute would be reduced and so the foam could spread out again.
This would require each element in the particle system to have a constantly increasing stickiness value to a certain point so that the previous effect remained. When tested rendering speed was decreased yet again, and this was on an extremely small scale.
The rendering speeds of this project are continuing to worry me, I have made several reminders to leave a sizable amount of time for the final product render.
Friday, 29 March 2013
Wednesday, 27 March 2013
Progress
Thinks are moving along at a steady pace, I've been running into a few problems but through the classes this month I've shown them to my classmates and gotten some good advice and feedback on my small scale prototypes.
The main thing I have been working on recently has been the wave and sea foam functionality, I feel frustrated however, as I have neglected some milestones I set for myself such as; getting ocean spray working on the crests of waves and having that react to wind and ripple effects etc.
The wave and sea foam tests have taken several forms, using different functionalities of Maya, fluid containers have now been replaced by a mesh and having that mesh filled with a particle system. The sea foam does not cope as well with this new system and I am focusing on that over the next week, as well as looking into other possibilities on how to make a realistic wave as my results so far haven't been great.
The main thing I have been working on recently has been the wave and sea foam functionality, I feel frustrated however, as I have neglected some milestones I set for myself such as; getting ocean spray working on the crests of waves and having that react to wind and ripple effects etc.
The wave and sea foam tests have taken several forms, using different functionalities of Maya, fluid containers have now been replaced by a mesh and having that mesh filled with a particle system. The sea foam does not cope as well with this new system and I am focusing on that over the next week, as well as looking into other possibilities on how to make a realistic wave as my results so far haven't been great.
Monday, 25 March 2013
Weather Ideas
To create an interesting ocean you need there to be a good storm (not necessarily perfect) to produce such a result. I'm thinking a hurricane, because of the need for strong winds for bigger more violent waves.
I don't think this will be a major time investment in comparison to the rest of the project, but it could be a interesting diversion. I'm not sure just how I will be creating this effect, it depends on the plan for the final scene, if I wish to have the camera descend through the clouds I could create a 3D fluid container and manipulate vapour particles with a motion field. If there is no need for that shot I think the same effect could be achieved using a series of rotating 2D textures.
To add to the atmosphere of the scene I could use the lightning effect in Maya above / around the cloud cover, and or edit the final render in after effects. I'll probably add in rain fall and anything else I can think of once the main features of the project have been implemented.
I don't think this will be a major time investment in comparison to the rest of the project, but it could be a interesting diversion. I'm not sure just how I will be creating this effect, it depends on the plan for the final scene, if I wish to have the camera descend through the clouds I could create a 3D fluid container and manipulate vapour particles with a motion field. If there is no need for that shot I think the same effect could be achieved using a series of rotating 2D textures.
To add to the atmosphere of the scene I could use the lightning effect in Maya above / around the cloud cover, and or edit the final render in after effects. I'll probably add in rain fall and anything else I can think of once the main features of the project have been implemented.
Thursday, 21 March 2013
Floating
An object's buoyancy and the way in which it moves in water is more of an animation challenge, so as with the basic principles of animation, I believe I'll stick to a few golden rules. The object can bob up and down at a set rate and the energy of the animation could be determined by how buoyant the object.
Concerning an object's yaw, if unguided, is relatively steady however over long periods of time it will shift. To demonstrate this I plan to have unguided object's heading shift slightly back and forth between a start and end orientation, with each starting orientation changing slightly each time.
Pitch and Roll are slightly more difficult to predict, looking into has led me to the conclusion that it will depend on wind direction and speed and where the object is located on a wave (i.e. in a troth or on a crest). The main focus is that the object is slightly more animated on a crest and it is in a realistic position, not held atop the crest by a few vertices.
I should be able to track an object's height using scripting and keep it within the relative position of the wave. One problem I am having with this is with the use of particle systems and the lack of precision they present. I have been able to demonstrate keeping the object's floating at correct heights when using a fluid container because it has parameters I can easily measure, unlike the slightly unpredictable nature of nParticles.
This raises a concern of mine, how much will this be a simulation and how much be hard coded (only working within preset limits)
Concerning an object's yaw, if unguided, is relatively steady however over long periods of time it will shift. To demonstrate this I plan to have unguided object's heading shift slightly back and forth between a start and end orientation, with each starting orientation changing slightly each time.
Pitch and Roll are slightly more difficult to predict, looking into has led me to the conclusion that it will depend on wind direction and speed and where the object is located on a wave (i.e. in a troth or on a crest). The main focus is that the object is slightly more animated on a crest and it is in a realistic position, not held atop the crest by a few vertices.
I should be able to track an object's height using scripting and keep it within the relative position of the wave. One problem I am having with this is with the use of particle systems and the lack of precision they present. I have been able to demonstrate keeping the object's floating at correct heights when using a fluid container because it has parameters I can easily measure, unlike the slightly unpredictable nature of nParticles.
This raises a concern of mine, how much will this be a simulation and how much be hard coded (only working within preset limits)
Object Overview
For assets in the scene, I plan to include both stationary and floating objects. For the most part these objects themselves will not involve too much complexity, it will be the ocean's reaction to them that will prove the most difficult aspect.
I have a few ideas as to giving each object a presence in the ocean, when an object is at rest, particle emitters inside the object could generate foam particles which would float outwards from the object, dissipating as their distance from the object increases or merely limiting their lifespan. This could give the impression of slight ripples or at least representing some kind of disturbance in the water.
This concept is further implemented by creating an object's wake, occurring when an object is moving through the ocean. In this case the emitter will have to create particles which will last much longer than a stationary object's. The difficulty here is that the wake will have to disperse in certain fashion as shown below.
The shape of the wake is achievable however the complexities of creating the disjointed, swirling patterns of the foam within the shape of the wake might be challenging. Another opportunity to use multiple motion fields and emitters perhaps?
I have a few ideas as to giving each object a presence in the ocean, when an object is at rest, particle emitters inside the object could generate foam particles which would float outwards from the object, dissipating as their distance from the object increases or merely limiting their lifespan. This could give the impression of slight ripples or at least representing some kind of disturbance in the water.
This concept is further implemented by creating an object's wake, occurring when an object is moving through the ocean. In this case the emitter will have to create particles which will last much longer than a stationary object's. The difficulty here is that the wake will have to disperse in certain fashion as shown below.
The shape of the wake is achievable however the complexities of creating the disjointed, swirling patterns of the foam within the shape of the wake might be challenging. Another opportunity to use multiple motion fields and emitters perhaps?
Tuesday, 19 March 2013
Wave Deconstruction Part 4
The more visually appealing part of this project is how the waves in the simulation will break and deform upon geometry. Looking into the matter reveals that there are quite a few ways in which a waves can break upon the shore-line, however this area is not something I wish to dedicate time to as it seems to be little visual difference in the effect.
What I do intend to dedicate time to is the force with which waves can crash into objects, as it will be the most visually impressive thing I can do with ocean waves. I do not intend to go as far tidal waves but I will strive for an interesting reaction when a wave hits a shore-line or other geometry.
From what I can see the collision response could be done in two ways; have particles and or mesh of the main body of water change, dependent on a collision. Or a better solution might be to have a different particle system created at the point of collision. The reason for this is that a single nParticle system will deform around the object but not react in an realistic manner (i.e. generate foam, or break apart without a huge force behind it). I believe another nParticle emitter should be created around the point of collision to simulate the change in the waves consistency (i.e. the spray and foam).
The first system could handle the base wave deformation around the object, while the second could represent the change in water as the force of hitting the object is applied to it. This method should save on calculations per second and will have it's own separate physics to manipulate making the management of the collision easier.
When testing wave collision with geometry it brought up an issue with this project, rendering or even working with nParticle systems is a taxing process for my computer, never mind when said particle system is extremely active. When testing the issue on my desktop, it struggled when simulating large particle systems colliding with rigid objects. To get past this, testing will continue but on a much smaller scale.
And I thought I was already testing on a small scale...
What I do intend to dedicate time to is the force with which waves can crash into objects, as it will be the most visually impressive thing I can do with ocean waves. I do not intend to go as far tidal waves but I will strive for an interesting reaction when a wave hits a shore-line or other geometry.
From what I can see the collision response could be done in two ways; have particles and or mesh of the main body of water change, dependent on a collision. Or a better solution might be to have a different particle system created at the point of collision. The reason for this is that a single nParticle system will deform around the object but not react in an realistic manner (i.e. generate foam, or break apart without a huge force behind it). I believe another nParticle emitter should be created around the point of collision to simulate the change in the waves consistency (i.e. the spray and foam).
The first system could handle the base wave deformation around the object, while the second could represent the change in water as the force of hitting the object is applied to it. This method should save on calculations per second and will have it's own separate physics to manipulate making the management of the collision easier.
When testing wave collision with geometry it brought up an issue with this project, rendering or even working with nParticle systems is a taxing process for my computer, never mind when said particle system is extremely active. When testing the issue on my desktop, it struggled when simulating large particle systems colliding with rigid objects. To get past this, testing will continue but on a much smaller scale.
And I thought I was already testing on a small scale...
Monday, 18 March 2013
Wave Deconstruction Part 3
The data needed is all well and good but more information about how exactly to form waves was needed, my understanding is that as the wind blows, pressure and friction disturb the surface of the body of water. This causes an energy transfer into the water which forms the waves.
There is a great deal of research into wave formation, and a huge amount of difficult math that I won't be touching upon, thanks to Maya. Further reading into might be interesting for a future project but I cannot say it is too appealing.
How to use this knowledge is another thing and will require detailed testing using the dynamic fields used in Maya. The other option is to use a pre-built system or create an entire plugin for the application.
Further Reading:
- Airy Wave Theory
- Stokes Drift
- Luke's Variational Principle
- Mild-Slope Equation
- Shallow water equation
There is a great deal of research into wave formation, and a huge amount of difficult math that I won't be touching upon, thanks to Maya. Further reading into might be interesting for a future project but I cannot say it is too appealing.
How to use this knowledge is another thing and will require detailed testing using the dynamic fields used in Maya. The other option is to use a pre-built system or create an entire plugin for the application.
Further Reading:
- Airy Wave Theory
- Stokes Drift
- Luke's Variational Principle
- Mild-Slope Equation
- Shallow water equation
Wave Deconstruction Part 2
The outputs for the simulation will be the characteristics of the waves formed, these are:
- Wave Height - (From Trough to Crest)
- Wavelength - (Crest to Crest)
- Wave Time - (Interval between Crests)
- Wave Direction
Waves Deconstruction
Waves in film tend to be extreme examples of wind generated waves that defy the laws of physics, and for this simulation I want to push those boundaries as well, as this is a simulation of an ocean, not a pond.
However as a starting point and to make sure that this simulation is grounded in reality, some research on how waves naturally form and how this can be represented in Maya was undertaken. Firstly there are five factors that govern the formation of waves:
With these factors, bigger is better, increasing any of them will result in larger waves. For the following factors; distance, width, time and depth can be controlled easily in Maya by controlling the starting conditions of the body of water / particles being manipulated.
For basic wind simulation with nParticles the nucleus of a nParticle system holds a Gravity & Wind values which could be manipulated to simulate different conditions. For fluid containers the Dynamic Simulation, Self Attraction and Repulsion and Surface functionality could be manipulated to have the desired effect.
I do not know how useful the Gravity & Wind dynamics will be in relation to this particular objective and will test it further this week. If this system is inadequate further tests will be run using nDynamic fields or possibly a scripted effect. I share this concern with the use of the fluid container's functionality, in any case I believe scripting will be needed to enhance / customize the functionality to this scenario.
However as a starting point and to make sure that this simulation is grounded in reality, some research on how waves naturally form and how this can be represented in Maya was undertaken. Firstly there are five factors that govern the formation of waves:
- Wind Speed
- Distance of open water the wind has travelled across
- The Width of said area
- The Time the wind has blown over said area
- The Depth of the water
With these factors, bigger is better, increasing any of them will result in larger waves. For the following factors; distance, width, time and depth can be controlled easily in Maya by controlling the starting conditions of the body of water / particles being manipulated.
For basic wind simulation with nParticles the nucleus of a nParticle system holds a Gravity & Wind values which could be manipulated to simulate different conditions. For fluid containers the Dynamic Simulation, Self Attraction and Repulsion and Surface functionality could be manipulated to have the desired effect.
I do not know how useful the Gravity & Wind dynamics will be in relation to this particular objective and will test it further this week. If this system is inadequate further tests will be run using nDynamic fields or possibly a scripted effect. I share this concern with the use of the fluid container's functionality, in any case I believe scripting will be needed to enhance / customize the functionality to this scenario.
Friday, 15 March 2013
Foam
So there is how to the water in general, with a particle based system for better results but less greater rendering times, or follow the rest of the world and use geometry. But there are the little details which make these simulations so lifelike, things like sea-foam caused by biological matter reacting in the water, this can take many forms.
There is the general foam resting atop the ocean waves, crest foam, where foam gathers at the crest of each wave that forms and beach foam, where the wave dissipates on land. These could be individual particle systems reacting to each condition, and I am not sure how to go about creating them as the particle system would have to gather / disperse dependant on the particle system or mesh it was floating on. Don't get me started on floating yet, the math...
One possibility is to use the Motion field in Maya's Fluid Effects, motion fields act like force-fields around objects that want to react with a particle system. There could be a possibility to use a hidden object to distort the sea-foam particles in a convincing manner.
There is the general foam resting atop the ocean waves, crest foam, where foam gathers at the crest of each wave that forms and beach foam, where the wave dissipates on land. These could be individual particle systems reacting to each condition, and I am not sure how to go about creating them as the particle system would have to gather / disperse dependant on the particle system or mesh it was floating on. Don't get me started on floating yet, the math...
One possibility is to use the Motion field in Maya's Fluid Effects, motion fields act like force-fields around objects that want to react with a particle system. There could be a possibility to use a hidden object to distort the sea-foam particles in a convincing manner.
Thursday, 14 March 2013
Thoughts
Simulating any body of water with particles, from a small steam to the south pacific, is an extremely taxing process for the hardware rendering it. Generally, especially in computer games, this type of simulation is handled by procedurally generated piece of geometry.
There is also the possibility so that the mesh size may vary as you move through the water, so deeper water has a larger mesh as it doesn't need to be as precise as the top of the water where the mesh will become finer, further saving on performance.
So there are a few ways I am going to test how an ocean simulation could be achieved, small scale tests with nParticle systems, Fluid Effects such as; fluid containers and a reactive geometry mesh.
There is also the possibility so that the mesh size may vary as you move through the water, so deeper water has a larger mesh as it doesn't need to be as precise as the top of the water where the mesh will become finer, further saving on performance.
So there are a few ways I am going to test how an ocean simulation could be achieved, small scale tests with nParticle systems, Fluid Effects such as; fluid containers and a reactive geometry mesh.
Goals
As I continue looking into this area, a goal of hyper realism is not something that can be
aimed for without the footage for close up shots. Unfortunately I
lack the equipment and resources a studio like Rhythm & Hues to
create them. So the goal of the project will be to attempt some
things that can only be done through computer simulation illustrated
in films such as, Pacific Rim or any disaster film in the last
decade. An extremely exaggerated scene.
Looking over at the
impressive aspects of this of such films I drew up a simple list of the
assets that this project should aim towards:
- Waves
- Waves Breaking/Deforming on Geometry
- Floating Objects
- General & Object Generated Spray
- Wake Trails after Objects
- Weather System (i.e. Rain and Cloud Cover)
Wednesday, 13 March 2013
Research
I'm surprised that there is so much research on this topic, not just oceans but papers have been written on the foam generation! There is so much cool stuff and detail added to what could be relatively dull affair by the academic community, it's really nice to see.
There are a few articles that inspired me to look into this area of study, the first is a discussion on work done by Industrial Light & Magic (San Rafael, CA) on The Perfect Storm. They ended up developing an selection of plug ins which along with the real shots performed on set produced a breathtaking visual experience for the time and which still stands up today.
If you want to read the article:
http://www.cgw.com/Publications/CGW/2000/Volume-23-Issue-7-July-2000-/Sea-Change.aspx#.UaTcqpxO11M
Another interesting find was the work done of the generation of realistic foam, an entire paper written on foam and bubbles. The paper details the math behind the creation of sea foam, bubbles etc down to the level of each particle.
The Paper can be found here:
http://cg.informatik.uni-freiburg.de/publications/2012_CGI_sprayFoamBubbles.pdf
I also went looking for blogs or other means to get information on the subject, and found many sources which referred to SIGGRAPH or Special Interest Group on Graphics and Interactive Techniques, which is a conference held each year across the USA. The accepted papers are great resources one such paper is was produced by Miles Macklin and documented on his blog, the results of this wave simulation are staggeringly good, check out the videos.
Link to the blog:
http://blog.mmacklin.com/
There are a few articles that inspired me to look into this area of study, the first is a discussion on work done by Industrial Light & Magic (San Rafael, CA) on The Perfect Storm. They ended up developing an selection of plug ins which along with the real shots performed on set produced a breathtaking visual experience for the time and which still stands up today.
If you want to read the article:
http://www.cgw.com/Publications/CGW/2000/Volume-23-Issue-7-July-2000-/Sea-Change.aspx#.UaTcqpxO11M
Another interesting find was the work done of the generation of realistic foam, an entire paper written on foam and bubbles. The paper details the math behind the creation of sea foam, bubbles etc down to the level of each particle.
The Paper can be found here:
http://cg.informatik.uni-freiburg.de/publications/2012_CGI_sprayFoamBubbles.pdf
I also went looking for blogs or other means to get information on the subject, and found many sources which referred to SIGGRAPH or Special Interest Group on Graphics and Interactive Techniques, which is a conference held each year across the USA. The accepted papers are great resources one such paper is was produced by Miles Macklin and documented on his blog, the results of this wave simulation are staggeringly good, check out the videos.
Link to the blog:
http://blog.mmacklin.com/
Tuesday, 12 March 2013
Project Breif - Continued
Using an ocean simulation takes the best aspects of using computer generated content in media, it can be larger than life in scale, it's not an area where filming is easy and it's still alien to the majority of humanity, allowing for creative freedom.
The aspects of creative freedom and the alien notions of the ocean are exciting to experiment with, in general my experience with simulation has been fixed on representing reality; recreating real life situations. It will be fun to work with something that can be so exaggerated.
The scenarios that one can deal with in ocean simulation can be exaggerated to ludicrous proportions, but as shown in Life of Pi, the colour scheme does not need to be limited to the dull blue and white of most simulations.
Though these thoughts are not primary concerns they are of interest if the project progresses quickly.
The aspects of creative freedom and the alien notions of the ocean are exciting to experiment with, in general my experience with simulation has been fixed on representing reality; recreating real life situations. It will be fun to work with something that can be so exaggerated.
The scenarios that one can deal with in ocean simulation can be exaggerated to ludicrous proportions, but as shown in Life of Pi, the colour scheme does not need to be limited to the dull blue and white of most simulations.
Though these thoughts are not primary concerns they are of interest if the project progresses quickly.
Project Brief
Computer generated visual effects /
simulations are increasingly used in media, creating breathtaking visual experiences which could not be achieved through normal means, as seen in many disaster movies where whole continents can be destroyed. I approve the use of these effects for such grand scale projects but I have a problem when such work needlessly replaces stunt or effect teams on set, as it is jarringly noticeable to a trained eye.
Personally this has the effect of pulling me out of the performance when I know that a character has been replaced with a 3D model and is in no danger. I do understand why this practice is common place now as it is generally replacing expensive and dangerous stunt work, or when attempting to film scenes in inaccessible locations.
However I believe that a hybrid approach is needed to make the best of these different practices, and I have seen some interesting use of a combination of real footage and simulated effects in film, which works well in films such as Life of Pi.
Personally this has the effect of pulling me out of the performance when I know that a character has been replaced with a 3D model and is in no danger. I do understand why this practice is common place now as it is generally replacing expensive and dangerous stunt work, or when attempting to film scenes in inaccessible locations.
However I believe that a hybrid approach is needed to make the best of these different practices, and I have seen some interesting use of a combination of real footage and simulated effects in film, which works well in films such as Life of Pi.
Life of Pi was filmed
in a large indoor swimming pool, giving realism to the water in close
shots and allowing simulation to handle the rest. This film and another, The Perfect Storm, also used a method where the boat and water sprayed unto the actors was real but the rest of the scene was rendered around them.
I decided
to dedicate this project to replicating oceanic simulation I've seen
in films such as Life of Pi, The Perfect Storm and others. I choose this area specifically because it fulfills my personal criteria for what visual effects should be used for.
Subscribe to:
Posts (Atom)