Be Honest

Software: Away3D 4.x

dyoung, Newbie
Posted: 29 April 2015 07:36 PM   Total Posts: 5

Be honest, I have been trying to us Away Builder to create models that can be imported into away3D with no success. I have tried to figure out why I get numerous errors when trying to use this technology. I have spent weeks searching, hunting, researching, attempting to write code to get even a primitive model created in 3DS Max/brought into Away builder or PreFab3d and export awd and then use it. All without success. I get implicit coersion errors or this:

Error: Error #2032: Stream Error. URL: file:///L|/Away3DFlashBuilder/gridbox.awd
at away3d.loaders::AssetLoader/onRetrievalFailed()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at away3d.loaders.misc::SingleFileLoader/handleUrlLoaderError()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

when trying to even cut and paste code to make things work.

And when I go to the forum and search for answers I see that most of the posts stop being answered in 2013. And the forum questions asked after that mostly go unanswered.

Let me speak for a lot of people out here in the world. Would someone please put together a simple tutorial (That works without outdated formats) explaining how to create a model in Max, Maya, or whatever program/ import it into Away builder/add textures/save the file and then get it to work on the screen. I am using Flash AS3 to create my code. There must be someone out there that is doing this with some success. Please reach out to the rest of us and help us understand how to make things work.

I am quickly becoming convinced that this open source code is in disarray and that there are issues even within the Away platform.

And I find it very comical that Adobe would recognize and approve Away 3d at a time when things appear so volatile. 

Boil it down. Somebody Please Put together some decent and comprehensive tutorials or write a book that covers AWAY3d 4.x for those of us that want to utilize the technology.

And since this post was made in 2015 I will be surprised if it gets a reply.

signed - Very Frustrated Fan of the Technology

 

   

Avatar
Fabrice Closier, Administrator
Posted: 29 April 2015 08:25 PM   Total Posts: 1265   [ # 1 ]

Wow that’s some frustrated post! smile

Well thing is: there are tons of examples where models are being loaded. So you probably not have searched much. There’s even dedicated example repo on github. Here another one on this site.http://away3d.com/tutorials/3DS_Max_Workflow

Any demo, any tut that loads an external file will use loader3D and on exception of enabling a specific parser and some very specific optional parameters, you basically set a loader, add listeners to it, not to forget the error ones, and do load. Pretty basic and similar to as3 generic loader.

as you seam to want a tut, let me make one on the fly for you.
_loader = new Loader3D();
_loader.addEventListener(LoaderEvent.LOAD_ERROR, onResourceError);
_loader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
_loader.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
_loader.load(new URLRequest(“a valid url to your awd), null, null, new AWD2Parser() );
you must of course add the handlers onResourceError, onAssetComplete and onResourceComplete to receive the events in your code. The loader is here as class instance, because you will be then able to remove these listeners on resourceComplete.

The error you get is a basic error to flash/as3 in general, so beyond the scope of this site or away3d in general, probably why such answers do not get answered.
In short the api makes 3D easy, but will not teach you AS3. There too, after 2 secs googling.  http://curtismorley.com/2008/02/08/actionscript-error-2032/
That’s why adding error listener do matter.

short story, even if flash and away do make 3d easier, you still need to spend time experimenting and polish your coding skills. We all started at same point.

“since this post was made in 2015 I will be surprised if it gets a reply.”
surprise then! smile

oh and “Somebody Please Put together some decent and comprehensive tutorials or write a book”
hahaha, well now that you know how the loading works, I expect very soon a link to your tutorial!

 

   

dyoung, Newbie
Posted: 29 April 2015 09:25 PM   Total Posts: 5   [ # 2 ]

Wow, I certainly did not expect a response so quickly. First of all thank you very much for the response.

Yes I have seen the code in your tutorial. The thing that appears to be different in the code you posted and the code that I have been working with are the two null entries in the _loader.load(new URLRequest(. . .). I will add these and see if they make a difference. But these are new.

I too googled the 2032 error and saw this response. I did trap the error to resolve the issue. What remains is the fact that the model still does not show up. I have moved the camera, reset the scale, and every other trick I could find or think of. No model. So that is an Issue I am dealing with.

There is a steep learning curve to this I admit. And it may be the lack of sleep from frustratingly trying to make all of this work over the last few days of the weeks worth of playing with things.

And yes I do get frustrated from time to time. I have been able to do some very advanced work with actionscript in the past. And this new stuff just seems to be kicking my . . . well . . . rear end.

I am an Instructional Designer so yes, I will be building some extensive training on this once I can accomplish what I am trying to do.

Unless attempting to put things together kills me.

Again, thank you for your swift response.

   

Avatar
Fabrice Closier, Administrator
Posted: 30 April 2015 12:00 PM   Total Posts: 1265   [ # 3 ]

That’s a more weighted reaction…

‘There is a steep learning curve to this I admit.’
Yes there is. If you approach the problems one at a time, it’s gonna be just fine.
Somehow there is kind of force that adds up series of problems when you get started. Like if you must make all the mistakes at once. Don’t worry these will quickly desapear after your first million burned neurones…

k, so you say nothing shows up. So first question is, do you get the complete event fired? Do you, if you have your have set your assetEvent listener get events? and as you likely have stored meshes into your file, does a simple trace(Mesh(event.asset).name) traces the expected names (assuming you did give them a name)?

You said you use Prefab and AwayBuilder. Does the .awd shows up in at least one of the two?

If you indeed all is triggered and you addChilded the result into your scene.
Then if error free, it is likely that you do not set your camera to the right spot.
so to make sure you do have some visual reference. make sure to add a Trident to your scene. let the camera.lookAt( new Vector3D() ) and set your model at 0,0,0. Away has like any other gpu api a default range for renderings. camera.far and near. In most cases, these are ok out of the box, but if your models are gigantic, the camera is actually in the middle of one, and because either the faces of the surface are from the camera too far away, they exceed the far value or if the object is concave, it’s faces are pointing outwards and are not rendered. As you mentioned “i have reset the scale”, make sure your object is indeed within the camera near/far range, and also that your camera is distant enough from the trident, or from the object if you lookat it instead.
That’s where Prefab/AB should give you hints. and one more thing, if your object position isn’t the center of its own data, the camera may look at the right object position, not the vertices if your model has some pivot/offset. There too, Prefab could help you…

If you are sure of the above, you can if you want to, send me your file at fabrice3d at gmail dot com. I may then have more hints for you.

As about the extra params, as said “on exception of enabling a specific parser ” allows you to give a local adress for dependencies if you embed the file,so not your case, allows you to give a nameSpace, which is ment for the library and you can pass a parser. While the last one usually is set once using Loader3D.enableParsers(Parsers.ALL_BUNDLED);//any file type loading will get thru an automatic extension check and content validation from their headers before being parsed or refused if not supported. Thats how Prefab and AwayBuilder do. Or you enable only a specific parser, which is in your case a way to have only a single class being compiled into your swf vs all the parsers. You would then do: Loader3D.enableParser(AWD2Parser);
Parsing directly a parser as parameter is a variation of the last one. where you specifically pass a parser. Which could be a custom one.

hope this helps and still continues to surprise you smile

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X