Announcement

Collapse
No announcement yet.

Animating a ship on the ocean

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Animating a ship on the ocean

    I would like to animate a ship in heavy seas. Is there any way to determine where the waves will be and how they will move in the PhoenixOceanFDTex shader? Any tips would be most welcome.

    Something like this amount of waves in terms of height and frequency.
    http://youtu.be/ANv3rMZ-tA0


    Currently I'm stepping through the timeline and animating the ship determined by the waves visible through the mesh preview.

  • #2
    I had a good low res sim and animated the ship accordingly. I then shifted the cache path to the network and simulated again but the waves have now all changed position which means reanimating. Surely changing a cache path shouldn't actually have any affect on the simulation!

    Comment


    • #3
      the texture should not change the behavior, or you speak about the waves in the simulation? seems like i'm missing something.
      ______________________________________________
      VRScans developer

      Comment


      • #4
        yeah I have no idea why it changed, but it did

        Comment


        • #5
          actually what role plays the simulation? seems like you just need a ship that follows the waves of the ocean texture. why you involve simulation here? i mean - you can't just get our ship sample scene and modify ship animation, actually the simulation is not affected by the displacement texture, and when your ship is lifted above the ocean level, the contact with the water is lost and there will be no foam and other simulation effects, this makes the simulation unnecessary.
          ______________________________________________
          VRScans developer

          Comment


          • #6
            this is what I suspected from the tests I have done. The boat interacts with the (very unnatural) flat surface of water, the wave shader creates the ocean surface and the resulting simulation is like a blobmesh/frost merging of the two. So essentially when the ship is cresting a wave it is no longer interacting with the actual water surface. Likewise when the bow crashes down below the surface of the water (but not the surface of the ocean) the fluid behaves very strangely.

            I think you only have to look at some reference video to see why anyone would want the surface of the ocean to be the surface of interaction.

            http://youtu.be/4Nxeav0ivhM

            look at the shot at .44 - the bow is crashing through the peak of a wave - in a simulation this is above the phoenix water level and would provide no interaction.

            So is there any way to get fluid interaction as demonstrated in the video using Phoenix?

            Comment


            • #7
              Perhaps I can create turbulence in the fluid grid to mimic ocean waves, but how would I know where to animate the ship? And how would I merge that into the ocean surface?

              As an added bonus I am getting weird render issues with the grid and the ocean shader - the edge of the grid is clearly visible, like the sim and ocean shader are out of sync with each other. Am I missing a setting?

              Click image for larger version

