Support - Forum aa
« Back to Support» labels from 3dmax not working
Posted on 08.24.2011 by mk, masterkitano
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?
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?
Reply By Nehmad, Ariel 08.24.2011
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.
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.
Reply By mk, masterkitano 08.24.2011
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?
Reply By mk, masterkitano 08.24.2011
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?
Reply By Nehmad, Ariel 08.25.2011
thanks masterkitano, I'm looking at this right now, we'll fix this asap!
Reply By mk, masterkitano 08.25.2011
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]
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]
Reply By mk, masterkitano 08.25.2011
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.
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.
Reply By mk, masterkitano 08.26.2011
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.
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.
Reply By Nehmad, Ariel 08.30.2011
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?
just to be sure...the labels are inside the f3d? or are you setting them by hand?
Popular
- 1. Question of Alpha sorting system
- 2. Rndering issue on AIR Mobile build
- 3. Problems with bone position?
- 4. Is it possible to make a primitive...
- 5. Messed up textures in Flare 3d Studio
- 6. Moving "by hand" the corners of a Plane
- 7. Shapes, splines and knots
- 8. Diferencia entre Flare3D Studio y...
- 9. Transform between two states
- 10. ReferenceError: Error #1074
