AWD1 auto image load issue

Software: Prefab3D

John Brookes, Moderator
Posted: 22 July 2011 01:02 PM   Total Posts: 732   [ # 16 ]

There is an issue with awd1 and conatiners and children.
Prefab always outputs a ‘main’ container even if your original model didn’t have one.
Also if you have your own container with children the hierarchy gets messed up. Everything just becomes a child of the main container ( or something like that). Think I posted something about that on the mailing list when Richard first did asset library.

   

Avatar
Fabrice Closier, Administrator
Posted: 22 July 2011 01:12 PM   Total Posts: 1265   [ # 17 ]

It’s a known issue caused by a Prefab data to awd1 export bug.
Prefab’s passes the “work container” to the class instead of its child or children. It will be fixed in v2. In meanwhile simply access all you want one container deeper.

   

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

Fabrice ,the problem is that the container contains nothing when loading generated prims AWDs.Still haven’t tried imported models though .

 Signature 

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

   

John Brookes, Moderator
Posted: 22 July 2011 01:24 PM   Total Posts: 732   [ # 19 ]

If you export whole scene + image then you dont get any issues.
But if you export Selected object + image it breaks.

Again just tested with a cube primitive.

   

Avatar
Fabrice Closier, Administrator
Posted: 22 July 2011 01:26 PM   Total Posts: 1265   [ # 20 ]

What are “generated prims AWDs”? You mean Prefab output containing primitives?

   

Avatar
Fabrice Closier, Administrator
Posted: 22 July 2011 01:27 PM   Total Posts: 1265   [ # 21 ]

Have you guys logged this via Prefab report? Can’t remember seen this in reports…

   

John Brookes, Moderator
Posted: 22 July 2011 01:32 PM   Total Posts: 732   [ # 22 ]

Oh so now its our fault ))

On the container issue
Loading an awd1

private function onLoadComplete(e:LoaderEvent):void
{
  var m:ObjectContainer3D = AssetLibrary.getAsset(“main”) as
ObjectContainer3D
  view.scene.addChild(m);
  trace(m.getChildAt(0).name) //traces SimpleTruck_TrailerPivot0

Which works fine
but if I try instead

  var m:ObjectContainer3D =
AssetLibrary.getAsset(“SimpleTruck_TrailerPivot0”) as ObjectContainer3D
  view.scene.addChild(m);

It throws an error Error: Parameter child cannot be null.

   

Avatar
Fabrice Closier, Administrator
Posted: 22 July 2011 01:39 PM   Total Posts: 1265   [ # 23 ]

Try addChild the children[0] of main.children[0]... one deeper

   

John Brookes, Moderator
Posted: 22 July 2011 02:03 PM   Total Posts: 732   [ # 24 ]

The point is, if you have a model that has a container as root (from your 3d app) you can’t use assetlibrary getAsset for anything other than the ‘main’ (prefab) container

Worked round it with getChildAt or made sure exported models to prefab didnt have a container as root.

   

Avatar
SasMaster, Sr. Member
Posted: 22 July 2011 05:44 PM   Total Posts: 127   [ # 25 ]

@John ,Bingo! This is it .If I export a primitive and check selected object and not the whole scene ,the loaded model is empty,otherwise the model is loaded but its enclosed texture still throws the error I posted above.


Btw, the file you have sent me doesn’t load its image as well.

 Signature 

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

   

John Brookes, Moderator
Posted: 22 July 2011 06:16 PM   Total Posts: 732   [ # 26 ]

Oh yes it does wink
http://www.shrewballooba.co.uk/awd1Worky/bin/

I would presume its something to do with the path that you set in URLRequest, where the image folder is related to the swf and the price of donkeys.

   

redimage, Newbie
Posted: 09 May 2013 07:43 AM   Total Posts: 3   [ # 27 ]

take a look at the iamge app to see if it will auto load images  i used to convert in C#, works fine for me

   

falinks, Newbie
Posted: 23 September 2013 04:00 AM   Total Posts: 2   [ # 28 ]

here is what i will doing for loading image vb.net.
Imports System.IO
Imports System.Drawing.Printing
Imports RasterEdge.Imaging
Imports RasterEdge.Imaging.Processing

Dim Image As New RasterEdgeImaging()

Dim stream As New System.IO.FileStream(“C:\1.png”, System.IO.FileMode.Open)

Dim Image As New RasterEdgeImaging()
Image.LoadImageFromFileStream(“C:\1.png”, System.IO.FileMode.Open)
more you can find on loading image from url.
it supports all kinds of image formats, png tiff bitmap and some other formats as well. give a lookl, maybe you will find it is useful.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X