r/tabletopsimulator • • 5d ago

Questions Failed to load Model (.obj)

https://drive.google.com/drive/folders/1tr1KFyDOWj9n_ypL1AL7mZ87UDumT8NM?usp=sharing

Hi all,

I'm trying to upload a custom model of Hunhow from Warframe, just to see if I can figure it out. I have the model and the baked image, but whenever I try to import the custom model it just says "Failed to load model (.obj)" along with the url to the Cloud-stored .obj file.

I've made sure to fix any interior faces, I tried triangulating faces, the model has less than 25,000 vertices, but it still refuses to load the model.

I've added the folder of the Blender file, I'd appreciate if anyone can point me in the right direction or help figure out whats wrong, be it with the model or with Tabletop Sim itself. I'm very much a novice at Blender, but I the model itself comes from the Warframe Model Archive.

3 Upvotes

9 comments sorted by

1

u/bluesatin 5d ago edited 4d ago

I did a quick test and the original base .obj file also didn't load for me from a local copy of the file, and importing it to Blender and re-exporting directly also didn't work.

But applying a decimate modifier to the model in Blender to reduce the number of faces to only ~10% for testing purposes (and the resulting file-size) managed to get it to load, so I assume it's hitting some sort of face or file size/length limit (no idea what that limit is, I just massively reduced it for testing purposes).

Worth noting when you're exporting from Blender you only need the triangulated model and the UV coords (if you're texturing it), you can untick the normals in the geometry export section if you've left that on (since I think Tabletop Simulator ignores them); which might shrink the file size/length further further.


It's worth noting if the model looks a bit smooth/mushy in game compared to Blender, then to better preview things in Blender you'll want to set the model preview-shading to the basic 'smooth' option (not auto-smooth). And to get any sharp edges/corners to actually get shaded properly then you'll want to apply an 'edge-split' modifier in Blender, which will hard separate the model along sharp edges, forcing Tabletop Simulator to render them more similarly to how the 'auto-smooth' preview does in Blender.

EDIT:

Also worth noting the scale of the model is likely very wrong, as it's absolutely GIGANTIC in-game; you might want to also sort that out when exporting from Blender, rather than have to deal with reducing it to like 0.05 scale or something in-game.

1

u/pilotvolt 5d ago

Hi, I appreciate your comment. Between the advice you gave and the other user's comment, I've been able to get the model imported to the game. However, when I try to apply the textures, if I bake it with "Combined" selected as the bake type, in-game the only thing to come through are the blue lights and the rest of the texture is shiny and black. If the bake type is set to "diffuse" the lights are not present on the texture file, the the textures themselves are sort of spotted with black patches (I'm not really sure how to describe it. the right colors are there, but the coloration sort dips into spots of black which are not supposed to be there). Would you have any idea what I am doing wrong/not doing that would cause those?

1

u/bluesatin 4d ago edited 4d ago

From the sounds of it you're probably using the 'Material Preview' view in Blender (the sphere icons in the top right of the 3d view), which has some sort of preset HDRi lighting setup, which allows you to see the results of materials in a standardised environment rather than the lighting in the actual final rendered scene.

But when you're baking the texture (if you're doing it in the 'Render' camera-icon sidebar section), it'll be using the 'Rendered' view, which in the blender file for that model is setup with an extremely dark background/world lighting.

You'll want to switch your view to like the 4th option in the top-right viewport bit, which will show you the true Rendered scene to get an idea of what it will actually look like when baked.

And if you want to adjust the lighting to brighten things up, then you'll want to go to the 'World' red-globe icon sidebar tab and adjust the 'Surface' section to adjust the world lighting.

If you just want flat uniform lighting you can continue using the default 'Color' type, which will blast it with uniform lighting from every direction, which is presumably the best idea (so that it's uniform for Tabletop's lighting to actually do the shading).

But just for reference, if you want to use something like the HDRi lighting used in the 'Material Preview' view (which will probably look janky in-game, since the baked-in lighting won't match the in-game one), you'll want to click the little circle next to the 'Color' bit to change it to an 'Environment Texture' instead of a flat colour; and then you can find the HDRi files that Blender comes with in the Blender installation folder, something like: /Blender 3.6/3.6/Datafiles/Studiolights/World/studio.exr etc.

1

u/pilotvolt 2d ago

Hi again,

So, I configured the viewport in the rendered view like you suggested, and in Blender the model of course looks how I am trying to get it to look (which makes me think I probably didn't explain the issue I was running into properly).

I'm going to attach a new folder into that Google Drive folder I linked originally (and reupload all the files in their current state from my PC). If you wouldn't mind taking a peak to see what I mean, I'd really appreciate it :).

I think it may just come down to them being fucked up from whoever configured the initial massive glob of texture nodes, but if theres something glaringly obvious that I could tweak to fix it that would be awesome.

https://drive.google.com/drive/folders/1tr1KFyDOWj9n_ypL1AL7mZ87UDumT8NM

1

u/stom Serial Table Flipper 4d ago edited 4d ago

His shader has a dozen different output and config options, it's an over-engineered mess.

Edit: He's able to do a diffuse bake, but his material also uses emissions, so he needs to combine those bakes.

1

u/bluesatin 4d ago edited 4d ago

Yeh I had to lookup what on earth was going on with that, and it seems like it's a Warframe model with a giant custom shader to try and recreate the in-game rendering stuff (with all its various features).

No idea exactly what all the functionality is in that shader regarding all the options, presumably there's some documentation/video that better explains the functionality somewhere. But it seemed like OP was just trying to bake a texture for how it appeared in their Blender viewport, so I thought I'd try helping them out with that process.

1

u/stom Serial Table Flipper 4d ago

I think shader to rgb on the diffuse and emission outputs, then add them together, and bake out to diffuse.

1

u/stom Serial Table Flipper 4d ago

The shader setup for it is absurdly complex. But it does have some options for baking, so Id suggest following their documentation or guides for whatever their intended baking workflow is.

1

u/stom Serial Table Flipper 5d ago edited 5d ago

Probably tri-limit, it was ~47k. max is 25k.

  • Removed \'s from mesh names
  • Re-scaled to better size
  • Removed extra collections/crap
  • Flipped normals
  • Added decimate to bring tris down to 20k
  • Configured collection obj exporter
  • Didn't muck with textures because you have 200+ bmp files (wtf, suggests unusual workflow). You'll need to bake those to a single texture (png or jpg)

Model itself is now working for me:

Link to modified blend: