|
Tempy111, Sr. Member
Posted: 01 December 2015 11:00 AM Total Posts: 133
Okay, a Md2 I downloaded is fine so I think it has to be related to my file somehow but here goes..
I create an MD2 file with a frame by frame animation called “Stand”. I load it into away and the debug comes back:
“+ Parse Animation : StandØ(
+ VertexAnimator
+ VertexAnimator”
I then go to run the animation..
var animData:AnimationData = (TikalHold.animationLibrary.getAnimation("Stand") as AnimationData); animData.play();
I have tried StandØ( as the name and the other night it gave a different name for it but I resaved since.. loading the MD2 in the program I animated it in seams to display the animation so it should be okay..
anyway.. I get back the following error:
“TypeError: Error #1009: Cannot access a property or method of a null object reference.”
it seams to be the getAnimation line doing it. So for some reason, I can’t parse the animation? but at the same time, didn’t that debug say it DID parse the animation? anyone have a clue.. I must admit to being a little new to MD2 animation ^_^
EDIT: by the way, checked a couple of MD2 animation viewers and can view animation, MD2 model available on request if someone wants to check It out for faults.\
|
Tempy111, Sr. Member
Posted: 02 December 2015 10:38 AM Total Posts: 133
[ # 1 ]
I’ve imported my MD2 into awaybuilder to see if that could help and something was interesting in the animations..
It shows a Vertex Animation Set called ‘null’ with the two animations I mad (Stand and Bow) as Animation Nodes, no Animators. It also shows the two animations outside the AnimationSet. would/could this in any way show something is wrong or help matters?
|
Fabrice Closier, Administrator
Posted: 02 December 2015 10:58 AM Total Posts: 1265
[ # 2 ]
Load your md2 into Prefab, go to vertex Animator.. You can then add/remove/rename and (re)export as md2 or as3.
if your original is correct, when mesh is displayed, if you select it, it should display the vertex animator player.
|
Tempy111, Sr. Member
Posted: 02 December 2015 11:23 AM Total Posts: 133
[ # 3 ]
I’ve been having problems getting Prefab to work.. I downloaded the Version 1 and version 2, both warn there was an unsupported compression method for “META-INF\AIR\has” and neither seam to open when I try to load the swf. which is why I tried Builder.
which does load, shows the Geometry group name (or whatever) as ‘null’ and animation set as ‘null’. when I add a VertexAnimator to the animationset, I can view the animations in builder.
but when I load the awd.. the box has ‘loading geometry’, gets to the last byte (or what appears to be the last byte) and then I get:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at away3d.loaders::Loader3D/notifySuccess() at away3d.loaders::Loader3D/notifyMaterialLibrary() at away3d.loaders::Loader3D/onParserComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at away3d.loaders::AbstractParser/notifySuccess() at away3d.loaders::AbstractParser/parseNext() at away3d.loaders::AbstractParser/parseGeometry() at away3d.loaders::Loader3D/loadTextures() at away3d.loaders::Loader3D/onGeometryComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete()
So I’ve clearly done something wrong ^_^
|
Fabrice Closier, Administrator
Posted: 02 December 2015 12:28 PM Total Posts: 1265
[ # 4 ]
prefab 1.x is for flash 8/10. Not really useful anymore…
Prefab 2.x should run, make sure you have the latest adobe air runtime installed.
as it’s bit unclear from your message if the error is as3 or air related. you say :neither seam to open when I try to load the swf.
what do you load exactly? Prefab should load your md2 right away.
|
Tempy111, Sr. Member
Posted: 02 December 2015 12:53 PM Total Posts: 133
[ # 5 ]
the error is as3 I guess (if you are talking about the away3d 3.6 one). I’m an old CS4 (yeah, no comment) user so Flash 10 is the latest I design for really.
Looks like my Runtimes were a bit out of date for Air.. Updated to the latest but PreFab still doesn’t want to load.. opening the SWF in a browser just claims it didn’t load the swf. when I open Flash player (18), the player window just closes.
so I’m not quite sure what I’m doing wrong with it ^_^:
|
Fabrice Closier, Administrator
Posted: 02 December 2015 02:31 PM Total Posts: 1265
[ # 6 ]
still foggy:
q1: does prefab inits?
q2: doesn’t want to load what? which type files?
q3: you know there’s a security panel for player right?
on mac go to system prefs, on windows, pretty much the same.
You need define a directory to allow player to run.
on win10, you also can allow this in edge prefs.
|
Tempy111, Sr. Member
Posted: 02 December 2015 03:07 PM Total Posts: 133
[ # 7 ]
q1) not as far as i’m aware.
q2) I wonder if i’m using it wrong.. I have away3D in the same folder as prefab files and I try to open the preFab3d.swf.. not into anything to allow me to open a window.. When I try to run the prefab3d.swf from Cs4, I get errors on the output log:
VerifyError: Error #1053: Illegal override of z in away3d.containers.View3D.
VerifyError: Error #1053: Illegal override of z in mx.core.BitmapAsset.
VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
ReferenceError: Error #1065: Variable RectSelect_Ants_Bitmap is not defined.
ReferenceError: Error #1065: Variable DataGuyDebug_Box_Bitmap is not defined.
VerifyError: Error #1014: Class flash.events::NativeDragEvent could not be found.
at global$init() VerifyError: Error #1053: Illegal override of z in away3d.containers.View3D.
VerifyError: Error #1053: Illegal override of z in mx.core.BitmapAsset.
VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
ReferenceError: Error #1065: Variable RectSelect_Ants_Bitmap is not defined.
ReferenceError: Error #1065: Variable DataGuyDebug_Box_Bitmap is not defined.
VerifyError: Error #1014: Class flash.events::NativeDragEvent could not be found.
at global$init() VerifyError: Error #1014: Class flash.filesystem::FileStream could not be found.
at global$init()[/WorkInProgress/Away3D/Away3d_Project/AwayProjectF10/preFab/Engine/prefab3d/InstallPluginProcess.as:21] VerifyError: Error #1014: Class flash.events::NativeDragEvent could not be found.
at global$init() VerifyError: Error #1053: Illegal override of z in away3d.containers.View3D.
VerifyError: Error #1053: Illegal override of z in mx.core.BitmapAsset.
VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
ReferenceError: Error #1065: Variable RectSelect_Ants_Bitmap is not defined.
ReferenceError: Error #1065: Variable DataGuyDebug_Box_Bitmap is not defined.
VerifyError: Error #1014: Class flash.events::NativeDragEvent could not be found.
at global$init() VerifyError: Error #1053: Illegal override of z in away3d.containers.View3D.
VerifyError: Error #1053: Illegal override of z in mx.core.BitmapAsset.
VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
ReferenceError: Error #1065: Variable RectSelect_Ants_Bitmap is not defined.
ReferenceError: Error #1065: Variable DataGuyDebug_Box_Bitmap is not defined.
VerifyError: Error #1014: Class flash.events::NativeDragEvent could not be found.
at global$init()
Not sure why it claims it can’t find some classes but might be key..
q3) yep, Win 8.1, and the folder it’s in is set as a trusted location
Sorry to be soo much trouble.
|
Fabrice Closier, Administrator
Posted: 02 December 2015 04:49 PM Total Posts: 1265
[ # 8 ]
Once you downloaded the air file. you install the app by running the .air file. you get a .exe on your disk, thats the one you start. The swf you reffer to is not to be runned outside air runtime and it cannot be opened with flash ide.
|
Tempy111, Sr. Member
Posted: 02 December 2015 05:12 PM Total Posts: 133
[ # 9 ]
Ah.. I downloads as an zip.. must have missed the bit about renaming it to be an air file..
anyway.. working now. open the MD2 and it says there is an issue
1 subgeometry was found to have uv values out of bounds (0-1). repeat was set to true etc.
some anomalies were found on (1) buffers and corrected where possible.
exported as AWD1, load it and after loading it has the 1009 error still ^_^ but progress is being made. Thanks ^_^
|
Fabrice Closier, Administrator
Posted: 02 December 2015 07:39 PM Total Posts: 1265
[ # 10 ]
its not really an issue, but it sets the rpeat to true, to prevent stretched pixels where uvs are bellow 0 or above 1.
why do you export as awd1 ?
just load the md2, select the mesh if not done yet (the player should show up)
go to vertex animator. correct/generate/rename anims etc. whatever you want.
once you are ok. export either as md2 again or as as3.
using md2, you need enable the parser. then load the md2.
or if you go for the ease of use. export as as3, and just add import someExportName, and add child new SomeExportName().
if you directly compile the project as3 that comes with the export, it will play right away. into the class, you will find how to setup. That’s exactly why this prefabproject is exported
|
Tempy111, Sr. Member
Posted: 02 December 2015 08:02 PM Total Posts: 133
[ # 11 ]
mmm.. okay.. load MD2 into prefab.. shows the animations with correct names ‘Stand’ and ‘Bow’.. both are rough test things but still, good enough.
Export as Md2.. load in away3d.. it loads. Debug traces show Parse Animation for both animations with correct names.
Have event listener “addEventListener(Loader3DEvent.LOAD_SUCCESS,onModelLoadSuccess)”
file is loaded as object name ‘Tikal’.
in OnModelLoadSuccess, I have following code:
var animData = (Tikal.animationLibrary.getAnimation("Bow").animator as VertexAnimator); animData.play();
that should play the Bow animation.
but the getAnimation line seams to have something wrong as I get:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at Basic01/onModelLoadSuccess() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at away3d.loaders::Loader3D/notifySuccess() at away3d.loaders::Loader3D/notifyMaterialLibrary() at away3d.loaders::Loader3D/onParserComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at away3d.loaders::AbstractParser/notifySuccess() at away3d.loaders::Md2/parseNext() at away3d.loaders::AbstractParser/parseGeometry() at away3d.loaders::Loader3D/loadTextures() at away3d.loaders::Loader3D/onGeometryComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete()
I don’t have any textures loaded for it right now which shouldn’t make too much difference as it renders with random default colours.. but this is.. confusing
|
Fabrice Closier, Administrator
Posted: 02 December 2015 08:29 PM Total Posts: 1265
[ # 12 ]
just export as as3 from prefab, and look at the example project.as
that you use it or not will show you how it works.
Prefab automatically asigns the animators, away3d doesn’t.
the as3 exported by prefab also do it for you. So look at these, and you should be back on track very soon.
|
Tempy111, Sr. Member
Posted: 02 December 2015 08:43 PM Total Posts: 133
[ # 13 ]
mmm.. the as3 script says it’s for 4.0 more then 3.6.. how useable is it for 3.6?
|
Fabrice Closier, Administrator
Posted: 02 December 2015 10:54 PM Total Posts: 1265
[ # 14 ]
oh 3.6… that’s unloaded from my memory for a loooong time
There are examples on old google svn for md2’s.
|
Tempy111, Sr. Member
Posted: 03 December 2015 08:35 AM Total Posts: 133
[ # 15 ]
no problem, it’s an older version after all ^_^
Found a old post you did on the google group and found the problem.. I’ll re-post what you said as code:
private function md2IsLoaded(e:Loader3DEvent) : void { var mesh:Mesh = _loader.handle as Mesh; view.scene.addChild(mesh); var animdata:AnimationLibrary = mesh.animationLibrary; var myAnim:VertexAnimator = animdata.getAnimation("walk").animator as VertexAnimator; myAnim.delay = 0; myAnim.loop = true; myAnim.fps = 5; myAnim.interpolate = true; myAnim.play(); }
the problem was, while I was loading as Mesh, I think I was forgetting to load it into a loader and THEN swap it to a mesh via the handle bit. once swapped, the animation works.
now I think I just need to tweak bits to allow movement ^_^ should be able to handle that.
Thanks ^_^
|