A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by aaro4130, Nov 4, 2015.
Good stuff guys!
Another update pushed, now supporting BumpScale , and also skipping over other texture args
map_Kd -s 1 1 1 -o 0 0 0 -mm 0 1 chrome.mpc
should no longer think "-s 1 1 1 -o 0 0 0 -mm 0 1 chrome.mpc" is the texture name
I've got a couple of questions:
- The first post says that you have to add a specular shader to make it work. Can you use your own shaders for the imported objects too?
- Is there already anything in place to import objects asynchrously (a coroutine or a thread)?
- I know this says "2018.3.1 or higher" but has anyone tried running it with Unity 2017 yet (and succeeded?)?
- Has anyone compared the speed of the new version to other importers yet?
Yes, you can change the shader in the code.
Should work fine in 2017, any version I suppose.
Yes, it works great. Fast and light.
Does anyone know?
I'm currently using a different asset (without any support for coroutines or threads) but I'm usually importing 20+ small .obj files, which often makes my game freeze for a split second.
Unfortunately I can't download it through the asset store (it says that I have to upgrade) and the upload linked in post #93 is offline.
May I ask what importers you've tested it against?
Most of the ones on the asset store. The author of this one is a friend of mine personally, so I know the code is well-structured (I'm using it in my own modifiable racing game) and quick (he's very keen on micro-optimizations). I load models with it over 50,000 tris in almost no time.
Hey, just recently found this amazing asset (thanks for releasing it for free btw) and I'm having trouble loading an obj with its mtl file streaming from a server. Is there an example of this anywhere or can someone provide an example so I can see what I may be doing wrong? I can get it load and it Does put materials on it, it just doesn't color it correctly. As a test, I'm trying to load in a yellow Lamborghini but when it loads in its just black and grey. So..yeah, any help is greatly appreciated!
Edit: So, with more fiddling I figured out it ended up being the mtl file associated with the obj I was testing with. This is all still fairly new to me and I was having issues with it reading transparent materials properly (by adjusting the mtl settings for the specific material it was supposed to be creating) and I ended up finding another option. Had to pay for it though, but, whatever works.
I get an error while using your asset (I am surely missing something)...
OBJLoader namespace couldn't be found... Am I missing a reference?
Thank you in Advance
Are these errors happening in the sample scenes, or when trying from custom scripts?
Would anyone be able to find some guidance as to how I can download the associated .mtl and .jpg files from a server? Aaro had mentioned passing in a stream for the MTL and overriding the texture loader, but to be honest I'm not sure how to go about accomplishing this. C# and Unity are pretty new to me, so I'm floundering a bit.
I'm working on this project for my capstone class at University, so any help is greatly appreciated ASAP.
I'm aware there's an error when building for IOS btw. When I get a decent amount of free time I'll deal with the asset upload process again and fix it. If you know code, you'll be able to fix it in the meantime.
Sorry for the lack of responsiveness in private messages btw, working all the time D:
No problem! I've got almost everything working at this point. My only issue is that calling OBJLoader.Load(objStream, mtlStream) completely freezes the app. Is there any way at all to get around this? I've tried using Ninja Multithread coroutines, but that won't work because there are some unity functions being called in there (so multithreading isn't an option). I timed it and the Load function freezes the app for about 5 seconds, which is a lot haha.
Any tips @aaro4130?
where i can find this loader ? is this work with UWP ? what is the limit for the size of the 3 d model file ( i want to load 200mb file)
Exception: An error occured while loading DirectDraw Surface: Cannot load DDS due to an unsupported pixel format. Needs to be DXT1 or DXT5.
the thing is these dds textures import into unity fine manually. So how do I make obj the importer ignore the textures?.
Edit: NVM Unity can import obj files without this asset duh .
I have loaded the 3D object via stream in .obj and .mtl formats successfully. I don’t know how to handle and apply the texture files. Kindly provide me with the possible solutions.
You have to download the image files separately and then save them! That was my big mistake. I would look into using WebClient to download the images as I found it was a lot faster.
Has anyone had any luck putting the OBJLoader.load() function into a background thread? It's freezing and even crashing my app at some points. Getting a bit frustrating.
[Edit] It's looking like a really bad memory leak in ImageLoader... Memory usage spikes to almost 900mb within that class.
Thank you for reply. Its really helpful to me.
Do you found any solution? facing same problem here, its just stuck the scene for so long.
Issue with loading model on webgl
if i run the code directly in unity, it works well - tried on unity 2017(old version of obj package) and unity 2019 (latest version of obj package)
GameObject model = new OBJLoader.Load("I_Normal.obj");
but if i build to webgl, build succeeds but model doesn't load on browser.
on browser console i see message "FileNotFoundException" (for detailed log i have attached image)
[tried with full file path with double back slash and single forward slash. nothing worked]
what i noticed is that it always appends a forward slash to file path before loading model.
in C# even if i specify full path as file:///D:/modelName.obj in browser console i see
How to fix this?
Thanks & Regards
Hi, is this asset work for hololens? I cannot seem to get it working with Hololens. It does momentary stuck (if using big obj) but the model not loaded at all.
This is the last debug I get before the object not loaded (I don't know if this is the right debug, I don't really know how to debug at hololens)
Exception thrown at 0x77222DC2 in DTSA Template Hololens.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0252F49C.
Exception thrown at 0x77222DC2 in DTSA Template Hololens.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0252F514.
Exception thrown at 0x77222DC2 in DTSA Template Hololens.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0252F5B4.
Exception thrown at 0x77222DC2 in DTSA Template Hololens.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0252F68C.
Is there way to download this asset from external site that assetstore? Im using older version of Unity.
I am using your script and it works just fine in the editor. After I publish it to iOS however I get this error when I try to load my Model from Application.persistentDataPath. I use the same path to load images and my database, so I guess that's not the issue here. I am clueless right now.. any takers?
I just call: loadedObject = new OBJLoader().Load(Configuration.Mypath + fileName);
Why does this work in the editor but not on the device!??
ArgumentNullException: Value cannot be null.
Parameter name: shader
at UnityEngine.Material.CreateWithShader (UnityEngine.Material self, UnityEngine.Shader shader) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00000] in <00000000000000000000000000000000>:0
at Dummiesman.OBJLoaderHelper.CreateNullMaterial () [0x00000] in <00000000000000000000000000000000>:0
at Dummiesman.OBJObjectBuilder.Build () [0x00000] in <00000000000000000000000000000000>:0
at Dummiesman.OBJLoader.Load (System.IO.Stream input) [0x00000] in <00000000000000000000000000000000>:0
at Dummiesman.OBJLoader.Load (System.String path, System.String mtlPath) [0x00000] in <00000000000000000000000000000000>:0
at Dummiesman.OBJLoader.Load (System.String path) [0x00000] in <00000000000000000000000000000000>:0
at ObjFromFile.OnGUI () [0x00000] in <00000000000000000000000000000000>:0
If anybody ever stumbles across this, I solved it by adding the Standard Specular Setup in
Project Settings > Graphics > Always Included shaders
Yes, I know, it says so in the included Readme
This asset was exactly what I needed ! The scripts are well documented so anyone should be able to use this importer within minutes (an hour max)
However with the current version of Unity, it takes forever, while building to compile the Standard and Standard (Specular Setup) shaders. I am pretty sure the problem comes from Unity or my project settings (and not this asset!) and am currently seeking help :\
Praise be aaro4130!
I saw this feature in Besiege (which allows users to create skins themselves) before I started developing games and now I find out I don't even have to start from scratch to add it to my game, this is great...
Praise be aaro4130!!!
Hey @aaro4130 ,
First of all great asset!
I am loading multiple OBJs one after the other. they are loaded in the same position as they were when they were created in a different app. However, when loaded into Unity all gameobjects have the same position of 0,0,0.
I've tried many things to try to get their actual position but I always receive 0,0,0.
I really need to access their real positions, Is there a way to do this?
Hey... did any of you have success with async loading?
I found a bug.
If you load a obj-file which was created by Blender the mesh is all over the place.
This should be a icosahedron.
Hey, I have used this asset for desktop and it works great, but when I try to build for IOS, I get the errors:
ImageLoader.cs error CS0117: 'TextureFormat' does not contain a definition for 'DXT1Crunched'
ImageLoader.cs error CS0117: 'TextureFormat' does not contain a definition for 'DXT5Crunched'
ImageLoader.cs error CS0117: 'TextureFormat' does not contain a definition for 'ETC2_RGBA8Crunched'
Any help would be greatly appreciated
Merhaba, Birden fazla obj dosyası nasıl eklenir?
I cant find it on AssetStore..... not with your nick, not with ObjImporter, not with something like that....where can i find it?
ok got it.... sorry