Wednesday, 8 May 2013

Project Review

I am a bit disappointed in the final product and I hope I have time over the next few weeks to continue to add small features to it, it took a surprising amount of time to complete, due to testing and rendering. And I use that as a learning experience for future projects using Maya.

The problem hit me like a brick, my Maya file opened this morning revealing all the textures had disappeared, the models did not show up in renders and because of the water Maya decided to divide by zero a couple of hundred times. Not much time till hand in and a lot of other coursework to hand in. I'm a bit devastated to say the least.

Wednesday, 17 April 2013

Wakes & TouchUps

The other objects in the scene which are merely stationary objects could also use wakes so that they have more presence in the scene. For the rest of the month I'm going to be working on group project, but when I get time I intend to add extras such as sea spray in the form of an nParticle emitter at the tail end of the boat, possibly change the boat model so that it has a canvas sail that can be replaced with nCloth to illustrate the direction of the wind.


Tuesday, 16 April 2013

Boats & Functionality Part 2

Another feature of using the motor boat is the ability to set the pitch sending the prow of the boat up in the air as it accelerates. I has been quite fun to experiment with. So the final step of this part is to create the wake for the boat object.

This is done through the use of the create function in fluid dynamics, the wake emitter was not as impressive as the other features set with the ocean function. The emitter has two functions to provide a ripple effect and to create sea foam / spray, these effects are extremely unresponsive and need to be overloaded to give off even a slight response.

One interesting aspect is the use of textures for this functionality, the wake emitters need to be held within an area otherwise the geometry will not be altered.

Boats & Functionality

The next step was to create a boat which act as a moving object through the scene, creating a wake as it passed. At this point I went on the free 3D models .com to get some sample models to use in the demonstration.

http://thefree3dmodels.com/

I collected a small sample of models to use as debris and a single boat object, I would have liked to have had a more populated scene but I did not want the polygon count to increase too drastically and impact the rendering process.

Using the motor boat function results in much like any other locator, allowing for the control over buoyancy and pitch and roll, but with the added features of a "motor" acting as thrust and a rudder which acts to set a general heading. This proves a somewhat entertaining device as it acts as importune animation control.

Monday, 15 April 2013

Floating Objects

The next stage was to include floating objects such as debris, in the scene. This needed to be done to give the scene some depth as just watching the waves would be incredibly dull. Floating objects are also handled within the ocean system with a variety of locators.

At first I used the basic locator, the "Surface Locator" which used a simple expression to keep an object above the water line, this however is not enough as there is no movement to the object, other than in the y axis. The object also needed to realistically roll with the waves and that meant that the use of a more complex locator.

I started testing the dynamic locator, to see what kind of functionality it contained. The dynamic locators used a slightly more detailed expression and instead of following the height of the waves, this locator allowed objects this functionality but with an add bobbing motion.

The dynamic locator has a lot of extra attributes which allowed me to test out the buoyancy effect. The buoyancy of the object, is determined by it's height and buoyancy variables. This result was much better than the simple locator but could still be improved.

The best way to have floating object within the simulation is to use the boat locator, which allows object's to pitch and roll with the waves, with this the debris in the scene became highly realistic. One problem they face was the speed of which they moved, I solved this problem by increasing the air damping on the locator object, this in effect made the area above the waves react with more friction slowing the bobbing motion to a more manageable rate.


Thursday, 11 April 2013

Maya Ocean System - Waves Part 3 (Foam & Misc)

I continued to work on the waves with the ocean shader functionality, adding in foam and some lighting for added detail in the scene.

For the foam I played around with the foam emission and threshold values to add a much desired sense of realism to the lack-luster waves, using this system didn't give as interesting results as the use of a particle system however it saved greatly on rendering times.




The foam texture is layered onto the wave geometry where there is a height difference between two points i.e. the crest and the trough. I made sure that the foam content was high to further illustrate the raging sea.

I used the common material attributes sparingly, the only features used was the overall colour of the ocean and the intensity of the trough shadow to show off highlighted areas in the scene, the crest and troughs of the waves.

I finally used the specular lighting function in combination with a directional light to add more detail to the water.

Monday, 8 April 2013

Waves Testing Results

I have been working over the weekend testing out the wave effects in Maya's ocean system, these are a comparison from the basic ocean to the stormy effect I have managed to get in the last few days.





Friday, 5 April 2013

Maya Ocean System - Waves Part 2

The next step on creating a more chaotic ocean was to use some interesting graphical interfaces I have yet to see in Maya.



