Search Unity

Mesh Transformation

Discussion in 'Assets and Asset Store' started by Andrey_Graphics, Jul 4, 2018.

  1. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Mesh Transformation

    With this tool, you can make animations such as transformation wolf man, zombie, mutant, turning a person into an animal, creating a dynamically mask in real time for a mutation or destruction of the body , or creating BlendShapes to change the physique of characters. Works in DX11, it is also necessary that on models "A" and "B" there are the same uv coordinates.




    Mesh Transformation
    https://www.assetstore.unity3d.com/#!/content/120144
    450e015e-d630-40a0-9dfd-6be88351dfff_orig.png 5bba5be1-3f28-43a0-94e9-4572f5d5bde1_orig.png db1adb4a-be7f-4ca0-a215-72d56fb85f6f_orig.png 75dbc43c-0091-4724-bc6d-609c69ae7dd2_orig.png 6d78b094-a99b-4f5a-84cb-8d6fc3f4ac70_orig.png 450e015e-d630-40a0-9dfd-6be88351dfff_orig.png
     
    Last edited: Jul 11, 2018
    Neviah likes this.
  2. Mortalyx

    Mortalyx

    Joined:
    Mar 20, 2015
    Posts:
    2
    Hi man!
    What about count of polygons? Is't fixed somehow in prefabs and models should be always highpoly, or it's up to me and depends on my models (that means i can use any models). The count of polygons in 'A' and 'B' models should also the same?

    Thanks for reply! =)
     
  3. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Hi, highpoly is not necessary, with Lowpoly will work even better, the number of points can be different, but the position of points in uv should be the same.
     
  4. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    882
    I just picked this up and have not even tried it yet, but it seems like it will make for some awesome power up abilities, cut scenes, etc.
     
    Andrey_Graphics likes this.
  5. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Thanks! will soon be updated
     
    MostHated likes this.
  6. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Updated.

    Improved match search;
    Shaders for mobile phones have been added;
    Fixed bugs.


    View attachment 287828
     
    Last edited: Jul 21, 2018
  7. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    178
    I see you plan to update this for the SRP / HDRP - when could we expect that?
     
  8. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Hello, about a month or earlier if there is no problem with SRP
     
    P_Jong and Ghosthowl like this.
  9. therewillbebrad

    therewillbebrad

    Joined:
    Mar 2, 2018
    Posts:
    133
    So could this in real time blow holes in my characters? Leg dismemberments etc?
     
  10. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Hello, Yes
     
  11. therewillbebrad

    therewillbebrad

    Joined:
    Mar 2, 2018
    Posts:
    133
    That's awesome, and since it's just a mesh deformation the performance should scale well I assume.
     
  12. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,785
    to be honest I was rather hoping that this could morph between targets that dont share the exact same verts.
    Oh well.
     
  13. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Works if the number of vertexes is different but not too much, and the position of the vertexes by uv coordinates is the same.
     
  14. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,785
    Hi. let me be clearer.
    I am obviously very stupid but I was hoping to morph between targets with larger differences.
    My apologies if that wasn't clear.

    Totally "user error"

    "Просто потому, что я не могу полностью понять, как его использовать, это не значит, что это плохо."
     
    Last edited: Sep 8, 2018
  15. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,602
    So can you use your own characters with this? also it does support blend shapes? if I read that right. Thanks.
     
  16. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    1) Yes;
    2) yes, can create BlendShapes
     
    Last edited: Sep 16, 2018
  17. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,602

    what about the first question?
     
  18. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Yes
     
  19. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Hello, shaders for LWRP and HDRP have been added, you can already download from the asset store.
    HDRP shaders need Unity 2018.2 or higher and HDRP 3.0 or higher
     
    Ghosthowl, hippocoder and walter_j_r like this.
  20. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    215
    So as far as setup goes for the shooting example you posted, what prep would be required on the model? Or is the destruction functionality just more of a raw mesh transformation than a blend?
     
  21. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Hello, you will need to make a model "B" from model "A" in any program, model "B" is a skeleton with meat, so to speak, but you need to make sure that UV does not change, you can also add UV2. In the video, I showed how it is done. When you load an asset, look at the models, what kind of UV they have and understand. The shooting example is exactly the same transformation, but only by a mask that is created in real time.
     
  22. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    122
    hi there - i purchased this awhile back but the demo does not seem to be working correctly, and the documentation is far too short to help decently. when i start the demo, it shows the red zombie model but if i use the Transformation slider nothing happens. if i look in the Scene view and look at the Human>body object, moving the Transformation slider just makes the other half of the body scale away, but nothing is crossfading between them. i'm in Unity 2017.4.10 on a Mac. i deleted the Meshes folder and nothing changed. assistance appreciated! at least a working demo scene would be nice as i'm pretty sure this one is not working right.
     
  23. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    122
    one more thing - if the demo scene is supposed to work similar to your video post on Sept 6th, it's definitely broken. if i click the mouse on the red zombie body nothing happens. i get a lot of errors of 'invalid 'info' file discovered, no metadata', and i also get a couple of messages similar to this:

    'Assets/Transformation/ShadersAndScripts/TransformationMesh.cs(348,72): warning CS0429: Unreachable expression code detected'

    none of these errors are show stoppers preventing playback, but i think something happened to your code and it's no longer working properly. note that in this case i started with a completely blank project to eliminate any possibility of issues with other packages.
     
  24. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97

    Hello, the folder " Meshes " do not need to be removed, you need to delete the files inside the folder and then click on the "CalculateMesh" button in the script on the models, the script will create a new mesh inside the folder "Meshes".

    Return the folder back, without it, nothing will happen.

    I changed the documentation in version 2018.3.
    I will update the documentation for other versions soon.
     
    Last edited: Jan 8, 2019
  25. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    122
    okay - did a fresh install. clicked CalculateMesh button on all models. verified that meshes were re-created inside Meshes folder. still no change, although i can apparently remove the teeth and eye materials. but i cannot do anything to the body. on the Human, same situation - no transition to the other model.

    on a hunch i decided to open your project up on my PC in Unity 2018.1.9 and that version worked perfectly - i could click on the zombie and damage it, as well as removing eyes and teeth. i also opened a copy of the same project on the PC in Unity 2017.3 and that worked correctly as well. so the problem appears to be Mac related. maybe it's my operating system (10.10 Yosemite)? maybe this is a DirectX 12 shader situation? curious why it doesn't work on my Mac. i even tried it under 2018.1 and had the same result (Unity 2018.2 or higher requires an update to the operating system but i haven't done it yet).

    any help appreciated! at the moment it appears not to be able to run correctly on a macOS based computer, at least under 10.10.5 Yosemite. you did mention the DX 11 shaders, so my guess is that the demo can't work correctly without this or some kind of substitute on a Mac.
     
    Last edited: Jan 8, 2019
  26. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97

    DX11 is needed for the shaders, and the script should work without dx11, dx12 is even better, I have checked on the version 2017.4.1f1, it's possible that the variable is empty, I had this in SkinnedMeshRenderer, in this version the mesh is lost for some reason, and with it, the script loses reference to the mesh to check whether the variables in the place I've marked in the screenshot.

    As for the mac, I do not know, I have windows, I can not check, write me an email, send me this project with a problem after the mesh was created.
    I'll see if anything's broken.


    industrialforest@mail.ua

    upload_2019-1-9_9-46-27.png
     
  27. andoo001

    andoo001

    Joined:
    Jul 19, 2016
    Posts:
    4
    I am getting the same error as metaphysician above, though im on a pc running 2018.3. when i open the demo scenes it throws up about 37 errors, and the LWRP demo cant load the shaders, so pink models. your videos are for a different version. in the videos you have a dropdown for more materials. As im using DAZ3d to create models, the uvs are the same, but there are about 16 uvs per model. (eg the 'body' mesh has seperate uvs for arms, legs, torso, face, head plus many more for eyes etc.) Daz3d is free to download, and im using genesis 8 models, so you might want to check it out yourself. any help would be appreciated.
     
  28. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Hello, can you upload your project with these models to my email for verification?

    industrialforest@mail.ua
     
  29. growling_egg

    growling_egg

    Joined:
    Sep 2, 2012
    Posts:
    60
    Hello - I have just tried the Mesh Transformation asset with the latest version of Unity and am encountering some very strange artifacts in the demo scene when I click on the zombie in the game view.

    The mesh does transform but not the way it seems it's meant to. Have you happened to confirm whether it is compatible with 2019+? Thanks! Looking forward to using this cool looking asset!
     
  30. Andrey_Graphics

    Andrey_Graphics

    Joined:
    Oct 29, 2015
    Posts:
    97
    Hello, apparently when importing deteriorate Mesh files, you need to click on the model and click "Calculate Mesh" to create geometry again