|
DinkMcDinkleman, Newbie
Posted: 01 October 2011 11:36 PM Total Posts: 30
Getting:
[Fault] exception, information=Error: Error #2032: Stream Error. URL: file:///D:/Fighter.mtl
After successful compile and execution. I am importing a .blend file from Blender 2.59 into Prefab and then exporting. I’ve tried the .obj format as well as the .awd format, both suffer from similar failure messages.
I’ve attached my code in case anyone can help.
Thank you in advance.
File Attachments
|
DinkMcDinkleman, Newbie
Posted: 02 October 2011 06:11 PM Total Posts: 30
[ # 1 ]
I found out why I’m seeing this, it’s because Away3D seems to not be looking in the bin folder for the .mtl and .jpg files. I find this extremely inconsistent and odd. Is there a way to change what directory/folder Away3D will look in for the mtl and jpg files?
|
Richard Olsson, Administrator
Posted: 02 October 2011 07:54 PM Total Posts: 1192
[ # 2 ]
Away3D will use the path specified to it. If you’re loading an OBJ file and that OBJ file contains references to file:///D:/Fighter.mtl then that’s where Away3D will look. You should consider making sure that blender exports relative paths instead of absolute paths like that.
That said, you can use the AssetLoaderContext and it’s mapUrl methods to remap one URL (e.g. “file:///D:/Fighter.mtl”) to another (e.g. “Fighter.mtl”).
|
sendoushi, Newbie
Posted: 14 March 2012 04:43 PM Total Posts: 15
[ # 3 ]
Hi there,
I’ll bump this topic.
I’m using relative paths both obj and mtl are on the same folder and i’m saying on the obj: mtllib Tubo635ComPlugin.mtl
So… this should work right? Wrong! Error #2032: Stream Error.
Any idea? Should the obj have any specific detail or structure?
|
Fabrice Closier, Administrator
Posted: 14 March 2012 09:29 PM Total Posts: 1265
[ # 4 ]
I have answered similar question on this forum not 24 hours ago.
Aside the relative url as Richard explained, make sure you do not have more urls than required into your mtl, or in your obj. For instance if the file was edited by hand or you assume that the mtl is the same as previous export and use the old one.
The error event, gives you an error message, and most of the time, you can see the url that is causing the failure.
Also, make sure the files are on a location on your disc where you have rights. Think here of svn controled directories for instance.
And finally if the obj file is embeded, it will not find the sources at all unless you specify where to look.
|
sendoushi, Newbie
Posted: 15 March 2012 10:58 AM Total Posts: 15
[ # 5 ]
I have not modified. Saved on Modo… Anyhow, if I delete the line on the .obj of the mtl it works just fine but I don’t know if I will later need it. Do I need it for the UVs? I have an object which will have to have UVs.
|
Matse, Sr. Member
Posted: 15 March 2012 11:54 AM Total Posts: 149
[ # 6 ]
UVs are related to meshes, you don’t need the material : you can create one in as3 and it’ll work just fine.
|
sendoushi, Newbie
Posted: 15 March 2012 01:34 PM Total Posts: 15
[ # 7 ]
The thing is… The obj was made from a stl file so the uvs are not pretty and we’re talking about complex mesh. Any idea on how to do this?
|
Matse, Sr. Member
Posted: 15 March 2012 01:52 PM Total Posts: 149
[ # 8 ]
How to do what ? Creating the material ? There is nothing hard with that : the model UVs might be complex as hell, you still just need to create a BitmapTexture out of your texture image’s BitmapData and create a TextureMaterial that you apply to your mesh.
UVs will do the job of displaying the right part of the texture at the right place, you don’t need to do anything for this to happen as UVs will be loaded with your .obj mesh. Or just turning on the textureRepeat if you need.
Not sure what you mean
|