Forum rules - please read before posting.

Integration: Importing animals with animations, controls, AI into Adventure Creator

Hi,

I have bought AC and I must admit that this is one of the best assets for Unity ever. I like all your tutorials but I would like to see some examples with animals like this complex Poly Art: Cougar or simpler Cat and dogs etc.

I know this is the matter of mechanim animations in Unity but there are places like below and I do not know how to properly use all settings for animals (neck bone, left hand, ...). You can see additional scripts from Cougar asset like Malbers Input, Animal, Active Meshes etc.:



There a lot of animals Unity assets even with advanced controls and AI but unfortunately not AC compatible.

I know I can write my own controllers but the quicker and better way is to use existing scripts, controllers etc. that work great in Cougar asset.

You can see an animation controller and parameters for a cougar:



One of them is this asset Poly Art: Cougar for Unity (youtube) with all scripts, camera controller, animation controller and example scenes. I would like to make an integration into AC.

That integration could be helpful for all similar animals assets I hope. 

Could you recommend me how to do that simplest way?

Other questions:

1. How to use mechanim animation of animal bones, do you have AC examples? Humanoid is not a problem.



You can see CG and Pelvis (bones) here on YT video.

2. How to integrate camera scripts from Couguar asset?

There are scripts like:
  • M Free Look Camera
  • Change Target
I think I should somehow convert them into AC game camera or create a new AC game camera and simulate this MFreeLookCamera script.




3. How to add other camera (scripts) effects like Volumetric Ambient Occlusion to AC camera?

Cheers







