Materials incorrect upon upload

(Shaderbytes) #1

Hey there,

I wanted to update a model but when doing so i saw the materials were messed up. Wrong materials for some objects etc…

I then tried a fresh upload of the fbx to a new scene and still get these issues. I checked reimporting the fbx back into blender and there is no problem with the materials :

model :

ps… no other object is using this material, only this one object


According to assimp, the FBX file has 53 materials. However, according to our processing logs, the model triggered our materials_many flag, meaning it has over 100 unique materials and we attempt to merge identical materials. It does not have the materials_too_many flag, which would indicate that it still had over 100 materials after merging identical materials, in which case everything would be merged into one.

assimp also reports 128 unique meshes, so maybe something went wrong during material processing and things were duplicated. @waleguene will probably need to take a look…

Could you try Joining all meshes that share a material? (except cases where you need separate nodes for the Viewer API)

(Shaderbytes) #3

53 sounds about right if i had to guess… not sure why it is triggering the over 100 on your end? Anyway the model is api driven and i can not join meshes that share a material because the objects are being shown and hidden individually.

i will try get the material count from the scene with some python and let you know what the exact count is

(Shaderbytes) #4

ok it is over 100 in blender , but i can see room for optimization … let me adjust the model and see if i can get under 100

(Shaderbytes) #5

I managed to squeeze the scene down a bit , still ~90 materials but less than 100 causing the issue , i will send you a link in a pm

(Hansolocambo) #6

100 materials ? If the scene was a full town with 50 people walking around and a few cars I’d eventually understand, but… that ? Dude : 1 material should be way enough for the screenshot I see there above :wink:

(Shaderbytes) #7

dont be a smart ass , there are reasons for things being the way they are, you are over looking… Firstly there are 6 devices in that scene ,they all have hi res texture mappings for things like surface detailing and text on the plastic etc…4096px to be precise and some models have two or 3 such textures. So 4096 x 3 x6 will be 73728px good luck with that. Secondly there are even other textures not even included in this calculation like stickers and screws etc… so this would just add to your one texture size… which is already astronomical.

Secondly many of these materials are easier to set up and develop without having to use textures for various colors , eliminating needing to load a texture , which eliminates me having to create one , which makes the scene load faster and saves me development time.

Thirdly each model was developed at different times and the tutorial scene was put together afterwards so the idea of having shared materials across models was not a consideration at the time of their development. It will take additional time to do that, which i had to do now to get the scene working anyway.

I do this thing for a living you know - time is money.

So dont be so quick to think you know it all… “way enough” you say hey? - ok here is a challenge model this and texture it in the same level of quality with just one material/texture :

And since i used many 4k textures i expect no less quality. Now when you are done learning your lesson, times this by 6 ( and all the cables and walls and plugs and power supplies etc ) also add several more textures i dont need to use , which you will have to use to control metalness and gloss and transparency since you cant just set these individually anymore without a texture and then think again whether one material is “way enough”

Lastly many materials are controlled by the viewer api and blink or switch on/off to show which step you are on , you cant do this with just one material without having many versions of your texture with different lightness values for different parts. So take your one material , one texture work flow and multiply that 10 times So again loads of loading hassles and huge load times per step you didnt think about.

So you will need several diffuse textures that are immensely big , probably beyond what sketchfab even supports. - fail.

You will also need additional textures of the same size for all the other channels making load times ridiculous - fail.

You will have a problem doing multi uv channel uv scaling - fail

you cant control individual materials via the api meaning you have to rather load even more immensely large textures to achieve the same effect - fail.

Next time dont be so quick to think you are clever… :wink:

(Hansolocambo) #8

I wasn’t feeling cleverer than anyone. Just amazed by the weight of a scene that looked to be simple. But it’s just a screenshot so it’s hard to tell, and none of the links in your post work : “This model has not been published yet”.
You’re the one making those objects. And if your talent tells you there’s no room for optimization : then I guess there is not. Thing is I’m coming from the video game industry. And size, compression, optimization, etc are kind of golden rules. But I see this job is different.
Nice portfolio by the way.
Good luck.

(Shaderbytes) #9

no hard feelings, optimization is key to runtime no doubt :wink: I did manage to squeeze the scene down below 100 so i could continue working , could it be squeezed more , probably , not much, but anyway budget does not warrant that and the project will just become too expensive if i had to spend heaps of time on that.

Clients are more price concerned than super optimized concerned :wink: That being said i do optimize as part of my work flow but always within limits of budget.

Also on assets like these hi quality texturing trumps draw calls and atlasing. It needs to look really good even up close.

Anyway thanks for the kind words , i checked out your profile and gave you a follow. Nice combination of sci-fi and toon stuff. I see you also use 3D-Coat for texture painting. I use it as well but only on some assets. Electronic devices like these i never paint in a dedicated 3d painting app , I just do the textures in a 2d graphics editor and I have done heaps of them already.

I am a technical artist so fully proficient in coding as well , which also gives me an edge as a artist as i understand many of the technical aspects of CG in general.


(Jhoston007) #10

Hi Support,

When i upload the previous model [] it was working fine, however uploaded the same file with few changes as new model [] all materials are merged and in the material name it was showing the modelname_obj.cleaner.materialmerger.gles.

Even separate material upload is not fixing the issue.

Antony [Jhoston007]

(Chaitanyak) #11

@james @cedric any ideas? I tried uploading his model on my account with the same results.

(Shaderbytes) #12

im sure this must be because your materil count is over 100. I recently had a issue like this and this was the cause… not sure if it is the same thing happening to you guys but I thought I would mention it.

On a side note if this is the case … there really needs to be some sort of “material limitation reached” message. Maybe then an option to continue but to accept material merging to get the scene to work but materials to then not be correct , or to abort the operation so the user can go make adjustments and try again whenever they are ready since honestly i dont ever see any user been happy with material merging… to be honest it should just not work at all if the limitation has been reached , tell the user so and let them go fix it… not provide a working geometerical scene with incorrect material results.


Studio Kitchen ( ) seems to have 68 materials.

ChefStudio4 ( ) has 145.

Yes, we’re planning to add a warning after upload in such cases.

I highly recommend reading these two articles about uploading from SketchUp: