AWD1 auto image load issue

Software: Prefab3D

Avatar
SasMaster, Sr. Member
Posted: 16 July 2011 11:18 AM   Total Posts: 127

Hy all .I wanted to know if there is currently a known issue with AWD1 models in Broomstick.Trying to import a simple cube from Prefab with inclosed texture I am getting this:

Error #2032: Stream Error. URL: /images/Cube_1.png

Now ,there is no way I put the image in a wrong place.I tried to put the image in the same package as the mesh.awd and changing its path accordingly inside awd file and still having this problem:

Error #2032: Stream Error. URL: /images/Cube_1.png


Anybody had encountered into this?  Fabrice ?

Thanks .

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

John Brookes, Moderator
Posted: 16 July 2011 12:10 PM   Total Posts: 732   [ # 1 ]

Make sure the image is a png.
Prefab always converts and renames them to jpg on export.

Other than that no issues with broomstic or the new fp11 and awd1 for me.

   

Avatar
SasMaster, Sr. Member
Posted: 16 July 2011 12:13 PM   Total Posts: 127   [ # 2 ]

As you can see from the url I put above it is png.It looks to me more like a loading error.

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

John Brookes, Moderator
Posted: 16 July 2011 12:17 PM   Total Posts: 732   [ # 3 ]

The path in the awd file would usually be
images/Cube_1.png
for me.

   

Avatar
SasMaster, Sr. Member
Posted: 16 July 2011 12:26 PM   Total Posts: 127   [ # 4 ]

Sorry ,that was an initial path and it has not worked either.

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Richard Olsson, Administrator
Posted: 22 July 2011 10:58 AM   Total Posts: 1192   [ # 5 ]

If the file is not in the right location, use the AssetLoaderContext class (in your load() call) to configure where the texture should be looked for.

   

Avatar
SasMaster, Sr. Member
Posted: 22 July 2011 12:06 PM   Total Posts: 127   [ # 6 ]

Guys , I am really curious ,anybody has tried to load AWD recently from Prefab in Broomstick ?I don’t think I am dumb because I have worked with Prefab and Away 3x for a long time (actually wrote a whole chapter in my book dedicated to it. wink .So ,I should tell first that the all paths are fine .I checked that many times.Also when I load the AWD looking into the AssetLibrary I can see an asset with an empty objectcontainer3d containing no children.Also there is an error I specified above .I tried to load a simple primitive generated with Prefab .Would be happy to see someone doing the same test.
Thanks.

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

John Brookes, Moderator
Posted: 22 July 2011 12:27 PM   Total Posts: 732   [ # 7 ]

Works no problems for some maya collada to prefab awd1 I already have.
Just tested a prefab rounded cube primitive with an image texture, again no issues.

used

private function initParsers():void
{
Loader3D.enableParser(AWD1Parser);
AssetLibrary.load(new URLRequest(”../src/AWD2Cab/RoundedCube/RoundedCube.awd”));
AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onLoadComplete);
}

private function onLoadComplete(e:LoaderEvent):void
{
scene.addChild(AssetLibrary.getAsset(“main”) as ObjectContainer3D);
}

   

Avatar
SasMaster, Sr. Member
Posted: 22 July 2011 12:33 PM   Total Posts: 127   [ # 8 ]

Tell me John ,do I have to specify the parser like you do or it should be ok if I pass it as a parameter into AssetLibrary.load() ?

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

John Brookes, Moderator
Posted: 22 July 2011 12:38 PM   Total Posts: 732   [ # 9 ]

Either works for me
//Loader3D.enableParser(AWD1Parser);
AssetLibrary.load(new URLRequest(”../src/AWD2Cab/RoundedCube/RoundedCube.awd”), new AWD1Parser());

   

Avatar
SasMaster, Sr. Member
Posted: 22 July 2011 12:47 PM   Total Posts: 127   [ # 10 ]

Can you send me to my email a sample awd ? I want to see if it load.
Thanks .

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

John Brookes, Moderator
Posted: 22 July 2011 12:54 PM   Total Posts: 732   [ # 11 ]

Just on what Richard said.
Say if I moved the default images folder out of the class folder that prefab generates one level up.
Then.
Loader3D.enableParser(AWD1Parser);
var context:AssetLoaderContext = new AssetLoaderContext(true);
context.mapUrl(“images/RoundedCube_0.jpg”, “../src/AWD2Cab/images/RoundedCube_0.jpg”)
AssetLibrary.load(new URLRequest(”../src/AWD2Cab/RoundedCube/RoundedCube.awd”), null, context);
AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onLoadComplete);


Yep Ill mail you

   

Avatar
SasMaster, Sr. Member
Posted: 22 July 2011 12:57 PM   Total Posts: 127   [ # 12 ]

I can see now it is not about image path.As I mentioned the loading process results in an empty ObjectContainer3D .Also compared to some working awds I made a while ago and the structure of those that don’t work looks like missing a couple of rows.Don’t know ,may be my Prefab is screwed….

Thanks.

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Richard Olsson, Administrator
Posted: 22 July 2011 12:57 PM   Total Posts: 1192   [ # 13 ]

Could it be (based on your tests) that primitives don’t load properly but regular meshes (i.e. models that were loaded into prefab) do?

   

Avatar
SasMaster, Sr. Member
Posted: 22 July 2011 12:59 PM   Total Posts: 127   [ # 14 ]

That is something I am going to test as well now. But hasn’t John tested Prefab’s generated prims ? John ?

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Avatar
SasMaster, Sr. Member
Posted: 22 July 2011 01:00 PM   Total Posts: 127   [ # 15 ]

BTW , congratulations to me ,I have become the MEMBER wink .

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X