Announcement

Collapse
No announcement yet.

[Community WIP] Fish Schooling AI and Assets Package (Open Source)

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

    [Community WIP] Fish Schooling AI and Assets Package (Open Source)

    Fish Schooling AI and Assets Package

    CAUSTICS AND FISH NOW AVAILABLE HERE

    Please vote on things you want implemented on the Trello Board

    These fish models and code have been added to the Community Ocean WIP! DotCam, TK-Master, and myself will be collaborating to bring you the best complete community ocean possible!

    SUMMARY

    Recently I have been working with a team of 4 others on a serious game for my senior project. The game was mostly set in a underwater environment, so there were a lot of fish behaviors and 3D Models to be created. I personally implemented the schooling behaviors using Boids Behaviors, while my artist created the models and textures for a lot of fish. Our time developing the game is almost over, so we wanted to leave the community with something that will allow people of almost every skill level to implement good looking fish into their game! I hope to continue development on the fish logic, and my artist may be convinced to create more fish . If you have any ideas on how to improve our AI, or if you are an artist that wants to contribute your own fish, please do! I will add you to the list of contributors.

    If you use this in your project, I would be more than delighted to see video of your game posted here!



    Older videos:
    UE4 Underwater Environment
    UE4 Fish Flocking


    CONTRIBUTORS
    • Komodoman (Kyle Bryant) - Fish AI and Thread Creator
    • --------------------------------------------------------------------------------------------------------------------
    • PatPetersen127 (Patrick Petersen) - Original Fish Models and Textures




    ART ASSETS

    ALL ASSETS: https://drive.google.com/folderview?...jQ&usp=sharing

    Are you an artist? Would you like to be listed as a contributor? Submit a textured fish or underwater creature through Texture and .FBX that is scaled correctly and is facing the +X direction and I'll add it here with your name! For bigger underwater creatures please include a swimming animation, not required for smaller fish. Also submit an image of the fish that is similar in size to the ones listed below...


    CURRENT AI FEATURES
    • Schooling Behaviors
    • Fleeing Behaviors
    • Seeking Behaviors
    • Chase Behaviors
    • Fish Manager for Easy School Creation



    DOWNLOADS

    Ocean Demo GitHub
    This repository contains both underwater caustics and schooling fish!

    On a more ironic note: both my artist and myself are Pisces working on a Fish package XD
    Attached Files
    Last edited by Komodoman; 11-25-2015, 10:55 PM. Reason: Too many to count

    #2
    Hey guys! I'm the artist that made the fish. I tried to keep them pretty low poly so that you could have lots of flocks and larger schools. Only the biggest creatures (like the sharks) have animations, the rest look fine just moving regularly through an environment. I also researched the average sizes of all the fish so that you can scale them appropriately. I hope you guys enjoy the models! Feel free to ask me any questions.

    Comment


      #3
      Wow this is incredibly generous and cool!

      I'm very interested in this sort of AI behaviour, and love fishies!
      If you put the code on Github it would be easier to contribute to.

      Comment


        #4
        Looks awesome, great work guys..

        How do I add this to my project?

        Comment


          #5
          This is awesome! Thank you
          Storyteller - An immersive VR audiobook player

          Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

          Comment


            #6
            ooh very nice, thanks!
            | QuinnVR | Portfolio | Twitter |

            Comment


              #7
              @Triplelexx, Thanks, I will move it to github as soon as I am able. Was packaging project for senior project today, so just posted what I was able to .

              @kkhaial, I will post a tutorial video as soon as I can, but for now I will leave you with these (rather scant) instructions:

              FlockFish and FishManager Instructions
              --------------------------------------------
              -> Add Code To Project (2 Files: FishManager and FlockFish)
              -> Create a Blueprint that extends FlockFish, and another that extends FishManager
              -> Add a mesh to your FlockFish Blueprint
              -> Ensure under default config of your FlockFish blueprint that:
              1. playerType is set to your player blueprint.
              2. neighborType is set to the fish's own blueprint
              3. MaxBounds and MinBounds is set to the bounds of the volume you want the fish to swim around in. (Ignore this part if utilizing fish manager)

              -> Option 1: No Fish Manager
              1. Place your FlockFish BluePrint in level, ensure isLeader is set to true.
              2. Copy/Paste your leader, and ensure isLeader is set to false on the copy.
              3. Copy/Paste your copy as many times as you want... Tada... Fish Flocking

              -> Option 2: Utilizing Fish Manager
              1. Drag a FishManager Blueprint into your level
              2. Set MaxBounds and MinBounds to the bounds of the volume you want the fish to swim around in.
              3. Add a your FlockFish Blueprint to the "FlockType" section in fishmanager
              4. Set how many fish you want in the flock by setting the float value under "FlockNum" section in fishmanager
              Last edited by Komodoman; 03-07-2015, 08:09 PM.

              Comment


                #8
                How do I add the code?

                Comment


                  #9
                  Originally posted by kkhaial View Post
                  How do I add the code?
                  Although not the prettiest way, what I would do is from the menu select "File->Add Code to Project..." and make sure that the parent class is Pawn (You may have to select the 'all classes' tick). Name the file "FlockFish". Copy paste all my code over into the .h and .cpp files for FlockFish. Do this again for "FishManager", but with its parent class as Actor. If anybody knows a better solution for adding external code to project, please enlighten me :-P

                  Comment


                    #10
                    Added a Trello Board: https://trello.com/b/aHTfdHSR. Vote on what you want to see next, or if you have a suggestion on a card to add, let me know here!

                    Comment


                      #11
                      Originally posted by Komodoman View Post
                      Although not the prettiest way, what I would do is from the menu select "File->Add Code to Project..." and make sure that the parent class is Pawn (You may have to select the 'all classes' tick). Name the file "FlockFish". Copy paste all my code over into the .h and .cpp files for FlockFish. Do this again for "FishManager", but with its parent class as Actor. If anybody knows a better solution for adding external code to project, please enlighten me :-P
                      Gave that a try, it's crashing when I simulate. can you maybe upload the project folder?

                      Comment


                        #12
                        Originally posted by kkhaial View Post
                        Gave that a try, it's crashing when I simulate. can you maybe upload the project folder?
                        Ahh, ok. That's actually an issue with the fish code itself. Right now at runtime the fish code is trying to find the specified player blueprint in world, but when you simulate your player is not spawned, so the fish are throwing around nulls everywhere. My advice for now would be to play, then eject rather than simulating. I will be sure to fix this issue in the next version. As for uploading the project folder, I will setup a scene and post a project as soon I get a chance to go up to the School's lab.

                        Cheers,
                        Komodoman

                        Comment


                          #13
                          Originally posted by Komodoman View Post
                          Ahh, ok. That's actually an issue with the fish code itself. Right now at runtime the fish code is trying to find the specified player blueprint in world, but when you simulate your player is not spawned, so the fish are throwing around nulls everywhere. My advice for now would be to play, then eject rather than simulating. I will be sure to fix this issue in the next version. As for uploading the project folder, I will setup a scene and post a project as soon I get a chance to go up to the School's lab.

                          Cheers,
                          Komodoman
                          Thanks Komodoman, Can you share your post processing effects settings for your underwater scene?

                          Comment


                            #14
                            Komodoman,

                            First, this is simply awesome! Thanks so much for sharing the code.

                            Looking forward to post-processing!

                            Lastly, I did add the code as per your instructions, but when I add it to my skeletal mesh and play, the fish just shoot straight-up, regardless of how I set the Underwater Min and Max. Any ideas or anyone else having the same issue?

                            Thanks,
                            Doug
                            Last edited by dougb; 03-08-2015, 10:01 AM.

                            Comment


                              #15
                              @kkhail, I'll have to wait to giving you the Post Process Volume. I need to ask my friend if it is ok to distribute it, but if he says yes, I will definitely let you guys have that.

                              @dougb, How many units is the Z of your bounds? I ask because the code for checking if a fish is close to max bounds was made hastily so that it would work for my groups senior project. My current code (planning a fix for this with ray casting) adds and subtracts "obstacleDist" for the fishes z location to check if it is close to the surface or sea floor. This value's default is set to 300, which may be way too much depending on the size of your bounds, but can be turned down. That may be the issue you're running into, if not let me know
                              Last edited by Komodoman; 03-08-2015, 10:51 AM.

                              Comment

                              Working...
                              X