Name:	oceanMerge.jpg
Views:	1
Size:	81.4 KB
ID:	854495

              YES - sorry forgot to update Ocean level when changing Initial fill up attribute.

              It would be nice to wire these two parameters together, 'Ocean Level' is visible but I can't find 'Initial Fill' in the dialogue
              Last edited by magilla; 28-10-2014, 04:29 PM.

              Comment


              • #8
                well, you can drive the water by the ocean texture, using the mapper. i did it once for a demo and it worked, but you will have troubles merging the simulator and the ocean extension. the problem is that you will have the waves twice, once in the simulator and second in the displacement. of course you can render in cap mode and create the ocean geometry by hand (just rectangle with a hole for the simulator), but the waves in the simulator will differ the outside waves, because the map is interpreted as velocity, but when it is used as displacement, it is interpreted as offset. this produces different look of the waves and the worse part is that the small details are lost. if you add them by displacement, the big waves will be present twice, once in the simulation and second in the displacement. actually i have never seen such a simulation.

                anyway, i will prepare small sample for this, but the hard work for blending the simulator and the displaced waves remains.
                Attached Files
                ______________________________________________
                VRScans developer

                Comment


                • #9
                  thank you for the file, using the mapper may work. I had resorted to sticking grids to the hull to simulate the crashing waves with the idea of using the render gizmo to blend the grids - but it seems any fluid in conjunction with the displacing shader has proved to be ineffectual even with relatively small waves as the foam and splashes don't pay any attention to the displaced surface so they either appear to be floating or submerged and generally out of sync with the ocean. Hmmmm, it's a tricky one!



                  And there is always more questions
                  Can I create white caps on the displaced ocean shader?

                  Comment


                  • #10
                    the mapper sample file doesn't seem to be working. I get no results in the grid, no initial fill, nothing.

                    using v2.2

                    eh - works when I create a new grid - I see how it works now. Why do you use an Output instead of the Ocean shader itself? Also what is the reason for changing the output colour map to remove the blue channel?


                    Possibly can create a large low res grid for the immediate ocean with a higher res sim around the boat.

                    'Inertial forces' does not work with mapper, the grid has to be static

                    Time set to 0 disables the mapper. What is the value of 1 representing? It seems to take about 100 frames to get to the map values - although this seems very different in the scene you supplied, must vary with the scale.

                    The mapper seems to be working quite well but I have a lot of those topographical stepped lines in the grid.

                    This just refuses to work in my scene - the only difference being the scale. 1unit = 20cm in your scene. 1 unit = 1 metre in mine

                    This scale issue seems to affect everything I do with Phoenix, not being a programmer I don't understand the reasons for it, but as a user I can say it the single worst 'feature' of Phoenix. I really hope you remove whatever limitation is in the software that creates the need for these seemingly random scalings

                    Things are going from bad to worse, The mapping method works ok as long as I use the same scale as the example file but at 3 million voxels still looks really low res and blobby without any detail in the waves. I can add the ocean displacement in at render time to fake the detail but the displacement is shifting everything in X (sideways) not Z (up/down)
                    Last edited by magilla; 29-10-2014, 10:00 PM.

                    Comment


                    • #11
                      i'm using output to remove the extra offset of 0.5 added to the red and the green component, and to control the wave height. the ocean texture is designed to produce output in the format that vraydisplacement mod is using, but the mapper is designed to use different color format. the mapper just interprets the color as vector, in contrast with vray displacement that uses gray color as zero level.
                      the blue channel is removed because i was afraid that it can produce vertical shift of the ocean level. but you can restore it, i had no time for experiments.
                      and yes, the inertial forces is problematic with the mapper, but if you need only linear movement, you can workaround this, add in the output texture an offset to the corresponding channel. red is x direction, green is y direction, this multiplied by the rgb level parameter must be equal to the grid speed in cells/sec
                      the time parameter of the mapper controls the influence of the mapper over the simulation. it means how many time the mapper needs to replace the value of the affected channel. the bigger is the time, the stronger is the mapper. 0 means immediately, that just replaces the velocity of the grid by the velocity of the mapper. however, replacing the velocity you actually disable the simulation, because the velocity is an essential part of the dynamics.
                      the "topological steps" are grid artifacts, you just need bigger resolution and some render time displacement to hide them.
                      the scene scale is very important for the simulation. many artists overrate their intuition and are adjusting the parameters by hand. i can always recognize such scenes in a movie. for example the ocean texture by default uses the "wind speed" control, but you can change it and tweak the wave parameters by hand. you have just two important parameters - wave height and wave speed, but nevertheless the chance for naturally looking result is not very big.
                      you have to use the original ocean texture for rendertime displacement, not the output. i have explained about the differences in the vray and mapper texture interpretation, i suppose this is the reason for your last problem.
                      ______________________________________________
                      VRScans developer

                      Comment


                      • #12
                        thank you - that all makes sense.

                        The displacement is using the original oceanTex, not the output. If I increase the displacement value in the rendering rollout it shifts in +X rather than Z. Not sure why it does this but I suspect this is just an aberration. I will send a file to support if it persists in a new grid.

                        The velocity attribute in the mapper is set at 1, if 0 is immediate, what does 1 represent? So, if I set the attribute to 0 and use a mask to holdout the path of the boat this should create an area immediately around the boat that is subject to the sim rather than the mapper?

                        The mapping is tiled across the fluid surface by default, if I add a uvw unwrap for the mask everything works fine until I play through the timeline and the mapping is lost. I assume this is because the surface topology is modified over time. Is there a way to map the surface, if not how do I add the mask?

                        Click image for larger version

Name:	maskError.jpg
Views:	1
Size:	96.5 KB
ID:	854569

                        image shows the affect of masking the mapper with the default tiled UV's

                        ** if I unwrap and it loses the map, re-applying the unwrap causes a crash.
                        Last edited by magilla; 04-11-2014, 04:40 PM.

                        Comment


                        • #13
                          one more problem

                          I can get a blobby looking sim with no white caps (may still suffice for long shots) but with this problem the grid is always visible in the ocean

                          Click image for larger version

Name:	edgeGrid.jpg
Views:	1
Size:	74.6 KB
ID:	854572

                          Comment


                          • #14
                            after a week of banging my head against the software I am officially giving up on this

                            at 20 million voxels the stepping is more pronounced, whilst still looking blobby and low res.

                            also, foam/splashes are created along the edge of the grid

                            Click image for larger version

Name:	stepping.jpg
Views:	1
Size:	206.5 KB
ID:	854573

                            if there is actually a way of achieving this with Phoenix I would still be very happy to know but right now I need to actually produce results.

                            Comment


                            • #15
                              i'm not surprised, as i said this is a very hard task. we will add a tool that makes it automatically, and i think even with all the power that we have as programmers, we will experience hard days.
                              ______________________________________________
                              VRScans developer

                              Comment

                              Working...
                              X