Announcement

Collapse
No announcement yet.

[Community Project] WIP Weather & Ocean Water Shader

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by DIFTOW View Post
    @DotCam

    Well we don't have to simulate nearly as much as some of those examples. There are tricks/fakery that can be done.
    I'm not much of a coder, but if you need any 3D meshes or animation, just let me know
    If you want to contribute any fish meshes, they will soon be a part of this project, and I would add you as a contributor here.

    Comment


      Originally posted by Komodoman View Post
      If you want to contribute any fish meshes, they will soon be a part of this project, and I would add you as a contributor here.
      I can do programmer art quickly, but I probably wouldn't have the time to do anything polished since I'm working on my own game and don't really have much art help.
      ---------------

      I'm having a little dilemma with figuring out how to get objects to collide with the Ocean surface. If anyone knows how, please help me! :P

      Want to get this galleon floating =3
      Click image for larger version

Name:	galleon.jpg
Views:	1
Size:	345.3 KB
ID:	1068373

      How do I get simple sphere collision to collide with the ocean surface?

      Also, how do I use complex collision for players walking on the ship, while using simple sphere collision for the ocean?

      Comment


        Originally posted by Komodoman View Post
        If you want to contribute any fish meshes, they will soon be a part of this project, and I would add you as a contributor here.
        Any specific fish you want? Whats your poly budget? Diffuse map. Spec map? Normal Map? Displacment map? Bump map?
        Tek LLC a personal Candaian Company running BlenderTek & UnrealTek is currently looking for help to bring back submarine simulator gaming with a new genre of sub sims: Cold War! (1945-1991) Operation: Trident SubSim Dev Diary Thread - Donations

        Comment


          Originally posted by DIFTOW View Post



          How do I get simple sphere collision to collide with the ocean surface?

          Also, how do I use complex collision for players walking on the ship, while using simple sphere collision for the ocean?

          Add your mesh to a Blueprint, and add a BuoyancyMovementComponent to the components tree as well as your mesh.

          Comment


            Originally posted by Handkor View Post
            I added a ballast sample

            Link

            Here is what the test point structure looks like. Not only can you vary the buoyancy of each point but you can also change the volume of each point. In the first image I've set each corner of the cube to be small and only a small positive buoyancy. The two spheres are large volumes and LMB and RMB varies their buoyancy between 1 and -1 making the front or back sink or float.
            [ATTACH=CONFIG]29698[/ATTACH]
            [ATTACH=CONFIG]29696[/ATTACH]
            [ATTACH=CONFIG]29697[/ATTACH]
            Thank you! Some great ideas in here! We were disabling buoyancy while underwater and reverting to vectors. Did you convert your entire buoyancymovement.cpp code into BP for this little demo, because I (we're) wondering how to get the test points in the regular ocean projects so we can set a bunch of them in a series of nested structs (testpoints_front_left_struct, TP_front_right_Struct, TP_front middle_struct, TP_front_struct, TP_front_up_struct, TP_front_down etc. all holding say 4 test points each which we can adjust the bouyancy of as a group.
            Tek LLC a personal Candaian Company running BlenderTek & UnrealTek is currently looking for help to bring back submarine simulator gaming with a new genre of sub sims: Cold War! (1945-1991) Operation: Trident SubSim Dev Diary Thread - Donations

            Comment


              Originally posted by Nsomnia View Post
              Thank you! Some great ideas in here! We were disabling buoyancy while underwater and reverting to vectors. Did you convert your entire buoyancymovement.cpp code into BP for this little demo, because I (we're) wondering how to get the test points in the regular ocean projects so we can set a bunch of them in a series of nested structs (testpoints_front_left_struct, TP_front_right_Struct, TP_front middle_struct, TP_front_struct, TP_front_up_struct, TP_front_down etc. all holding say 4 test points each which we can adjust the bouyancy of as a group.
              I will be adding in these structs to the code in the plugin, which can then be used by the BuoyancyMovementComponent code as well as your blueprint. Improving the workflow for buoyancy setup is badly needed atm, and this seems to be an interesting way of simplifying it all (thanks again Handkor!).

              Just so I understand you correctly you want individual points as well as a container struct that can hold multiple points?
              Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

              Comment


                Originally posted by Nsomnia View Post
                Any specific fish you want? Whats your poly budget? Diffuse map. Spec map? Normal Map? Displacment map? Bump map?
                I would say under 1000 polys, I will check with my artist to see what range he stayed within. Any fish that can be found on earth will do . At least a texture map, but a bump map would be appreciated too!

                Comment


                  Originally posted by Komodoman View Post
                  I would say under 1000 polys, I will check with my artist to see what range he stayed within. Any fish that can be found on earth will do . At least a texture map, but a bump map would be appreciated too!
                  Bump (greyscale for bumpiness) or normal map (purple green blue kinda for faking geometry)

                  I wouldnt mind modelling a few. Rigged? .fbx format I assume? +z up +x forward 1x scale sized to the what they would be in real life?
                  Tek LLC a personal Candaian Company running BlenderTek & UnrealTek is currently looking for help to bring back submarine simulator gaming with a new genre of sub sims: Cold War! (1945-1991) Operation: Trident SubSim Dev Diary Thread - Donations

                  Comment


                    Originally posted by DotCam View Post
                    I will be adding in these structs to the code in the plugin, which can then be used by the BuoyancyMovementComponent code as well as your blueprint. Improving the workflow for buoyancy setup is badly needed atm, and this seems to be an interesting way of simplifying it all (thanks again Handkor!).

                    Just so I understand you correctly you want individual points as well as a container struct that can hold multiple points?
                    This is how we plan to implement it for all types of ships yes. That way fishing boat can have just 4 test points on all 4 corners, but a tanker could have say 20 structs of 4 test points each to represent watertight compartments. Then if that area is damaged it will apply a negative buoyancy (drag the boat down, sink) at that point. Warships would have more structures (more collections of test points) because they are hardier.

                    The problem we faced was we had to disable buoyancy once underwater so that idea only worked on the surface until Handkor showed us that little demo. Gonna mess with it and see if we can maintain a buoyancy value across all test points under and above water, we also faced the issue that underwater it would rock based on the waves since it tests from the waves height if I'm not mistaking.
                    Tek LLC a personal Candaian Company running BlenderTek & UnrealTek is currently looking for help to bring back submarine simulator gaming with a new genre of sub sims: Cold War! (1945-1991) Operation: Trident SubSim Dev Diary Thread - Donations

                    Comment


                      Originally posted by Nsomnia View Post
                      Bump (greyscale for bumpiness) or normal map (purple green blue kinda for faking geometry)

                      I wouldnt mind modelling a few. Rigged? .fbx format I assume? +z up +x forward 1x scale sized to the what they would be in real life?
                      @Nsomnia, That would be amazing! .fbx is best for sure.

                      I know some of our current fish are rotated to face +Y, so I created the fish blueprint so you could rotate the fish mesh, but facing the +X is much better, since you can plug in the model without doing any rotations. Same thing with scale, right now one has to manually scale in the blueprint editor in UE4 (Which isn't terrible since 1 unit = 1cm) At some point I'll have our artist go in and change all the current ones to +X and correctly scale in maya to shorten implementation time. If you plan on doing a larger underwater creature then include a swim animation of some sort, if it's a small fish it doesn't need an animation. I don't think our current fish have bump or normal maps, but having them does increase quality, so it's completely up to you ! Incredibly thankful for the offer... if you don't mind me asking, what fish do you have in mind?

                      Edit: I think it's a good idea to have a standard scale and direction for the fish project as +X and scaled to real life. I will add that as addition requirements for future addition, and ensure the old models follow this standard when my artist or I has a chance. ( I can maya too XD)

                      Cheers,
                      Komo
                      Last edited by Komodoman; 03-13-2015, 07:07 PM.

                      Comment


                        Originally posted by L0rdCha0s View Post
                        Add your mesh to a Blueprint, and add a BuoyancyMovementComponent to the components tree as well as your mesh.
                        Alright, next issue. How do I make it so the buoyancy is based on 8 collision spheres and not the pivot of the static mesh so my ship isn't underwater?
                        Click image for larger version

Name:	underwater.jpg
Views:	1
Size:	195.7 KB
ID:	1068391

                        Comment


                          Originally posted by DIFTOW View Post
                          Alright, next issue. How do I make it so the buoyancy is based on 8 collision spheres and not the pivot of the static mesh so my ship isn't underwater?
                          [ATTACH=CONFIG]29839[/ATTACH]
                          As long as youve set the set points to where you want your water line to be and there is 4 in a rectangle (to start) you should be able to drag it above the water and it will float. Otherwise it weights too much so you need to apply a mass scaler node or adjust the buoyancy value.

                          Originally posted by handkor
                          demo project
                          I just looked through the source code, didnt realized you had just recreated it in blueprint. I should be able to migrate it across to have a blueprint verison of the buyouancymovementcomponet.cpp thanks!
                          Tek LLC a personal Candaian Company running BlenderTek & UnrealTek is currently looking for help to bring back submarine simulator gaming with a new genre of sub sims: Cold War! (1945-1991) Operation: Trident SubSim Dev Diary Thread - Donations

                          Comment


                            DotCam - I see you are from Vancouver, I myself am from Vancouver too (born and rasied) - recently moved to Lillooet! Thanks for the welcome - I've been a casual reader of the forums for a while now - first time getting involved.

                            I'll give your spline tool a try. I've got some good Flowing water textures that I could use to give the better effect.

                            Comment


                              Nsomnia:
                              Hi, I'm Komo's artist. I've been keeping the poly count as low as I can without sacrificing shape. I haven't been following any strict number, especially since there's a large range of size and detail with fish. For most, just color is fine, but bump is always helpful. I've only been rigging/animating the largest fish. Realistic scale and +x forward is great, I still need to do that with my fish. And any real fish is good, especially the ones people know. I've been working with common North Atlantic fish so far.

                              Comment


                                Originally posted by Nsomnia View Post
                                As long as youve set the set points to where you want your water line to be and there is 4 in a rectangle (to start) you should be able to drag it above the water and it will float. Otherwise it weights too much so you need to apply a mass scaler node or adjust the buoyancy value.
                                I don't see this rectangle with 4 points. I've been trying to do this for hours
                                Can you send me an example scene or be more specific?

                                This guy used spheres along the base of the ship, like Assassins Creed. How do I do that? Skip to 1:15 into video.

                                Originally posted by TK-Master View Post
                                Oh nice job DotCam! looks like you beat me to it, I finished adding my buoyancy code to your ocean yesterday and I put together a few objects of various shapes and densities.. here is a video showing it
                                Also added a pirate ship for good measure! Check it out


                                Btw, did you figured out what was causing the performance hit? it all runs the same to me, the buoyancy barely has any impact on performance if you use few test points.
                                I know how to make and place sphere colliders, but not how to make the buoyancy use those instead of the model. I don't want to calculate buoyancy on the actual mesh, and 4 points on a rectangle seems too low.

                                EDIT: I tried adjusting the pivot to see if the buoyancy location would change, and it did, so the buoyancy is based on the pivot location entirely.
                                That rules out weights being too much, and it shows its not using '4 points' either, just 1 pivot. This is not what I want at all. How do I fix this?
                                Last edited by DIFTOW; 03-14-2015, 06:52 AM.

                                Comment

                                Working...
                                X