Announcement

Collapse
No announcement yet.

Floxy

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

    #16
    Wanted to let you know that playing with the goal attraction strength did help. Still can't yet seem to get the same smoothness in my own project as in the example project, but will play with the settings more and circle back otherwise. Thanks for thinking with me!
    No problem.

    Keep in mind that with 40+ parameters there is a very large sample-space of flocking effects that can result from a change to any single variable.
    That's why I spent time preparing the demo examples and various presets so users had some 'reasonable' effects to start with.

    If your flock is not as 'smooth' as you would like then I would recommend an 'A/B Testing' approach (if you're not already doing so),

    E.g., "A/B Testing Procedure:"

    (1) Choose a parameter to tweak

    (2) Change that parameter's value

    (3) Ask yourself "does the tweak make my flock look better or worse"

    (4) If 'better' then keep the new tweak. Go back to (1)

    (5) If 'worse' then undo the last tweak. Go back to (1)

    Repeat the process until you find the effect you're looking for, then copy the preset to a spare slot to preserve it.

    It sounds like an obvious thing to do and people probably do it in their own way.
    Nonetheless, it is more beneficial if you progress systematically through each parameter in one direction and try to keep a mental (or written) note of what works and what does not, for future reference.

    On the other hand, you could take a random approach and hack at settings in 'any order', but I personally find it more efficient to proceed incrementally so I'm not repeating tests that I have already rejected.

    At some point during your systematic tests there will be a particular parameter that smooths the flock behaviour in the way that you want.
    Last edited by 3S Interactive; 09-26-2020, 07:14 AM.

    Comment


      #17
      Hi borisrrrr.

      It wasn't clear what was going on from your static screenshots so I did a little test to see if I could recreate your issue.

      This is what I did:

      (1) Open the Floxy Birds template/map/level, which is the same template use by the example usage tutorial.

      (2) Go to the
      ContentBrowser\Floxy\Content\SceneExamples\Deer_KiteDemo\Deer\Blueprints folder and drag BP_Deer into the scene, under the existing birds.

      (3) Open the level blueprint for the birds template and drag the BP_Deer reference from the World Outliner into the level blueprint.

      (4) Substitute the BP_Raven0 reference with the BP_Deer reference you dragged in.

      (5) Press PLAY.

      The white arrow representing Agent[0] can be seen flying (it's tiny, so scale up the agent.size in the Floxy details panel if needed), but the deer just stays on the ground, similar to what you described.

      Why is this happening?

      By default, the Floxy Birds template is set to use the [spawned-in-world] script block as indicated by the FALSE setting of the [BRANCH] node connected to the [Event Tick] node.

      If, however, I set the branch node to TRUE so it uses the [place-in-world] script block for the static BP_Deer reference dragged into the scene then the deer asset will fly as expected. Is it possible that your BRANCH node is still set to FALSE and therefore not processing the [placed-in-world] script block containing your BP_Deer reference?

      Perhaps place a break point on the BRANCH and step into it to see if the correct path is being taken.

      Let me know if this helps or not.
      Last edited by 3S Interactive; 01-07-2021, 12:34 PM.

      Comment


        #18
        Hey!

        I'm really grateful I found this plugin, I have been banging my head against a wall trying to get this behavior but finally I have found a plugin that does what I am after .

        The question, which may seem stupid is - How do i use your Butterfly asset with Floxy?

        I want to use your butterflies as a base because I'd like to use your vertex animation setup. However, when I attempt to connect SM_Butterfly to "Agent Mesh" on a default Floxy, I get a weird and undesirable, stretching effect on the butterfly. If you look at SM_Butterfly in the content browser, it has the same kind of stretching taking place. However, somehow in your example, it seems you have managed to get rid of this! I've been trying to study your example, but bizarrely (to me) it doesn't appear that the Butterfly mesh is attached at all? How are you attaching this mesh in the example?

        if i could figure out how to attach your butterfly asset to a default floxy blueprint i would be a very happy person!!

        Thanks!

        Sam
        Last edited by sam hains; 01-13-2021, 10:58 AM.

        Comment


          #19
          Hi Sam.

          >The question, which may seem stupid is - How do i use your Butterfly asset with Floxy?
          No question is ever stupid, if we never ask then we never get any answers .

          I want to use your butterflies as a base because I'd like to use your vertex animation setup. However, when I attempt to connect SM_Butterfly to "Agent Mesh" on a default Floxy, I get a weird and undesirable, stretching effect on the butterfly. If you look at SM_Butterfly in the content browser, it has the same kind of stretching taking place. However, somehow in your example, it seems you have managed to get rid of this! I've been trying to study your example, but bizarrely (to me) it doesn't appear that the Butterfly mesh is attached at all? How are you attaching this mesh in the example?
          The Butterfly UE4 asset is basically a static mesh with a vertex animation material (SM_Butterfly).
          It uses the material instance M_ButterflySingle_Inst for its flapping motion.

          The flapping velocity is very sensitive so I had to play with the SineSpeed and WingFlapDistance params until it reduced the wild stretching/flapping.
          (If you tweak the WingFlapDistance you'll see how sensitive it is).

          I basically converted SM_Butterfly to a blueprint for convenience.

          If you look in the level blueprint of the [ FloxyTemplate-LandingTakeoff_Delayed ] map you can see how I use AgentArray[x].position and AgentArray[x].rotation to drive the place-in-world (or spawned) instance of BP_ButterflySingleLanding.

          The "Agent Mesh" models in the Floxy details panel dropdown list are merely optional 'visual markers' for previewing agent flocking behaviour (i.e., if you want to see something other than white arrows).​

          The Floxy AgentArray is exposed from BP_Floxy so you are free to use the data from any agent to control any other actor in your project.

          In theory, you 'could' use your own static mesh in the "Agent Mesh" dropdown, but the option wasn't intended for anything other than lightweight visual markers. More importantly, you won't have the freedom to do any custom scripting as demonstrated by the various template examples.

          Hope this helps.
          ​​
          Last edited by 3S Interactive; 01-13-2021, 05:36 PM.

          Comment


            #20
            eDIT: **** just saw this tutorial lol https://www.youtube.com/watch?v=cqYAp5KhIck , this show you how to do what i was trying to do more efficiently. Sorry and Thanks !!!

            Hey! Thanks for that. I got it working now, but it was quite a long and frustrating process.

            The question I have now, is there a simpler way to do this? It seems like a lot to go through to set up the floxy system the way its intended to be used... Would be awesome if you provided a minimal "Simple example" with the plugin so we could see how to do this in a more straight forward way, as the simplest existing example (the fish tank demo) is still quite complex for people who aren't advanced BP users (I would consider myself fairly intermediate).

            These are the steps I took, because I needed to get this thing working on a separate level:

            1. Copy the "FLOXY TEMPLATE FOR ACTORS SPAWNED IN WORLD" from fish tank example (seems quite complicated to me but this is the simplest I can find).
            2. Paste this in a standard blueprint, add notes for the various things which break. This step is necessary only because it doesnt seem there is another way to copy this template to an existing level blueprint.
            3. Copy and paste this into the existing level blueprint, reconnecting to event tick, and fixing variable and references that break (such as reference to Floxy controller)..
            4. substitute your specific actor reference and the ForLoop-Type node (in my case BP_Butterfly), replacing all the nodes that depend on the previous blueprint type...
            Last edited by sam hains; 01-14-2021, 03:07 AM.

            Comment


              #21
              No problem, glad you found the tutorial useful.

              Some templates are a 'little' complex, but only because they are demonstrating advanced ways of using Floxy. The templates are merely copy/paste examples to give you ideas of how to connect to agents in various ways, whilst saving you from implementing a solution from scratch.

              You don't actually have to use any of the templates if you don't want to.
              All you really need is access (from your blueprint) to a reference to the BP_Floxy instance in your scene and build from there. Thereafter, your implementation can be as simple or as complex as you require.

              However, implementing your own solution from scratch can be difficult when there is no point of reference of how to do things. This is why the eleven <cut&paste> templates were included. Yes, you would have to substitute your own actor references after pasting a script block (as demonstrated in the tutorial video), but at least you can see exactly what you need to substitute, instead of having to figure it out blindly.

              This copy/paste approach is a compromise for keeping the whole Floxy system within a single blueprint.
              A plugin was considered early on in development but a blueprint was preferred because it was more portable.

              It would be great if you could simply drag & drop a herd of 'deer' or 'cows' and instantly have them run around with a couple of clicks. However, that would require a specialised [deer][cow] subclass, and subsequent subclasses for every other possible type of flocking creature. There would always be something that a user wants but is missing (e.g., an army of rampaging Baby Yodas).

              So, instead of trying to provide an unknown amount of prepared drag & drop solutions, it was decide to avoid subclassing/specialisation and let Floxy focus purely on generating the emergent (flocking) vectors.

              This way, the user can use the templates as guide to creating their own custom solutions for any type of flocking actor they desire.
              Last edited by 3S Interactive; 01-22-2021, 09:18 AM.

              Comment


                #22
                Hello thank you,

                How do I change the lerp to mesh settings in blueprints?


                Click image for larger version

Name:	Lerp_to_mesh.PNG
Views:	20
Size:	30.4 KB
ID:	1861240
                I'd like to be able to change these settings but I don't know the syntax of what to place and where.

                Click image for larger version

Name:	lerp_to_mesh_bp.PNG
Views:	16
Size:	62.1 KB
ID:	1861241


                Thank you!

                Comment


                  #23
                  Originally posted by karostarot View Post
                  How do I change the lerp to mesh settings in blueprints?
                  Hi karostarot.

                  (1) First get a reference to your BP_Floxy instance.

                  E.g., if you have an instance of BP_Floxy already placed in your scene then
                  drag the BP_Floxy reference from the UE4 Editor [ World Outliner ] to your Level Blueprint.
                  (Alternatively use [Get All Actors Of Class][BP_Floxy] to dynamically find the instance of BP_Floxy in you scene).


                  (2) Once you have a valid BP_Floxy reference you can drag off a wire to:

                  {Enable Lerp Agents to Mesh} to get or set this Floxy variable from blueprint.

                  {Lerp Agents to Actor} to get or set this Floxy variable from blueprint.

                  {Lerp Agents from Actor} to get or set this Floxy variable from blueprint.


                  Click image for larger version  Name:	BP_Floxy_reference.jpg Views:	0 Size:	185.7 KB ID:	1861549
                  Last edited by 3S Interactive; 02-11-2021, 06:16 PM.

                  Comment

                  Working...
                  X