Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Transfer Poses to other models
Old
MiR
Guest
 
Status:
Posts: n/a
Default Transfer Poses to other models - 11-12-2006, 06:07 AM

Hi, I am new to Alice but a fairly expierienced Programmer.
My question is a very simple one: Is there any possibility to speed up the process of building poses by transfering the pose information to other modells of a structurally identical type (from one He-Builder based model to another etc.)?
The workaround can be based on internal or external tools anyhow.
I found out, that the exported objects are saved as a zipped struture of xmls, so maybe there is a way by unzipping the models info, copying the desired poses and rezipping the model into a new one. But as I don't have time to analyse the structure in detail, maybe the programmers can help with a clue?
Has anyone tried such an approach?
The background for this is, that I am trying to do some movie work (thinking of machinima or so) with Alice and this limitation produces work where no work should be needed.
As far as I understand, this feature remains unimplemented due to the educational approach Alice is dedicated to. But maybe there is an external tool anywhere around for cases like this?

Thx for help
Michael
   
Reply With Quote
Transfering is possible in general
Old
MiR
Guest
 
Status:
Posts: n/a
Default Transfering is possible in general - 11-12-2006, 07:06 AM

Ok, I tried this and actually this works out quite fine.
To transfer the poses and methods between equivalent models (he to she or so) the following procedure worked for me:
1. Save the models as a2c to disk
2. rename the models to .zip
3. unzip the models to different folders
4. copy the changed/additional folders from the source model to destination model
5. change in the rootfolder of the model the file elementData.xml with an editor.
Here we have to change
a) the child elements: add the missing methods/poses
<child filename="sitting">
b) the missing item elements named
<item criterionClass="edu.cmu.cs.stage3.alice.core.crite rion.InternalReferenceKeyedCriterion">methodname</item>
6 save the elementdata.xml
c) Change the element poses accordingly, otherwise the poses will not show up in the properties page (though they will work properly:-)
<property componentClass="edu.cmu.cs.stage3.alice.core.Pose" name="poses">
<item criterionClass="edu.cmu.cs.stage3.alice.core.crite rion.InternalReferenceKeyedCriterion">sitting</item>
</property>

7. Zip the file and path structure back into a zip file
8. Rename that into a2c and put it into the alice gallery path

Voila, your new model is now a trained person

Next thing to try is, if this works also to structural only partly equivalent models. Perpare for crashes

The Attached file is an POC example. The poses and methods standup/sitdown where originally defined for Mary, a She-Builder model, then copied with the explained method to Karl, a He-Builder model.
Attached Files
File Type: a2w Mary_n_Karl.a2w (1.20 MB, 407 views)

Last edited by MiR; 11-12-2006 at 07:38 AM. Reason: Forgot something
   
Reply With Quote
Old
thetrippster
Guest
 
Status:
Posts: n/a
Default 11-12-2006, 11:50 AM

wow my brain hurts umm just wait for dr jim to respond he knows more than me
   
Reply With Quote
Great Work
Old
DrJim
Guest
 
Status:
Posts: n/a
Thumbs up Great Work - 11-12-2006, 12:04 PM

My brain - and some of the other parts of my body I've been acused of thinking with - hurt also. But it's a good hurt.

Thanks MiR - you've made a great start on something some of us have wanted to do for a while. In my case, never really could get through of the details of the xmls file - could just decipher enough of it to know there was real potential there.
   
Reply With Quote
Quick Note
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Quick Note - 11-12-2006, 08:39 PM

Very brief note and something you may already have tried.

I knew this worked for the figures provided with Alice and just verified it worked for your added pose. If you have one figure of a type with a pose, any very similar figure (i.e., any based on shebuilder) can use that pose, although the pose will only be listed for the initial figure (see screen shots).

If you try to use a figure with a structure missing some of the parts involved (say the Ninja in this case), Alice gives an error. Not sure how close the figures have to be for the sharing of poses to work but I'm running some trial cases.
Attached Files
File Type: zip Anna & Mary.zip (136.6 KB, 442 views)
   
Reply With Quote
Old
MiR
Guest
 
Status:
Posts: n/a
Default 11-18-2006, 07:13 AM

Hi DrJim,

I already noticed, that you can use poses on foreign models by implementing an object variable on the classmethods in the class that owns the poses, like the birdmodel in the gallery does. But this approach implies that you have to implement at least one model of the pose-owning class anywhere in the scene.
This means, if Karl should use the poses, Mary has defined, you have to use Mary and uses her poses on Karl. This will result in problems, if you don't want to use Mary at all in the scene. And, of course, the constraints you mentioned imply on this, you only can use structural similar (mostly identical...) models.
On the other hand, the xml-based approach in fact also is only usable on similar models, because the xml-structure is very complicated and changes have to be well defined or Alice will blow up the whole thing.
If you for example try to use leftforearm poses on a part called leftarm you will have to rename some directories, make changes to half a dozen xml-files and check the hierarchy by hand. Not a very effizient approach.

Maybe the whole thing isn't very much more than a proof of concept.
   
Reply With Quote
Some Comments
Old
DrJim
Guest
 
Status:
Posts: n/a
Cool Some Comments - 11-18-2006, 12:06 PM

First, these comments are aimed towards moderately experienced programmers using Alice for animated videos - not beginning CS students. I strongly support keeping the Alice focus on the latter group. However, as a filmmaker I find Alice to be such a useful tool that I feel it would be a shame not to try to improve its usefulness in that area as well.

". you have to implement at least one model of the pose-owning class anywhere in the scene."

Given the way Alice 2.0 implements "inheritance" - I'm not sure this is bad. I personally would just as soon have only one object in Alice with the added poses and methods - this way when something is changed, I don't have to recreate a large number of objects or try to remember which ones have the old method and which have the new.

"And, of course, the constraints you mentioned imply you only can use structural similar (mostly identical...) models "

I think the constraint is that you can use things that have the same hierarchy up to the named part - if that isn't true, nothing will work. If it is true, but other parts named in the original are not present - Alice usually will do the pose but throw an error message. I'm hoping this is just a syntax thing and putting a dummy part name in the top level xml file will solve the problem - but I haven't verified this yet. You can also get some interesting scaling problems - watch "Student1" explode if you use one of "Coach's" poses on him (going the other way can be funny too)- but that's true no matter how you share the poses.

"Not a very efficient approach Maybe the whole thing isn't very much more than a proof of concept."

It is time consuming, but - thanks to the great library of characters in Alice - making only slight changes to Gallery characters can be an efficient way to generate animated scenes. I hope you'll continue your efforts.

(To illustrate the last point, I've attached two shots of characters I'm currently using - "Mommy Dewey" and "Lady Grandma". Using "Grandma" it took less than an hour to animate a scene with her sitting on a park bench and looking around - including a shot that emphasized you can see through her glasses. For reference, I've filmed the same scene live twice as an actor and both times it took about the same amount of time as I spent on the animation. ("Grandma" is a better actor, but I'm better looking - and I control her skin texture !))
Attached Images
File Type: jpg MommyDewey.JPG (28.2 KB, 221 views)
File Type: jpg LadyGrandma.JPG (68.8 KB, 219 views)
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.