textures not loading anymore

Software: Away3D 4.x

Qbrain, Member
Posted: 30 July 2012 09:52 PM   Total Posts: 92

Hey There!

A quick question. My laptop was broke for like 1,5 month, finally got a new one today (Alienware m17x, for those who are interested wink ) I wanted to update my project to the newest Away3D version from github, and already changed a lot of things in order to get the bastard to compile raspberry

Now, it is compiled and runs smoothly, however, NO TEXTURES are loaded. I get the same texture over every object. (I figured it was a standard texture if the real texture isnt loaded)

so, my question basicly: I use .obj files, and within the .obj file i link to an .mtl file which links to texture files in relative links.

Does anyone know what is changed in this to cause it to don’t load anymore?

thanks in advance!

-Q

   

Richard Olsson, Administrator
Posted: 31 July 2012 09:20 AM   Total Posts: 1192   [ # 1 ]

What is the texture that you are seeing? Is it the default black and white checkers texture?

Are you not getting any load errors? Are you listening for the LOAD_ERROR event? Do you have the debug player so that you would notice if there were any errors thrown?

 

   

Qbrain, Member
Posted: 31 July 2012 06:18 PM   Total Posts: 92   [ # 2 ]

Hey Richard,

Thanks for the reply. The texture I see is NOT the default texture (black and white checkers), but is one of the textures I use in the middle of a .mtl file.

Suddenly every object uses this texture (with bloody ugly results ofcourse)

I did not make any changes to the mtl or the obj file. This really happened by changing from beta to gold. I also looked at the code in the examples for putting the texture over the object (to see if it was changed) and it wasn’t.

The .swf compiles perfectly in CS6. Only a few warnings. I am not listening for the load_error event. will implement that now.

thanks already smile

-Q

 

   

Qbrain, Member
Posted: 31 July 2012 06:42 PM   Total Posts: 92   [ # 3 ]

Its actually pretty weird.

I removed the material from the mtl file, and then the whole scene gets the default texture. I’ts like every object uses the same mtl… (and ofcourse in the .obj file they use different ones).

 

   

Richard Olsson, Administrator
Posted: 01 August 2012 07:23 AM   Total Posts: 1192   [ # 4 ]

I see. This sounds like the following issue:
https://github.com/away3d/away3d-core-fp11/issues/376

We will try to fix this bug ASAP, but it might be some time. In the meantime, try using another file format. Prefab should not have this bug (I think) so maybe you can import your OBJ there and export it as an AWD file instead?

 

   

Qbrain, Member
Posted: 06 August 2012 10:50 AM   Total Posts: 92   [ # 5 ]

Hey Richard,

I tried using prefab to export the .obj to .awd. When I’m loading the .awd, I recieve the same issue. For the record, I use this code to load the awd:

public var _loader:Loader3D = new Loader3D;

function 
init(){
_loader
.load(new URLRequest('newSchool/NewSchool.awd'));
_loader.addEventListener(LoaderEvent.RESOURCE_COMPLETEcreateWorld);
}

function createWorld(event:LoaderEvent{
   _view
.scene.addChild(_loader);

The texture of 1 object is again going over every object. Also, maybe for your info:

- When I import the .obj into prefab, it shows the correct model + textures.
- When I export it to .awd, it works
- When I import the exported .awd in prefab, it shows the model WITHOUT textures and every object gets the default checkers texture.

hope this helps.

Im gonna try to export the model as 3DS and try if this helps..

greets,

-Q

 

 

   

Richard Olsson, Administrator
Posted: 06 August 2012 11:45 AM   Total Posts: 1192   [ # 6 ]

If you are loading the AWD file and no textures are showing up in Away3D, that should mean that the texture dependency could not be loaded, e.g. because it’s actual path does not match the one in the AWD file. In that case, you should be getting LOAD_ERROR events. Also, make sure you’re using AWD2.

 

   

Avatar
Fabrice Closier, Administrator
Posted: 06 August 2012 11:48 AM   Total Posts: 1265   [ # 7 ]

I just tried using 2.120 to load an obj with maps, export it as awd2 twice( one with custom texture path, one without). Then reloaded them fully mapped in Prefab.

Note that if you try to reload without restarting Prefab, indeed it will not work as expected. It is caused by the dependencies getting a new name if already exist. This unfortunatly has the side effect to change the url too.
If you open the process log, you will probably see that the urls are not the expected ones. It’s my todo.

 

   

Qbrain, Member
Posted: 06 August 2012 12:29 PM   Total Posts: 92   [ # 8 ]

Thanks for the fast replies!

I *accidently* exported to AWD1. I now exported to AWD2. The import works now (exporting the obj to awd2, then importing the awd after restarting prefab), however, when loading the awd into the scene, it still shows only 1 texture over every object.

I included a part of a screenshot I made to illustrate what I mean.
Again, this happens with as well the .awd (version 2) as with the .obj.

greets,

-Q

 

   

Qbrain, Member
Posted: 06 August 2012 12:33 PM   Total Posts: 92   [ # 9 ]

btw, it also puts the texture on objects which aren’t in the awd file. (I import several different .obj’s, and it puts the texture from the .awd also over the .obj’s)

 

   

Richard Olsson, Administrator
Posted: 06 August 2012 02:36 PM   Total Posts: 1192   [ # 10 ]

Can you upload the AWD2 file somewhere and include the link?

 

   

Qbrain, Member
Posted: 06 August 2012 10:05 PM   Total Posts: 92   [ # 11 ]

Hey Richard,

Played around and tested on multiple pc’s, and found out the reason why the .awd file did the same was a cache problem in the browser. Deleted my cache, restarted the pc, recompiled and reuploaded and the .awd shows perfectly fine now, with the correct textures.

However, the other objects still get the default texture, so I’m gonna convert every object to .awd and that probably will fix everything.

Thanks for the help Richard and Fabrice! My project is going to launch in 3 weeks so I will post it here when it’s finally done.

Also, I found some stuff that may help you guys fixing the problem with the obj loader:

- While playing around, I noticed that while loading the big .obj file, it loops through all the textures and gives the smaller objects every texture from the big obj file. (So I saw like 20 different objects getting 20 different textures after each other, while away3D was loading the big .obj file, before every object got the last one.)

- I also removed the addChild method to the .obj file. It still didn’t work, So I basicly found out that the problem is in the Loader, (I assume the Loader3D class or parents)

hope this helps, and thanks for the help so far!

-Q

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X