Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Pages: [1] 2

Author Topic: Mixing Morph Targets in Scene and saving in Object mode?  (Read 3461 times)

Nellucnaiv

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
Mixing Morph Targets in Scene and saving in Object mode?
« on: June 23, 2022, 06:33:32 am »

Hi all,
I have often used 0.5 value of one Morph Target and 0.5 of another combined in Scene Mode...or even 0.1 to 0.9 value. The resulting combined Morph Targets are often just the shape I am looking for.
Is there a way to save this as an added Morph Target in Object mode?
The way I understand it is that a mesh is a lot of points that run in the background in a scripted fashion and each Morph Target is a change of coordinates and stored.
I was wondering if there was a way to perhaps export the Object in Scene Mode, pick up it's coordinates and somehow enter them in a script fashion as a "Morph Target New", or is there a way of finding the background script for Morph Targets in the background of Anim8or?
I'm sure many people using Anim8or would love to be able to do this.
I thank you for any responses in advance 🙏👍
Logged

Kevin Gales

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #1 on: June 23, 2022, 07:22:36 am »

I once attempted to solve the problem I have to say I don't think there is a way to do it directly in anim8or.However there are two solutions that might require some coding and serious math.
1.A.This one is easy...I have already posted a simple tool somewhere in this forum that can convert sequence of objects back into anim8or morph targets.I could enhance the code ONLY IF Anim8or could export objects in scene mode *I made a request for this once,to export scene as .obj

(B.Longer solution is also possible,however would require tempering with anim8or such as by hooking the software with a dll and extracting the scene objects.I can achieve this, just that it would require time to code and permission from Steve[anim8or creator] ,since I am not sure hooking the software with an external dll counts as license infringement or something of that sort)

2.Another option is to recalculate morph targets from the scene and use the resultants to inject back as morph targets this can be done directly by editing the an8 file with some code that does the math.* provided the object is not rigged(it is not a figure)

If anyone is interested in how option 2 or option 1B can be implemented let me know let's discuss this
« Last Edit: June 23, 2022, 07:27:21 am by Kevin Gales »
Logged

Nellucnaiv

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #2 on: June 23, 2022, 02:26:25 pm »

Thanks so much for your interest and answer Steve!
I really appreciate it. I fancy your 1B option of being able to export as OBJ in Scene mode but as you say the features is not yet available. I think Steve is a very busy man and totally unselfish, still regularly responding to requests and questions and freely giving up his time to do so much at no cost to anyone. I truly admire him!
I like your Option 2, to open the script of the Anim8or Scene and find the mixed Morph Targets and calculate new coordinates and "inject" them in OBJ mode in the script to create a new Morph Target.
I think it could be quite a calculation but perhaps an Excel Spreadsheet could be made to auto calculate combined coordinates from inputs without having to calculate manually. It would then mean taking the Excel outputs, copying them and pasting them as a New Morph Target into the Object part of the script.
What do you think of the idea? Do you think it could work?
I'm not a Script writer but I can go by example in Notepad and do a test.
Perhaps you have a better way or idea.
I'd love to hear what you think 👍
Thanks again.
Logged

Kevin Gales

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #3 on: June 23, 2022, 02:37:49 pm »

I did some analysis I think I can come up with something based on option 2.However as I said it would be difficult if the target is a figure since well the math used by Anim8or to move coordinates with bones is something I cannot figure out...I'll quickly code something to make a demonstration using a simple cube (which is not a figure but object with morph targets).
Logged

Nellucnaiv

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #4 on: June 23, 2022, 08:31:49 pm »

That would be great if you could write a code for morphing. I use weights in Figure mode, so all attached objects already have Morph Targets.
I personally, would only use it in Object mode.
I look forward to seeing what you come up with!
Logged

Kevin Gales

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #5 on: June 24, 2022, 07:58:03 am »

I am always busy but I managed to cook up something in a few minutes.
I have quickly compiled it into my previous software I posted
Here

So to test this you just have to create a simple mesh,maybe a cube or sphere
>Then create two morph targets
>Then blend those in scene mode
>Save the file and follow the guide in the software
« Last Edit: June 24, 2022, 10:32:07 am by Kevin Gales »
Logged

Nellucnaiv

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #6 on: June 24, 2022, 08:24:05 am »

Thanks so much Kevin!
I tried to follow the "Here" link but it says it contains an error. Really excited to see what you've done!
I think the comma in the URL is causing the problem.
Would you mind checking it please? Thanks!👍
Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 488
  • errm...errr?
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #7 on: June 24, 2022, 08:33:54 am »

https://www.anim8or.com/smf/index.php/topic,6000.0.html
forgive me for intervening but i think this link is good for Kevins 'nifty tool'
« Last Edit: June 24, 2022, 08:36:33 am by captaindrewi »
Logged
!

Kevin Gales

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #8 on: June 24, 2022, 10:33:52 am »

Thanks so much Kevin!
I tried to follow the "Here" link but it says it contains an error. Really excited to see what you've done!
I think the comma in the URL is causing the problem.
Would you mind checking it please? Thanks!👍

Sorry...The problem was duplicate http:// I fixed it...
Logged

Kevin Gales

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #9 on: June 24, 2022, 10:35:04 am »

https://www.anim8or.com/smf/index.php/topic,6000.0.html
forgive me for intervening but i think this link is good for Kevins 'nifty tool'

No worries after all...the forum is for everyone we are here to help each other...
Logged

Nellucnaiv

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #10 on: June 24, 2022, 12:06:47 pm »

Thanks Kevin and Captain Drew.
I appreciate it that we're all here to help wherever we can.
It makes Anim8or a great forum to be on.
I've downloaded your NiftyTool Kevin.
Looking forward to trying it out! 🙏👍
Logged

Nellucnaiv

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #11 on: June 25, 2022, 02:08:09 pm »

Hi Kevin,
Thanks so much for the link for NiftyToolbox.
I tested your experimental "Converting Frame Morph targets in Scene Mode to Morph Targets in Object Mode"
I followed your instructions and made a simple cube Object with 8 points, made 2 morph targets, put the object into a 50 frame Scene, activated 1,0 and 0 and 0 and 1,0 at the beginning and end of 50 frames, chose frame 20 and saved the file with the name you gave.
I inserted it into NiftyTool Object Morph Target creator and it said "successful" and then Processing 2/2 displayed.

I did as you said and waited for the new file to appear in NiftyToolbox but 5 hours later it still wasn't there.
I know you don't have much time and I appreciate your efforts! I just wanted to bring it to your attention.

Hopefully it's something simple in your script?

Thanks again 👍
Logged

Kevin Gales

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #12 on: June 25, 2022, 05:04:58 pm »

I forgot to mention you'll have to set the key you want first...like in your example click on frame 20 and add key do the same for the other morph...
Also NiftyTool must be in the folder C:\NiftyTool ..The file will be saved in the folder
« Last Edit: June 25, 2022, 05:06:49 pm by Kevin Gales »
Logged

Nellucnaiv

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #13 on: June 26, 2022, 12:30:51 pm »

Thanks for the update. I do have NiftyTool in C:/
I did add a key for Morph 01 and Morph 02 in Frame 20 but it still doesn't produce the Anim8or new morph file
How long should it take roughly for the cube I made?
I kept the Morphs simple.
Logged

Kevin Gales

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Mixing Morph Targets in Scene and saving in Object mode?
« Reply #14 on: June 26, 2022, 01:24:24 pm »

Did you check in C:/NiftyTool for the file called morph_ersect ? also could you send me your test file and I'll test it myself
Logged
Pages: [1] 2