Search Unity

[Release] URG! The ultimate ragdoll generator

Discussion in 'Assets and Asset Store' started by The-Arc-Games, Oct 9, 2011.

  1. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for your interest in URG.

    UMA uses a slight variation of the mecanim rig that's correctly ragdolled by URG.
    We've tested UMA and URG and noticed that some characters that are thin and tall don't ragdoll perfectly and require 'absorb shoulders' parameter, and that the rig requires '0 neck exploration' parameter, upon creation, so we will introduce a couple of fixes for this in the next release.

    Regarding multiplayer, URG works well since it does not add any load to the ragdolled gameobjects per se, even when using the URGent classes that act as a bodypart collision / trigger hub, so you'll only need to worry about concurrent physics and physical object synchronization (to avoid that ragdolls look different depending on the client, if this is an issue).
     
  2. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Hi,

    OK then we will wait for the next update and we will surely purchase this great asset.

    Regards
     
  3. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    We were able to reproduce the issue in one PC and with the standard version of URG. The problem is related to the actual DLL and not the functions within.
    To quickly fix this we will create a special urgutils dll that we'll send to you asap.
    Of course we'll also work around the problem in the next URG release.
     
  4. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    hi i cant get this asset (free version right now while testing) to generate ragdoll character of 3rd person controller legacy from standard assests or 3rd person controller mecanim beta standard assets that will properly ragdoll

    it either generates the wrong stuff for the mecanim character or generates what looks to be correct but does not work properly for legacy character

    please advice im using latest unity 3d perhaps that is the problem
     
  5. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for trying out URG!

    Please try to properly t-pose the model, while it looks along the z-axis and you should have no problems. This is also true with Unity's example game characters.

    Additionally, please identify the root bone of the skinned mesh renderer for proper ragdolling, like we show in this video:


    Also, do consider that the free version does not install colliders but only creates the ragdolls physics objects.
    In the free version you'll need to manually add colliders to the body parts. This is time consuming, but actually simple to do.
    Standard and Dev versions install colliders automatically instead.

    Please let us know if the problems persist.
     
  6. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    I notice in the videos that there is a clear all physics button.

    Does this clear ALL physics in the children? Or just the physics created for the ragdoll? What if I have some other colliders/rigidbodies in other parts of the gameobject for things like weapons, triggers, etc. Will they get cleared as well?

    Some what related, when the ragdoll is generated from the body. Is a list of the components that make up the ragdoll generated at all? Is there an easy way in code to turn on or off the rigidbodies that make up the ragdoll, while NOT effecting the rigidbodies that make up any other aspect (say I have a weapon that is made up of rigidbody parts attached to the hand bone... I don't want this getting deactivated).

    Lastly, and this question is purely aesthetic.

    What is UP with the naming convention for everything in this code?

    vargamactor
    clsurgutils.metgodriven(...)
    clsurgentactuator

    And is there a reason you didn't create nice spots for them in the menu tree?

    I wouldn't mind paying the 30 bucks for it and using this tool as it seems nice otherwise. But I'd probably go in and at least set up clean menu names and probably put everything under a namespace and out of my global namespace polluting it with these names.
     
  7. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    Playing with it, I sort of answered my first question.

    Which leads me to bet the 2nd question is a, no.
     
  8. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for using URG!

    Regarding your questions:
    1- The Clear physics buttons are sort of panic buttons. They eliminate colliders, joints, rigidbodies and urgent classes from the root and all chidren or from the source and all children.
    Do note though, that if you press the 'create ragdoll' button again on a previously ragdolled source, URG will 'recycle' colliders, joints and rigidbodies, and re-fit them with the new parameters.
    This works well as long as you don't change source, in which case you're sort of forced to use the 'clear physics' buttons.

    2- The best way to control the ragdoll is by injecting the URGent classes (by clicking the 'Add URG entity scripts to body parts' option). This option creates a class in the source gameobject, that will host a name based list to iterate through ragdolled bodyparts, and achieve easy control over them. So the answer is yes.

    3- Regarding the naming conventions we're sorry that our choice bothers you, but we use a straightforward approach that hopefully won't give you much trouble.
    We're adding this to the reference in the next release:
    NAMING AND CONVENTIONS
    - All variables, properties, classes, etc. are identified by prefixes that are meant to facilitate Intellisense usage.
    - Scripts and classes are identified by the 'cls' (class) particle. 'clsurgsnapshot' is the 'urg snapshot' class and file.
    - Editor scripts are identified by the 'edt' (editor) particle. 'edturganimationstates' is the 'urg animation states' editor script.
    - Variables are identified by the 'var' (variable) particle. 'varsource' stands for 'source' variable.
    - Inspector variables in scripts are identified by the vargam particle. 'vargamspine' is the public inspector variable for 'spine'.
    - All of URG! functions and subroutines are prefixed with 'met' (method). 'metcreateragdoll' is the function for 'create ragdoll'.
    - Serialized class variables are identified by the 'prop' (property) particle. 'propindexes' is the 'indexes' property of its class.

    Please let us know if we can be of further help.
     
  9. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    Well I got the pay version of it.

    Played with it.

    Tried running 4 of my models through it. 2 of which were standard bipeds from Max.

    It could not properly rig them.

    The bipeds would only make it half way down the left arm before failing to add the forearm, fail, then attempt to remove all added rigidbodies/joints/colliders up to that point, and an exception occurs (attempting to remove one of the rigidbody before the joint is removed). So the thing out right fails and leaves with a half rigged model.

    The 2 generic rigs that aren't bipedal just don't rig well at all. Didn't really expect this one to work really, seeing as they were non-standard. One was sort-of bipedal, but missing a head and legs. The other was totally non-bipedal completely.

    As for your naming conventions. Well I guess that makes sense. My last job had a legacy Pick product written in BASIC that had naming conventions like that. They used single letters, and camel casing. With modern IDEs and what not, it really wasn't necessary. But when editing code in the "wed" editor for Pick, it was kinda useful.

    I got the dev version, I may be able to scrap something from it later on. As it stands though, moving forward with out it.
     
  10. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
  11. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    We're sorry that you're disappointed with the initial results, but we'd like to help you use URG at its fullest, and we'll certainly fix any bug that you might find.

    Most common causes for improper ragdoll results are:
    1- Wrong facing. URG uses a standard global reference to determine left, right and up, so models need to be looking forward on the +z axis as shown in the videos
    2- Partial t-pose. Manually posing the model in a T shape is usually enough to solve this issue.
    3- 'Unfriendly' armature. This depends entirely on the model but it is usually possible to move the limbs so that the character's initial pose resembles a T. This modified initial pose is usually not a problem since it can be reverted manually after the ragdoll is created, and animations normally override all the bones in play mode.

    Anyways, regarding that exception for example, we couldn't reproduce the issue, so please consider sending us one of your models for testing.
    We'd only use the model for the necessary tests, and we'd delete it afterwards.

    PS
    Our naming convention originates from Delphi :)
     
  12. Neekhaulas

    Neekhaulas

    Joined:
    Jul 11, 2014
    Posts:
    5
    Hello, I've found URG today while I was trying to do ragdoll and I've tried to use it with human models made with Makehuman but it's not working, I get only a ragdoll with only one box collider, can you help me ? Thanks :)
     
  13. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for trying URG!

    What you see is most likely the fact that the free version does not install colliders but only creates the ragdolls physics objects.
    In the free version you'll need to manually add colliders to the body parts. This is time consuming, but actually simple to do.

    Standard and Dev versions install colliders automatically instead.
     
  14. Neekhaulas

    Neekhaulas

    Joined:
    Jul 11, 2014
    Posts:
    5
    Thanks for your answer :)
     
  15. DirtyHippy

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    224
    When running a build with this imported, there are two non-editor components that reference UnityEditor which is not possible for builds.

    #ifdef'ing out the two files completely when not in the editor seemed to work, but it should be propagated to the main code base.
     
  16. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for using URG!

    Can you please specify which are the classes that give you this problem?
    There should be no runtime classes that reference the editor, in fact.
     
  17. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    Delete.
     
    Last edited: Nov 7, 2014
  18. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Thanks for clearing up the question. You should have no problem dismembering mecanim characters.
     
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hiya, wondered if this asset is working with Unity 5? we had some errors trying the trial demo scene.

    Essentially we want to ragdoll the main characters and then just blend mechanim in from whatever pose things are now (ie knocked back by blast, then animation blends in). I'm hoping to use this :)
     
  20. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for your interest in URG!
    We will upgrade URG to support Unity 5 after its official release, and in particular we will release the new version of the animation states manager, with the functionality you require.

    Unity's 4 mecanim has suffered many, too many, critical changes since its deployment, and we've followed it for months trying to implement an animation states manager for mechanim, to no avail.
    Unity 5 will expose mecanim animation states (as in animation clip data) dynamically, so it'll be possible to hook onto them to create a proper 'from ragdoll to animation' transition.
    Sadly Unity 4 lacks a proper, 'universal' and straightforward way to achieve the above, and because of this URG doesn't offer such mecanim functionality right now.
    Animation to ragdoll and ragdoll to animation are however fully supported in URG when using the legacy animation system (which goes still very strong because of current mecanim's shortcomings).
     
  21. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Please count me in as a tester if required. Happy to purchase the 30 dollar version to help test when the time comes - just let me know!

    I really can't be setting it up manually after blowing 2 hours creating what appeared to be twitching roadkill instead of a ragdoll.
     
  22. Baazar

    Baazar

    Joined:
    Nov 19, 2014
    Posts:
    10
    Hey guys... just purchased the developer kit. I had a quick question for you. I've been looking for it in the comments but can't seem to find it. I'm trying to combine Urg! with UFPS and Shooter AI for the enemies so every limb on a character I shoot is dismembered.
    First of all does "Armature = rig?"

    I've been able to successfully ragdoll my characters and dismember them in the demo scene using the limb menu but I don't understand how to trigger dismemberment outside of the demo scene. The codes given in the reference only generate errors for me, on their own or attached to another script. (Honestly I don't understand a word of it.)

    So what would be the steps necessary to:

    a) Drop a character that would dismember on impact from the ground

    b) Use UFPS to shoot a characters limbs off.

    Thanks!
     
  23. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for using URG!

    Regarding your first question, the armature is not exactly the rig.
    A game character armature is a set of "bones", that in unity correspond to the transforms of the limbs.
    The rig could be explained as the fusion between the armature and the animation system. Basically the rig is used to animate the mesh.
    In unity the rig is basically represented by the skinned animation renderer.
    3d Model=> Armature=> Mesh=> Rig (Skinned mesh renderer)=> Animation.

    Regarding the issues you're having with the dismemberator, we're really sorry that you can't understand its use, so let us help in figuring out what's wrong.

    In particular, the steps to achieve your A) and B) objectives are basically identical, Dismemberator wise:
    1- Create a ragdoll for your character using URG.
    We usually suggest you create an empty scene, disable the character controller, and create a kinematic ragdoll while the character is in t-pose, in edit mode. Rigidbodies must be set to 'kinematic' in a typical setting.
    2- Inject a dismemberator class using the Dismemberator utility on your previously ragdolled character, in edit mode.
    Dismemberator compiles animation data and rigging data into a class that's used for dismemberating purposes.
    3- Create a "trigger script".
    In your A) case, the trigger script could be hosted in your character's root, as long as the root gameobjects is host to, say, a sphere collider set to trigger on the ground.
    Dismembering on impact becomes as easy as cut & paste from the demo once you have a trigger event.
    In your B) case, the trigger script should be hosted in your projectile prefab, or in your weapon prefab. The projectile could use a physical collider or a trigger, and the weapon could use a raycast.
    Once the triggers/ colliders hit the ragdolled bodyparts, you only need a call to the dismemberator function when your damage determination routine decides that's it's amputation time. Particular attention here goes to the layer settings, to achieve collision / trigger between the ground / ragdoll or projectile / ragdoll or weapon raycast / ragdoll.
    Basically, the dismemberator function must be called for each part that you need to separate.

    Actual code can be found in both the demo scene and the reference, but please tell us what's not clear or what particular bit of code gives you errors in your attempts.
     
  24. Baazar

    Baazar

    Joined:
    Nov 19, 2014
    Posts:
    10
    Thanks so much! I'm mostly there... just help me out with the scripting of the trigger event.

    I've got my Zombie, she is ragdolled and dismembered perfectly by replacing the demo robot.
    Everything up to this point works great.

    So I created the trigger script, attach a sphere collider w/ trigger, host it on the zombie root, and I put this code in there? Obviously this doesn't work, it generates namespace errors. Just curious what I'm missing... if you have the code I should replace this with please let me know... (Still learning up on my C#)

    I'm pretty sure once I get this working, it will work with the bulletprefabs in UFPS.

    Thanks so much!

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. //.. class declarations
    5. public Transform vargampart;
    6. public Material vargamstumpmaterial;
    7. public GameObject vargamparticleparent, vargamparticlechild;
    8. //..
    9.  
    10. //..designated separation point inside any user function
    11. clsdismemberator varD = GetComponent<clsdismemberator>();
    12. if (varD != null) {
    13.     clsurgutils.metdismember(transform, varD.vargamstumpmaterial, varD, varD.vargamparticleparent, varD.vargamparticlechild);
    14. }
    15. else {
    16.     Debug.LogError("No Dismemberator Class in host.");
    17. }
    18.  
    And using this code generates this error: "The name `vargamurgentsource' does not exist in the current context"

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class Gibs : MonoBehaviour {
    5.  
    6.     //we are relying on the urgent parts colliders, and assume the ragdoll is physics driven by the time we want to perform separation. this can be achieved for example with the following call
    7.     //clsurgutils.metdriveurgent(vargamurgentsource);
    8.     //using the vargamurgentsource property of the clsurgentactuator class
    9.     void OnCollisionEnter(Collision varpsource) {
    10.         //this switch is used to streamline the urgent integration into multiple object, without the need to create additional scripts that inherit clsurgent
    11.         //vargamcasemanager is a public variable which value is set into the inspector, for the clsurgent host
    12.         switch (vargamurgentsource.vargamcasemanager) {
    13.             //example case
    14.         case -11:
    15.             //ignore disabled actuators, or enabled actuators that don't collide with 'missile' or 'terrain' tagged gameobjects
    16.             if (!vargamactuatorenabled || (varpsource.gameObject.tag != "missile" && varpsource.gameObject.tag != "terrain")) {
    17.                 return;
    18.             }
    19.             clsdismemberator varD = vargamurgentsource.GetComponentInChildren<clsdismemberator>();
    20.             if (varD != null) {
    21.                 float varroll = Random.Range(0,0.99f);
    22.                 if (varroll > 0.75f) {
    23.                     clsurgutils.metdismember(transform, varD.vargamstumpmaterial, varD, varD.vargamparticleparent, varD.vargamparticlechild);
    24.                 }
    25.             }
    26.             else {
    27.                 Debug.LogError("No clsragdollifyDismemberator Class in source D host.");
    28.             }
    29.             break;
    30.         default:
    31.             Debug.LogError("No source manager for case " + vargamurgentsource.vargamcasemanager);
    32.             break;
    33.         }
    34.     }
    35. }
     
    Last edited: Nov 21, 2014
  25. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Thanks for clarifying what was the issue.

    The problem you're seeing is that vargamurgentsource is the URGent manager script (URG's advanced ragdoll type, that requires ragdolling with the specific checkbox turned on), and apparently you don't have an URGent manager in your ragdoll.
    Could be useful in your case, since it'll simplify localized damage management, but'll require re-ragdolling your characters.

    For the easiest solution however we don't require the URGent classes. What you need in the first place is a proper collision event or trigger event, catched by the respective OnCollisionEnter or OnTriggerEnter functions.
    The easiest way to achieve this is to:
    - Create an empty that'll become a 'satellite' gameobject.
    - Put a physic driven rigidbody (kinematic checkbox off) and a sphere collider on the 'satellite', and enable the collider checkbox to trigger. Assign a specific layer to this object, for example 'SatelliteLayer'.
    - Add your trigger script (i.e. clsDismemberatorTriggerScript.cs). Basically you just need the OnTriggerEnter function in it, with a Debug.Log("Trigger OK").
    - Now check the layer matrix and make sure that 'SatelliteLayer' only intersects the desired target layer (i.e. ground or bullet or weapon)
    - Prefab this object, get to your test scene and set the scenario (for example fire let it drop to the ground, or fire a bullet at it). We expect a "Trigger OK" message in the log window.
    - Now edit your 'Satellite' prefab and enable the 'kinematic' flag on its rigidbody, and edit the trigger script (i.e. clsDismemberatorTriggerScript.cs), and add a global variable

    Code (CSharp):
    1.  
    2. public clsdismemberator vargamDismemberatorHost;
    3.  
    Then, edit the OnTriggerEnter function and add
    Code (CSharp):
    1.  
    2. clsdismemberator varD = vargamDismemberatorHost; //the public var we just declared. You can really just delete this line and replace varD with vargamDismemberatorHost in the following lines.
    3. if (varD != null) {
    4.   clsurgutils.metdismember(transform, varD.vargamstumpmaterial, varD, varD.vargamparticleparent, varD.vargamparticlechild);
    5. }
    6. else {
    7.   Debug.LogError("No Dismemberator Class in host.");
    8. }
    9.  
    Finally, drag the 'Satellite' prefab into your character's root (or any suitable child gameobject), and drag the Dismemberator of the character into the designated vargamDismemberatorHost slot of the clsDismemberatorTriggerScript of the prefab.

    Now you'll just need to make sure that the designated trigger happens!

    Please let us know how it goes.
     
    Last edited: Nov 21, 2014
  26. Baazar

    Baazar

    Joined:
    Nov 19, 2014
    Posts:
    10
    Thanks for this @The Arc Games! I'll be honest, you'll have to dumb it down more for me.

    The more I've tinkered with this the more lost I've become. I'm still not getting any dismemberment. (Might it have to do with my rig? It doesn't have an "Armature" only "Zombie->Hips->Legs/Spine etc")

    I think you left something out of this line
    I have my kinematic ragdolled dismemberater zombie. There is a sphere satellite trigger prefab on the satellite layer with the script below attached. Moving another sphere into does nothing and turning off kinematic to let it fall just triggers ragdoll not the dismemberator.

    And one more thing, If I attach the script to for example "pistol bullet" I can't connect it to any vargamDismemberatorHost because it's not an active game object until it's fired.

    Here is my script. Does this look correct to you? I have this attached to my prefab which is underneath my Zombie parent.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using clsurgutils = U_r_g_utils.clsurgutils;
    4.  
    5. public class TriggerScript : MonoBehaviour {
    6. public clsdismemberator vargamDismemberatorHost;
    7.         void OnTriggerEnter(Collider varsource) {
    8.                 Debug.Log ("Trigger OK", gameObject);
    9.                 clsdismemberator varD = vargamDismemberatorHost; //the public var we just declared. You can really just delete this line and replace varD with vargamDismemberatorHost in the following lines.
    10.                 if (varD != null) {
    11.                         clsurgutils.metdismember (transform, varD.vargamstumpmaterial, varD, varD.vargamparticleparent, varD.vargamparticlechild);
    12.                 }
    13.                 else {
    14.                         Debug.LogError ("No Dismemberator Class in host.");
    15.                 }
    16.  
    17.         }
    18.  
    19. }

    Looks like I'm also getting 2 errors:

    No Dismemberator Class in host.
    UnityEngine.Debug:LogError(Object)
    TriggerScript:OnTriggerEnter(Collider) (at Assets/TriggerScript.cs:15)

    (But there is a Dismemberator on the Zombie parent.)

    and

    Bone not indexed. Aborting.
    UnityEngine.Debug:LogError(Object)
    U_r_g_utils.clsurgutils:metdismemberpart(Transform, Material, clsdismemberator, GameObject, GameObject, Boolean, Boolean) (at Assets/UltimateRagdollDeveloper/Scripts/U_r_g_utils/clsurgutilities.cs:771)
    U_r_g_utils.clsurgutils:metdismember(Transform, Material, clsdismemberator, GameObject, GameObject, Boolean, Boolean) (at Assets/UltimateRagdollDeveloper/Scripts/U_r_g_utils/clsurgutilities.cs:723)
    TriggerScript:OnTriggerEnter(Collider) (at Assets/TriggerScript.cs:12)
     
    Last edited: Nov 21, 2014
  27. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    All right we're getting close.
    For a start, the line left out can be ignored, it was a typo since its relevant info is reported below, in our original reply.
    Then, the 'Armature' is basically just a name for the gameobject that hosts the skinned mesh renderer. It's critical for dismemberator compilation purposes, but since you're able to dismemberate your character using it in the demo scene, it should be already OK.

    Secondly, the 'Satellite' logic uses the Game Character as host, not the pistol bullet.
    Hence why the satellite must be a child of the game character.
    So, once you've dragged the 'Satellite' prefab as a child of the character, drag the character's Dismemberator instance into the vargamDismemberatorHost slot in the inspector.
    This is why you get the "No Dismemberator Class in host", because the variable is null unless you assign it a Dismemberator instance in the inspector - of the "Satellite" prefab you just added to your character -.
    As indicated in our example, the Satellite must be able to trigger on its own, to be able to dismember properly. So check the layers as per the info above. Use the demo scene as a reference for a better understanding.
    Lastly, the "pistol bullet" prefab should just need to worry about being a valid trigger for "Satellite", so you don't need the trigger script into the "pistol bullet" prefab. You probably just need a kinematic rigidbody, or setting layers right, in your "pistol bullet" prefab.
    NOTE: if you're using ballistic projectiles (shot through force), keep in mind that they might be just too fast to trigger -anything- because they travel literally beyond any trigger faster than what's needed to activate the triggers (but this is a Unity limitation that must be solved using raycasts).

    Lastly, the "Bone not indexed." message in not really an error, but a Debug error message.
    It means that dismemberator tried to separate a bone for which there's no animation data. This can happen for a number of causes, but most common is that there's no vertices attached / painted to the relevant bone.
    Choosing a different bone, with some vertices attached, should be enough to initiate a bone separation.
     
  28. Baazar

    Baazar

    Joined:
    Nov 19, 2014
    Posts:
    10


    Yeah I'm doing all that. I have the character in the vargamDismemberatorHost. The debug log says "Trigger Ok" but no dismemberment happens.

    Again the dismemberment works if I attach the zombie to the main camera and run your demo but not if I drop her to the ground.

    I'm not quite sure what to look at in the demo since you have your showcase script I'm not sure what actually is triggering the dismemberment and there is no object similar to the one we created on the Ratman...

    I'm sending you an email with my scene file, it's just a copy of the dismemberment demo with my zombie in it and everything above... maybe you can tell me what's wrong with it?

    Thanks again... I appreciate the support.
     
    Last edited: Nov 21, 2014
  29. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Does anyone know if URG! still works with Unity? Seems like the last update was over a year ago.
     
  30. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and sorry for the late reply, but we didn't receive the usual email after your post.
    Rest assured that URG still works perfectly. The last official update is from a while back because of the frequent changes to mecanim (we've released two internal updates for a few customers that needed help with their games).

    Sadly, mecanim still lacks a couple of features that'd allow URG! to make a full transition to unity 4, but all in all all of URG's features work correctly.
    The only true caveat is in the ragdoll to animation feature using mecanim, for which we still don't have tool for.

    Ragdolls, dismemberation and per-bodypart actuators work perfectly even with mecanim.
     
  31. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    I purchased the Standard Edition a while back and so far I've been pretty happy with the results. It takes a bit of tweaking and experimenting to get the results you want (especially with the dismemberator), but overall it's amazing that you were able to build such a complex asset.

    I have one important question though: Is there a way to dismember models with multiple meshes? I was able to dismember a simple, older model built with a single mesh. However, when I tried to use a new model, built with Mixamo Fuse, I couldn't get it to work. I'm suspecting this is because Fuse models have multiple meshes, but I'm not sure. If so, is there a work-around for this?
     
  32. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi There!
    Just discovered this amazing asset!
    Two quick questions if I may :
    1)Is it integrated with playmaker? if not, are you planning to do it?
    2)For the plants and trees I will use a software called Speedtree (compatible just with unity5).
    The output of this software is Not .asset, but has a proprietary extension. Is still a mesh of course and a normal game object. Do you think that can be problematic for the dismembering option?

    thanks in advance
     
  33. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    Edited...

    Hi. I want to use your ragdoll creator on a penguin. On first try it worked fine with the create ultimate ragdoll from the game object menu. But on create kinematic ragdoll (with the option kinematic checked) it started jumping around and vibrating as if some colliders are interacting. I need to activate the ragdoll and deactivate it in real time from a script.

    My penguin has its own colliders on many joints for other reasons in the game (the colliders are set to isTrigger, and there is a box collider and rigidbody on the model to begin with.

    If my prefab has colliders of its own that I need for other purposes is it possible to use URG in such a way that they don't conflict? Like maybe I only use one type, and URG! only uses another?

    Also after finding the demo scene I still can't find out how to activate and deactivate the ragdoll from a script.

    Thank you.
     
    Last edited: Jan 28, 2015
  34. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi.
    Thanks for contacting us and thanks for the kind words.

    Multiple meshes are normally not dismemberable because they are divergent from Unity's game character guidelines, and 3d artists are often unaware of the intricacies of proper game character development and rigging (you can have a beautiful 3d model, with minimum triangles and proper skinning, that's not rigged to a proper game character armature).

    There are a couple of URG dismemberation workarounds, but sadly they're model-based. Please consider sending us the model for a test. We will only use the file for this case and we'll delete it afterwards.
     
  35. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for your interest in URG!

    1) URG! is currently not integrated with Playmaker but to our knowledge you can use URG! with playmaker pretty straightforwardly. Check out this link as a reference, for example: https://matthewwaring.wordpress.com/2014/01/14/using-playmaker-with-code-quick-introduction/
    Of course you'll still need to refer to Playmaker's documentation for the specifics, but you only basically need to perform calls from Playmaker to URG!'s public functions.
    At the moment we're not planning to integrate URG! with Playmaker.

    2) As long as you can access the skinned mesh renderer of the tree, and each tree is skinned with at least one bone at design time, D will be able to process it and you'll be able to dismember it. Keep in mind however that speedtree is usually deployed to render hundreds or even thousands of dynamic scene props at runtime.
    We really can't tell what performance D will have with such a source, since it all depends on the Speedtree implementation.
     
  36. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for using URG!

    The 'jumping around' issue is normally what you suspect: colliders pushing eachother away.
    The solution to this is pretty simple:
    1- Make sure you have a 'Ground' or 'Scenery' layer, assigned to the ground and static scenery objects.
    1- Create a new layer and name it 'PenguinRagdoll'
    2- Assign this layer to the armature of your penguin (all the gameobject that have a ragdoll collider)
    3- Access the layer collision matrix (Edit=> Project Settings=> Physics) and make sure that 'PenguinRagdoll' collides only with itself and, for example, 'Ground' and 'Scenery', and any other layers you want the ragdoll to interact with.
    Once the ragdoll and action colliders are in different layers than the ragdoll, the jumping will disappear.

    Regarding the kinematic ragdoll, activating it and deactivating is a matter of turning the 'is kinematic' flag of its rigidbodies off or on.
    To turn a game model into a ragdoll the functionality is available thanks to the clskinetify class, and is implemented in the ratman_kinetified gameobject of the demo scene.

    Code example:

    Code (CSharp):
    1. //... into user chosen event code (press of a button, trigger, collision, etc.)
    2. //uncheck all rigidbody Kinematic flags of this transform and its children
    3. clsurgutils.metgodriven(transform);
     
  37. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Well, I was able to get this working most of the way. I imported the model into Blender and combined the meshes (using "Ctrl+J"). Then I imported into Unity, used the URG Ragdoll maker, and then used the Dismemberator. Almost all of the joints dismembered correctly (using your dismember test script). Yay!

    However, it appears that the problem areas are the ankle joints and upper leg joints. At these locations, there are 2 sub-meshes merging together (the pants and shoes meshes, and the shirt and pants meshes respectively), so I suspect that's the problem. I just have no idea on how to go about solving the problem from there. There has to be something I can do in Blender to make URG! make the cuts at a slightly different location (example: a little bit lower on the leg, so it doesn't try to cut where the 2 meshes intersect) but I'm not sure how. Maybe something to do with bone locations or changing what vertices are connected to which bones? (not sure how to do that)

    If you're willing to help me out with this I will gladly send you the Blender file! I want to understand the process though, because I will have to do this to several other models as well. Where should I send the file to, if you would like to help?
     
  38. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Thanks for updating us on the issue.
    We'd gladly take a look at the model source to see what can be done. Please email or pm us a link to your model file's storage. NOTE: the .blender file is enough so we don't need textures and such. Please compress the blender with 7zip or similar for ease of transfer.
    It's most certainly a matter of following best practice, so our 3d artist should be able to put you on the right track.
     
  39. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Does URG work with Unity 5 beta or will you update it when 5 is reday?
     
  40. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    What is your email address? I'm new to the forums, so I'm probably missing something, but I can't find it anywhere....
     
  41. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    You can use a PM or your mail client with the e-mail address you find in URG's readme file.
    We'd rather not put it on the forums to avoid e-mail address scavenging programs' spam.
     
  42. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    We haven't tried Unity 5 beta, but we're committed to bring URG! to Unity 5 so we'll get our hands on it ASAP.
    In particular, Unity scheduled the ultimate mecanim fix for version 5.1 of the program, so hopefully we'd be finally able to release a new major version then.
     
  43. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    My model has colliders already on the armature which are used as triggers. (Like a hand collider is used to see if a hand touches something). Will creating a ragdoll replace the existing colliders? Is there any way to keep the URG ragdoll maker from conflicting with the existing colliders?
     
  44. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Just open the "options" tab, then de-select the "clear existing physics and colliders" checkbox. This will work the first time. If you hit "generate ragdoll" again it will double everything up, so make sure to use a prefab for this in case you have to re-do it.

    Arc Games will correct me if I'm wrong, but I'm pretty sure that's all you'd have to do.
     
  45. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Yes as jedsteen suggested in his reply, if you disable "clear existing physics and colliders", it might be just enough.
    Making sure your game character is prefabbed before you create the ragdoll is the easiest way to revert the changes thanks to the prefab=> revert button on the inspector.

    However as a best practice, interaction triggers and colliders should be hosted in specific gameobjects with their own prefabs, children of their intended model transforms. Thanks to this, replacing the entire model and respective ragdoll (for example after a 3d model update) becomes a less complicated process, since you'd only have to attach the interaction triggers and colliders gameojects by dragging a prefab of them, rather than by adding a component to an armature bone.
     
  46. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi all.
    We just wanted to point out that the wordpress install that fueled unitysupport.thearcgames.com passed away, because of an evil bot.
    Goodbye wordpress, we hardly knew ye.

    We're replacing wordpress with an awesome custom engine, but it'll take still some time.
    Please check the youtube channel for video instructions or write here if you have any question.

    Thanks for your patience.
     
  47. ProtoJazz

    ProtoJazz

    Joined:
    Nov 27, 2012
    Posts:
    19
    Any word on a unity 5 version yet? I get a failure when building to PC standalone, probably when building to anything but I havent tried other targets.

    I also get an exception in unity 5 when building the ragdolls, but they seem to generate find, or well enough. Some of the scripts have some compile issues, but I wasnt using most of them, so I removed them or commented out where they were being used.
     
  48. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    Hi and thanks for using URG!
    The new URG! version is being released this week, with all necessary fixes for Unity 5 usage.

    Thanks for your patience.
     
  49. The-Arc-Games

    The-Arc-Games

    Joined:
    Oct 3, 2011
    Posts:
    225
    We wanted to inform all that we've decided to introduce a newly requested, last minute feature, and that the new release is delayed until this month's Tuesday 31.
    It's the ability to include an non animated part into the dismember process, so that D can be used on characters props also (shields, weapons, etc., posed that they host a MeshFilter on their root or first level child), so that it doesn't become necessary to perform specific, different function calls to drop a shield or weapon or to dismember a part.
     
  50. Miggy

    Miggy

    Joined:
    Feb 9, 2010
    Posts:
    76
    Looks like a very powerful tool. The code naming convention does tend to hurt the eyes though - especially after midnight. If you guys could just use some upper case letters or underscores to separate words it would go a long way in improving code readability. :)

    So the new version is coming out soon? Will this support ragdoll-->animation with Mecanim?

    Thanks.