Object-Loading Examples

Software: Away3D 4.x

zoimt, Newbie
Posted: 29 July 2011 04:02 AM   Total Posts: 3

Hi there!
I just hope this wasn’t already posted somewhere here, especially since this is my first post. Along these lines, I also want to shout out “Hello!” to everybody.
So, I have been playing with Away3D 4 today and tried all the examples but fail to run any of the object loader examples. When trying to load an obj, I get this:

1067Implicit coercion of a value of type away3d.loading:IResource to an unrelated type StringParserBase.as /Test3/[source path] src/away3d/loading/parsers line 224 Flex Problem
1119
Access of possibly undefined property LOAD_MAP_ERROR through a reference with static type Class. ResourceManager.as /Test3/[source path] src/away3d/loading line 164 Flex Problem
1119
Access of possibly undefined property LOAD_MAP_ERROR through a reference with static type Class. ResourceManager.as /Test3/[source path] src/away3d/loading line 165 Flex Problem
1119
Access of possibly undefined property resource through a reference with static type away3d.events:LoaderEventResourceManager.as /Test3/[source path] src/away3d/loading line 165 Flex Problem
1119
Access of possibly undefined property viewPort through a reference with static type flash.display:Stage3DStage3DProxy.as /Test3/[source path] src/away3d/core/managers line 57 Flex Problem
1119
Access of possibly undefined property viewPort through a reference with static type flash.display:Stage3DStage3DProxy.as /Test3/[source path] src/away3d/core/managers line 140 Flex Problem
1119
Access of possibly undefined property viewPort through a reference with static type flash.display:Stage3DStage3DProxy.as /Test3/[source path] src/away3d/core/managers line 145 Flex Problem
1137
Incorrect number of arguments.  Expected no more than 3. ResourceManager.as /Test3/[source path] src/away3d/loading line 165 Flex Problem 

When checking out the LoaderEvent class, it obviously misses the PARSE_COMPLETE const.
Further, it misses all the other consts expected by ParserBase.

However, I hesitated to post this in the bug section, since this is my first post and maybe this is just something everybody knows about, because this is just an old, deprecated thingy and I’m just the stupid noob. =)

Regards,
Zoimt

   

Somokon, Member
Posted: 29 July 2011 07:24 AM   Total Posts: 75   [ # 1 ]

It looks like you have an outdated version of away3d and/or outdated examples.


Download the latest away3d from github (https://github.com/away3d/away3d-core-fp11) and the latest examples (https://github.com/away3d/away3d-examples-broomstick) and see if you can get them to run.

   

zoimt, Newbie
Posted: 29 July 2011 10:23 AM   Total Posts: 3   [ # 2 ]

I yesterday downloaded the repository from Githup. The development seems to go forward with lightspeed :D

Ok, but let’s see, maybe I grabed an old version via github…
Thanks for the reply. I seriously figured sth like that before but then re-downloaded the repository already, with the same result

::Ok, scratch that, I must be a fool to doupt your words kind sir. I havent tried the example but simply by looking at the newly downloaded classes I realize, I had an outdated version. This is so embarassing.

Thanks for the reply!::

:: And it works! Thanks a bunch! On a different note, whats with the performance? I have a decent graphics card but I get like 2 fps with the obj-example. I haven’t had a look at the subsurface scattering material class yet, but isn’t it emulated with a fresnel-approach and should this be of ok-performance? I experienced the same performance drop with shadowmaps and haven’t tested it yet with the newly downloaded version. Hope this is just a problem with my drivers and I can resolve it somehow.
Anyway,
regards!
Zoimt
::

   

Avatar
Ringo Blanken, Administrator
Posted: 01 August 2011 06:59 AM   Total Posts: 120   [ # 3 ]

Make sure you have wmode direct set.

 Signature 

Freelancer: http://www.ringo.nl/en/
http://www.jiglibflash.com
http://www.awayphysics.com
http://www.away3d.com

   

northmantif, Newbie
Posted: 01 August 2011 07:48 AM   Total Posts: 14   [ # 4 ]

@Ringo Blanken
Do you mean to put in html-template directory to index.template.html file new param :  ‘params.wmode = “direct”;’ for .js section and:  ‘’ for html section ?
//I use Flash Builder 4 and have such template for html wrapper.
I had the same feeling as @zoimt and your tip seems to do the trick. Now apps run smooth.
But I still wonder one thing. Looking into SSSShadingTest.as for example I can not see any specific code suggesting that we use 3D acceleration there. I thought I need to play with Stage3D or Context3D (flash.display3D.Context3D)  to get that new engine running but this example doesn’t import any of these classes. I just see common Away3D classes so I can’t figure out the way flash player runs it’s 3D acceleration mode. I run examples on (Phenom II 955(4x3.2GHz)) so I’m not quite sure that examples run with GPU support (but in fact I have 0-2% use of the processor playing with examples after setting the direct mode).
Is that right that those examples for FP11 are enabled for GPU and this is the way to get it running? I thought I need to play with AGAL to (or simply have to import it). Really don’t get it how these examples run with GPU support having just common Away3D classes imported (way this looks for me)
Hope these questions feel to you little noobish, as I started to play with these eamples last weekend (actually only setting them to get running) and you will have fun to shortly clear out my doubts.
Kindest Pawel

   

Avatar
Ringo Blanken, Administrator
Posted: 01 August 2011 10:03 AM   Total Posts: 120   [ # 5 ]

Yes, you need to set the wmode direct inside index.html. If you use a template to generate it then modify that.

Add the Awaystats into your example, it shows the fps, poly etc, but also has a indicator if it’s run on HW(gpu) or SW (CPU)

Good luck.

 Signature 

Freelancer: http://www.ringo.nl/en/
http://www.jiglibflash.com
http://www.awayphysics.com
http://www.away3d.com

   

northmantif, Newbie
Posted: 01 August 2011 10:26 AM   Total Posts: 14   [ # 6 ]

HW mode turned on!
Thanks a lot. I realize this is the way of handling GPU support (with wmode=“direct” param) and my doubts about complexity to run projects with Away3D in this mode are cleared out. I really thought this is much tougher topic, but it isn’t.
Thanks again!
Cheers.

   

Avatar
Ringo Blanken, Administrator
Posted: 02 August 2011 06:01 AM   Total Posts: 120   [ # 7 ]

No problem, thanks for letting know that you solved it smile

 Signature 

Freelancer: http://www.ringo.nl/en/
http://www.jiglibflash.com
http://www.awayphysics.com
http://www.away3d.com

   

zoimt, Newbie
Posted: 02 August 2011 01:17 PM   Total Posts: 3   [ # 8 ]

Same here. Edited my template so now it’s enabled everytime. Still struggle at another point but since this isn’t directly related to the obj loeader demo, which now runs perfectly smooth, I just have to say thanks again!

Regards.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X