Away3d Flash CS5: 1046: TextureBase not found

Software: Away3D 4.x

bauervision, Newbie
Posted: 21 November 2011 06:18 PM   Total Posts: 25   [ # 16 ]

I really appreciate you trying to help me on this.

I’m just wondering if what I need to do, can be done.

Here is what is happening.

In my main html file, I am loading in 3 different SWFs, one for each monitor. For the current project, I have the Left and Center monitor displaying my main flash files, and the right monitor I wanted to embed my 3d model, but keep it ‘underneath’ the UI I have built so that the look is consistent across all 3 SWFs.

Worst case scenario,  guess I can do away with my UI on the 3d model screen, but ultimately it needs to be there.

I would use a 3D PDF, as it really does the job, but a pdf wants the whole html window, and I only want to give it the right most screen. Hence why I started looking at ways to embed 3d in a swf.

Eventually i want to be able to do all that I can do with a 3d model, via Away3D; lights, animations, simulations etc.  But for now, If I can just get my model loaded, it would go along way to sell Away3D to my company.

———————————————————————

Side note, the simple loader example you sent worked for the most part till I tried to switch out the 3ds file you provided with mine and then embed the swf inside of my html file.

 

   

Avatar
maddog, Sr. Member
Posted: 21 November 2011 06:52 PM   Total Posts: 118   [ # 17 ]

Did you try the older loader I sent for away3d 3.x. It is more forgiving when loading in situations like the one above.The down side is 3d models cannot be as complex. Away3d 4.x always puts its view and 3dmodels at the very bottom of stage so nothing can go behind it. That is because adobe decided it would save CPU cycles that way i guess. It also seems like flash 11 is stricter on other things as well like background of view cannot be set to alpha 0. That mean background has to either have a picture or color. I am pissed off by that one.

I should note that I am no guru at this either, I have been playing around with away3d since about January. So I can only tell you what I have figured out.

Also with 3ds models I would start simple then progress from there to see what away3d can load. I have been using Blender 3d to export to 3ds.

It is important that your object and objectData have been named in you 3d editor. Sometimes, not doing so seems to cause errors in loading and applying texture. I had allot of issues updating from away 3x to 4x because of this. I usually just give the 3d object and objectData same name.
When you name them do not include any special characters, Blender auto names stuff like this cube.001 and away3d does not seem to like the period. So you would have to rename it to cube001 to get it to load right.

What you are trying to do can be done though.


Hope this helps a little.

   

bauervision, Newbie
Posted: 21 November 2011 07:24 PM   Total Posts: 25   [ # 18 ]

very nice!

I tried the older version, and got it to work. How can I add in the smooth motion of the rotation like in the Simple Loader verison?

I’m thinking the polycount on the 3ds file might be an issue then, because it is around 10K, 8K actually. I’m going to try and export a 2K version now.

I can deal with the limitations of the GUI and it putting the model on the bottom of the stage.

—————————————————————————————

Okay, I just loaded in your older loader into my project and it defintiely works! Thanks so much for that!

Is there anyway to load the model prior to interacting with the 3d stage?  As it is right now, nothing shows up until you actually try to rotate in the view, then the model shows up.

Also, concerning using your first example, the simple loader, can you give me some advice on how to use that version? Basically all I want to do overwrite your 3ds file with mine. But it didn’t seem like it was that simple. I was also very frustrated last week, I’m sure I did soemthing wrong. maybe it was that the 3ds file had too many polys….

thanks again for all your help!

 

   

Avatar
maddog, Sr. Member
Posted: 21 November 2011 07:33 PM   Total Posts: 118   [ # 19 ]

Change this

if (move{
  camera
.panAngle 0.3 * (stage.mouseX lastMouseX) + lastPanAngle;
  
camera.tiltAngle 0.3 * (stage.mouseY lastMouseY) + lastTiltAngle;
  
camera.hover();
  
view.render();
 

To this

if (move{
  camera
.panAngle 0.3 * (stage.mouseX lastMouseX) + lastPanAngle;
  
camera.tiltAngle 0.3 * (stage.mouseY lastMouseY) + lastTiltAngle;
  
 
}
camera
.hover();
view.render(); 

The reason I did this was to save cpu. As it will use allot more continually.
away4 uses graphics card so there was no need to be worried about cpu usage.


/——————————————————————————————————/
on poly count away3d 4x can handle up to like 65000 polys.
Away3d 3x starts chugging around 2000 or 3000 polys for me and my laptop is pretty fast.

Since away4 is still in beta I think it will be at least until early next year before all the bugs are worked out. Which I am sure is frustrating to some, but that’s the way it goes I guess. I actually really hate some of the things adobe has changed in flash 11, but I know they won’t listen to my complaints. O well just venting. I don,t actually have any work right now so I can afford to play around with the away4 beta.

   

bauervision, Newbie
Posted: 21 November 2011 07:44 PM   Total Posts: 25   [ # 20 ]

sweet! thanks!

Also, do you recommend using preFab?

   

Avatar
maddog, Sr. Member
Posted: 21 November 2011 07:48 PM   Total Posts: 118   [ # 21 ]

prefab works great for away3d 3.x
it’s a good place to see how well your models will load
and you can test you materials out there.
It only exports to AWD, md2, AC, AS, and WaveFront object though.
Away3d can import all these types though.

they do not have a version for away3d 4.x yet and probably not till well after away 4.x is out of beta.

   

bauervision, Newbie
Posted: 21 November 2011 08:46 PM   Total Posts: 25   [ # 22 ]

I was just so happy to see something load, I overlooked the fact that the older loader, regardless of what model is present, only loads a square with red Error Loading Geomtery written on it.

   

Avatar
maddog, Sr. Member
Posted: 21 November 2011 09:25 PM   Total Posts: 118   [ # 23 ]

With the older version it loads 3ds from a folder. It does not imbed it in the swf file like the other one did. you have to preserve folder location or change the path to 3ds file in actionscript. in this case the assets folder holds the 3ds model.

If you want you can sent one of you models to me and I can see if I can figure out why they are not loading. I think it sound like the script just can’t find the model though.

try putting assets folder in same folder as your main html

   

bauervision, Newbie
Posted: 22 November 2011 02:59 PM   Total Posts: 25   [ # 24 ]

oh so close!

Why would it show up when I hit Ctrl+Enter, but not when I publish?

Also, switched out the texture and model, repositioned it, ran it everything was fine other than the above issue.

But when I put in my background, replaced your gradient, I now get

1120: Access of undefined property EventPane

I can almost taste it, it is so close….

   

bauervision, Newbie
Posted: 22 November 2011 03:04 PM   Total Posts: 25   [ # 25 ]

okay so I realized EventPane was your gradient. smile

   

bauervision, Newbie
Posted: 22 November 2011 03:16 PM   Total Posts: 25   [ # 26 ]

.....so I have everything working the way I like it now.

But, it still won’t show the model when I publish, only when I preview it.

   

Avatar
maddog, Sr. Member
Posted: 22 November 2011 03:17 PM   Total Posts: 118   [ # 27 ]

It is easier to move view around when you put it in a container (EventPane). That way you can tween it if you want. Like fading it in.
————————————————————————————————-
my guess why it is not working when publishing is maybe the html is in a different location then assets folder. When you load in swf it only knows to look for files from where the html is located. You could try providing the full path to your 3ds file instead of short hand path. I always test on a test server like xampp to see if there will be server issues.

   

bauervision, Newbie
Posted: 22 November 2011 03:28 PM   Total Posts: 25   [ # 28 ]

great idea about putting it inside the MC. Nevre would have thought about that!
—————————————————————————————-

right now I have the model directly in the root folder where the html is located AND inside the assets folder.

in the as file, I have tried

loader.loadGeometry(”/assets/model.3ds”, max3ds);
and
loader.loadGeometry(”/model.3ds”, max3ds);
and
loader.loadGeometry(“model.3ds”, max3ds);

   

Avatar
maddog, Sr. Member
Posted: 22 November 2011 03:48 PM   Total Posts: 118   [ # 29 ]

try something like this
loader.loadGeometry(“C:/away3d/olderloader/assets/model.3ds”, max3ds);

then on the server you would give the whole path as well.

If that fails you could finding the script to imbed the model in the swf.

or you may want to see if it will load if it is on a server.

   

bauervision, Newbie
Posted: 22 November 2011 04:04 PM   Total Posts: 25   [ # 30 ]

yeah, making a direct link like that works, problem is, while this project will probably never be on a server, I really need to be able to use relative paths….at least inside of the main folder. If there is no way around it, I guess I can make do

this is what I’m doing now and it works when I publish…
C:\Bauer\...\Projects\UAV\olderloader\model.3ds

If I can at least use…
UAV\olderloader\model.3ds
...that would be great

————————————————

now, it only works if I use the whole path!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X