Comments

  • Welcome to the community, @cybersoft.

    The provided AC character scripts are indeed geared towards humanoid characters.  Given the complexity of animal and creature behaviour, a "one-size-fits-all" approach would be unviable - and custom controllers would certainly be necessary to get them acting properly.

    As there's also no end to the variety of character possibilities, AC's approach is to open up the API as much as possible so that custom integrations can be made according to each one's specific needs.  Tweaks can be made to the AC side of things, however, if necessary to aid such tasks.

    When you say custom controller, are you referring to an Animator controller - or a complete motion controller?  I'd expect that the latter would be necessary for the behaviour shown in the video you've linked to.  In this case, AC's own motion controller can be disabled by changing the Player/NPC component's Motion control field to Manual.

    That will then relinquish all motion to custom scripts.  How you approach such a script largely depends on the specific character's needs.  Are you looking to make such a Player or NPC?  If a Player, will you be relying on AC's movement method during gameplay (e.g. point-and-click), or just have the character respond to AC's Actions / Cutscenes?

    The character's "intended" position, rotation, talk state etc can all be read via the Char script.  See also the "Custom motion controllers" chapter of the Manual, as well as this tutorial.  That link also gives a couple more examples at the top - though they are for PlayMaker / Unity's ThirdPersonController assets, the principles involved should be largely similar.

    With regards to your other questions:

    1. How to use mechanim animation of animal bones, do you have AC examples? Humanoid is not a problem.

    I'm afraid I will need some context here, as the video link doesn't explain what you mean.  What is it you're looking to do, exactly?

    2. How to integrate camera scripts from Couguar asset?

    Custom cameras can be made by attaching the "Basic camera" component (from the Inspector's 'Add Component' menu) to your own camera script so that it becomes 'visible' to AC's Scene Manager and various Camera Actions.  More on this can be found in the "Adding custom cameras" chapter of the Manual.

    3. How to add other camera (scripts) effects like Volumetric Ambient Occlusion to AC camera?

    Camera effects must go on AC's MainCamera, as this is the camera that actually does the rendering (the GameCameras are just used for reference).  If need be, the values of such effect components can be altered when a camera switch occurs.  This is covered in more detail in the "Camera effects" chapter of the Manual.
  • Hi Chris,

    Thank you so much for a quick reply.

    I came from web development and my primary focus will be on VR game-like solutions and design of game-like applications in 3D virtual environments. Adventure Creator will be my first choice and the best.

    I need Unity for education and your asset is the best of the best in my opinion for that purpose. "Learn and play" together with AI would be a near future not only in schools. I am going to recommend your asset to my students and cooperating companies.

    ...a "one-size-fits-all" approach would be unviable - and custom controllers would certainly be necessary to get them acting properly.


    I agree that would be difficult but maybe for a large group of objects like mammals could be viable.

    ...AC's approach is to open up the API as much as possible so that custom integrations can be made according to each one's specific needs.  Tweaks can be made to the AC side of things, however, if necessary to aid such tasks.

    ....

    1. How to use mechanim animation of animal bones, do you have AC examples? Humanoid is not a problem.

    I'm afraid I will need some context here, as the video link doesn't explain what you mean.  What is it you're looking to do, exactly?

    It would be great if you could make a tutorial with animals or maybe non-humanoid creatures. I think about mammals like: cat, dog, mouse, horse etc. In most cases they are all similar, so they have 4 legs, 1 head and 1 tail. There are some differences how they walk and run but that are only details.



    Maybe you could implement a special addition for a player: "mammals" with only one checkbox and adding 4 legs and tail and external motion controller.



    But main problem is to integrate the external motion controller.




    That will then relinquish all motion to custom scripts.  How you approach such a script largely depends on the specific character's needs.  Are you looking to make such a Player or NPC?  If a Player, will you be relying on AC's movement method during gameplay (e.g. point-and-click), or just have the character respond to AC's Actions / Cutscenes?

    Good question Point-and-click for NPCs and players and integrating external motion controllers maybe mapping only.

    We have to consider existing animation controller and input controls.

    Move from point A to B could be simple with only one "walk" animation or "walk" could be more complex like path-finding (walk, jump. crawl). 

    Let's assume we have a complex animation controller for mammals and walk, run, jump, swim, fall etc.

    I think about mapping of input controls from external motion controllers for Point-and-click and that could be easiest integration. We need only walk and run.

    If I need a "walk" action I want to use that and not to dig into controllers details.  I have "walk" movement in an external controller and that could be very complex like walk left or walk right, walk back etc. 

    This is a complex cougar motion controller example:





    So we need to map this way:

    "walk" cougar motion controller (any external controller) ----->  point-and-click "walk"

    And the same way "run".

    The character's "intended" position, rotation, talk state etc can all be read via the Char script.  See also the "Custom motion controllers" chapter of the Manual, as well as this tutorial.  That link also gives a couple more examples at the top - though they are for PlayMaker / Unity's   ThirdPersonController assets, the principles involved should be largely similar.

    ThirdPersonController could be a good example.

    I have contacted the author of the cougar asset (they have more animals) and asked to make integration with AC. He seemed to be interested in this integration. You both could get more customers

    Cheers



  • edited March 2018
    To be clear: having AC provide a realistic mammal behaviour *by itself* is outside its scope as an asset - which is a framework for traditional adventure games.

    However, a pre-existing motion controller can be linked with AC via an integration script.  In this case, the specifics of the animation controller doesn't need to be "known" by AC - since that'll all be controlled by the separate controller.  Bone transforms, parameters, etc, can all be left to the external script.

    To integrate with AC's "point and click" behaviour, it essentially comes down to a motion controller being able to respond to being given waypoints to move to, and to either walk or run.  AC handles the pathfinding / "move command" management, while the custom controller responds.

    If the author of the asset you mentioned would like to reach out to me to discuss such a script, I will certainly assist.
  • To be clear: having AC provide a realistic mammal behaviour *by itself* is outside its scope as an asset - which is a framework for traditional adventure games.

    Yes, this is a little bit specific. I am going to add this functionality by my selves.

    If the author of the asset you mentioned would like to reach out to me to discuss such a script, I will certainly assist.

    That would be great because the author created a lot of assets and one of them Horse Animset Pro (Riding System) and the second one awarded as finalist in 2017 Little Dragons: Tiger are also recommended for adventure games.






Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.