Author Topic: labels from 3dmax not working  (Read 358 times)

masterkitano mk   «   on: August 24, 2011, 01:45:42 AM »
hello, I've checked the Test06_Animations.as example in the prerelease, the .f3d model has 2 labels
model.addLabel( new Label3D( "walk", 0, 41 ) );
 model.addLabel( new Label3D( "run", 50, 74 ) );

this are added by script, but in the docs and in the same file there is this comment:
// the labels can be defined in 3dmax, but also can be define manually by code.

but it when I erase the two lines of "addLabels()" the model.gotoAndPlay("walk") fails, I've also checked the model.labels and its empty, it looks like It can't load labels from the .f3d? is this a bug? or is there a workaround?

Ariel Nehmad   «   Reply #1 on: August 24, 2011, 10:15:19 AM »
you are right, but is more a model issue.

in flare 1.x the labels was added to the bones, while in flare 2, the labels in the bones are not really necessary, but they should be added to the skinned model itself.....but they are not in that model.

if you add the labels to the skinned model in 3dmax it should work fine.

masterkitano mk   «   Reply #2 on: August 24, 2011, 06:14:55 PM »
thanks!! that was the problem =D Flare3D forum 2 - 0 me xD. it works, I can use now gotoAndPlay perfectly, however, Im not being able to get any of the Labels instances, im trying this: model.getChildByName("Player").labels, where "Player" is the skinned mesh, however, labels returns 0 as length, and in the trace, returns empty... how can I get the labels references?

masterkitano mk   «   Reply #3 on: August 24, 2011, 06:56:17 PM »
another thing, when I add two f3d with animations, if for instance, anim1.f3d has a label called "walk" wich goes from 0 to 200, and anim2.f3d has another label called "sendKiss" wich also goes from 0 to 200 or from 0 to 'n', and I append both animations, first anim1, then anim2, and then playLabel("walk"), it will play' sendKiss', I believe this is because those two labels have the same frames shared, and the last label added, overwrites the old one, this problem didn't happened on flare 1, is there a workaround?

Ariel Nehmad   «   Reply #4 on: August 25, 2011, 01:24:05 PM »
thanks masterkitano, I'm looking at this right now, we'll fix this asap!

Ariel Nehmad   «   Reply #5 on: August 25, 2011, 01:59:51 PM »
I updated the lib, could you please try again?

masterkitano mk   «   Reply #6 on: August 25, 2011, 02:33:51 PM »
hello, I just downloaded the new lib, it shows me an error, here is the stack trace:

TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
    at flare.utils::Pivot3DUtils$/appendAnimationAux()[Z:\\projects\\flare3d 2\\src\\flare\\utils\\Pivot3DUtils.as:245]
    at flare.utils::Pivot3DUtils$/appendAnimation()[Z:\\projects\\flare3d 2\\src\\flare\\utils\\Pivot3DUtils.as:224]
    at VLPlatform.GameFramework.Containers::VLPAvatar/appendAnimation()[C:\\AppServ\\www\\rool-usa\\clubvlp\\VLPPlatform\\src\\VLPlatform\\GameFramework\\Containers\\VLPAvatar.as:197]
    at VLPlatform::Main/setupAnimations()[C:\\AppServ\\www\\rool-usa\\clubvlp\\VLPPlatform\\src\\VLPlatform\\Main.as:193]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at VLPlatform.GameFramework.Loaders::VLPAssetLoader/updateProgress()[C:\\AppServ\\www\\rool-usa\\clubvlp\\VLPPlatform\\src\\VLPlatform\\GameFramework\\Loaders\\VLPAssetLoader.as:32]

masterkitano mk   «   Reply #7 on: August 25, 2011, 02:46:00 PM »
btw, this happens when I try to attach the first set of animations, im calling the appendAnimation method like this:

Pivot3DUtils.appendAnimation(_mesh, animation);

where animation is the Flare3DLoader and _mesh is the skinned mesh. as you can see, im not passing any default label. hope this helps.

Ariel Nehmad   «   Reply #8 on: August 26, 2011, 03:11:44 PM »
thanks!, I updated the library again ;)

masterkitano mk   «   Reply #9 on: August 26, 2011, 06:19:54 PM »
thx, it compiles right, no more expeptions, however, we are back to the first issue. I digged a little further and found this:

the pure geometry mesh is called model.f3d

and the first set of animations is called set0.f3d and has this labels:
idle, sit, walk, this 3 labels goesfrom frame 0 to about frame 500.

the second set of animations has about 10 labels
the frames goes from 0 to about frame 1200.

so this was my test steps:
y loaded both animations sets, I appended the set0 first, and then the set1
instead of using gotoAndPlay("frameLabel");
i used gotoAndPlay(1);

this way I could see all the frames apended and found this interesting thing:
from frame 0 to 500, everything is correct, because it plays the whole set0.
after frame 500, Instead of start playing the set1, it starts playing again, all the same frames from set0, until it gets to 1000, after 1000, it starts playing ok the whole set1.

in other words, my suspect is that when I attach the second animation, it duplicates the animations that allready had, so thats the trouble, the first set is repeating once.


Ariel Nehmad   «   Reply #10 on: August 30, 2011, 02:19:31 AM »
Hi masterkitano, we are on the middle of some important change, so it is difficult to compile a new version right now...is there any change you send us some test to reproduce this and try to fix?

just to be sure...the labels are inside the f3d? or are you setting them by hand?

masterkitano mk   «   Reply #11 on: August 30, 2011, 11:12:50 PM »
sure, thx!, Im doing a little example of this, could you provide me an email to send you all the links to our f3d files and the example source? thx in advance

masterkitano mk   «   Reply #12 on: August 30, 2011, 11:15:08 PM »
btw, yes, all labels are inside the f3d, added from 3dmax directly to the skinned mesh. no label is made by code.

masterkitano mk   «   Reply #13 on: September 06, 2011, 02:14:16 AM »
thx!!! this issue is finally fixed on the 2.0.41 release :)

William Leonardo   «   Reply #14 on: September 21, 2011, 07:52:50 PM »
hola buenas tardes tengo el siguiente codigo e insertado labels desde el archivo 3dmax y e insertado etiquetas por medio de programacion el codigo es el siguiente:


import flare.basic.*;
import flare.core.Label3D;
var scene:Viewer3D = new Viewer3D(this, "logo.f3d");
scene.addLabel(new Label3D("detenerpelicula",0,70));
scene.playLabel("detenerpelicula",true);
scene.playLabel("detenerpelicula",true);

Pero no se porque mi pelicula me da el siguiente error:

1067:Conversion implicita de un valor de tipo flare.core:Label3D a un tipo String o relacionado.
 y el error
1136: Numero de argumentos incorrecto. Se esperaba 3.

No se si con este codigo puedo generar que mi pelicula me haga un loop del fotograma 0 al 70 y no se valla hasta el fotograma 100 que es lo que tiene la pelicula f3d