These were interesting interfaces to work with, and rather confusing as to what they did, a lot of experimentation was needed to see what each setting applied to.

Firstly I'll talk about my understanding of the Wave Height, it's main function didn't seem to manipulate the height of waves. It seemed to have more of a focus on changing the level of detail of waves at particular heights.



The graphical interface allowed for a great amount of control of which type of wave was the most detailed and therefore would be most visible in the final product. I chose a balanced approach, while having the longer waves more prominent which gave the waves a more stormy appearance.

The wave turbulence increased the randomness of the waves, and the rendering times of the scene. Again the fine control over the modification was interesting though I don't feel that they are all that necessary, for the most part I worked with extremes to make sure the ocean was as stormy as possible.

Wave Peaking controlled the level of detail over the crests of each wave, adding to the detail of each crest was a very tentative process with extreme results at low values. I used this effect to add detail to the smaller waves, to balance out the amount of attention paid to the larger waves.

Maya Ocean System - Waves

As I look into this functionality, this tool does not seem to be using a dynamic simulation, rather a series of textures and noise that combine to create a displacement map. I have used a height-map to simulate water before, though not on this scale, but my previous experience doesn't come close to the power of this tool.

The majority of control a user has over the ocean effect is through the ocean shader, with it the ocean's attributes can be accessed and customized. The shader holds some basic attributes which control the waves, using such attributes as WindUV and Wind Speed controls the waves direction and speed. But that is just the tip of the iceberg as there are options to control every aspect from wave height to specular shading.

An attribute called observer speed seems to generate the effect of the ocean moving past the camera, though I am not sure what use this will have if I have an animated camera in the scene or moving objects. So it is probably not something I will be using, although if I run out of time and need a faster render I could take out the camera and use this feature. I will experiment more with this feature at a later date.

The first thing I looked for with these attributes was any way to create a more chaotic pattern of waves, so that the scene could be as animated and eye catching as possible. Changing the Num Frequencies and wave turbulence modifiers increases the amount of noise applied to the mesh and diversity of the waves, resulting in a more aggressive ocean.

For more detail in the ocean I modified the Wave Length Min & Max values which changed the shape and formation of each wave, in my case I really want a choppy, stormy sea. So I spent some time tweaking these values to view their effect. These modifiers control the quality of each wave, with the minimum setting controlling fine detail, to a very precise degree.


Thursday, 4 April 2013

Maya's Ocean System - Using Geometry Base

So I've experimented with Maya's ocean functionality in class this week and it's is a fantastic piece of work, it can be used to quickly create realistic ocean waves by creating a customized NURBS plane to represent the ocean surface and assigning an ocean shader to it.

There is a huge amount of work that can be added to this effect, through the use of it's varied functions it gives a great amount of control and I believe the ocean shader could be customized for a better visual. This would seem to be a great point to get wave creation over and done with and get my project but on schedule, though I am not sure how much functionality this system holds.

Right off the bat, I can say this is a great system in comparison to the others I have been using as the render times are extremely fast. I believe this is due to a function called the "preview plane" which I can use to view the effect of any changes I make to the plane instantly in the perspective window. And if I wish to see the scene as a whole I can render a frame to view the effect on a larger scale. It's is similar the to testing on a small scale I have been doing over the last few weeks but allows me to see how the changes will affect the large scale scene as well.

Tuesday, 2 April 2013

Options & Opertunities

So with problems and fears about the effectiveness of using the fluid dynamics and nParticle systems to reach some kinda of positive outcome for the project, I'm looking for other options. My previous research told me that most of these simulations are done with a set of procedurally animated geometry.

I initially didn't want to go down this route because of the depth of mathematical programming involved with such a task and I did not feel it could be achieved to an acceptable degree within the remaining time limit. I feel I could have done more planning on in the beginning of the project, to avoid this situation.

In any case, geometry seems to be a good way to go about this, so I asked around my classmates and colleges who have an interesting in the area. An classmate (I think Norbert was his name?) suggested using Maya's ocean system, I'll be looking into this further this week.

Friday, 29 March 2013

Problems So Far

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.

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.

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.

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)


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?

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...

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

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
One concern I have about the creation of these waves is the fact that they will need to randomized within a specific range, for a realistic effect, and how they will react when the simulation has been running for a set time. In previous experiments with fluid dynamics, I have had problems with stopping a body of water naturally coming to a state of rest. A form of wave generator may have to created or incorporated in a scripted effect.


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:

  • 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.




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.



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/

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.


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.

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.