Blender crashes when exporting to glb cause of unoptimized model or weak pc?

I got this floor tile that I want to use as the base of my floor in my project :

The weird is that when I try to create a whole floor with it, via array modifiers, blender memory usage goes quite high like 1GB and the exporting process to glb crashes after a certain point.

Is it because my pc is weak ? I currently use a i5 3570 and a radeon 7750 1GB plus 8GB of RAM.

Does that mean that for me will not be possible to use this to create a floor with Blender or is the model unoptimized ?

Pinging @Vinc3r to help on Blender side :slight_smile:

1 Like

I do not do the .glb export, but an array modifier is probably going export geometry as if the array modifier were applied, or basically 1 big mesh with repeated vertices. There is probably 4 ways to go:

  1. Create a texture / bake the top plane, then you may create a floor as large as you wish with only 2 triangles. Down side, is it could be blurrier than a geometry solution. There are tone of floor / brick textures already made on the web.

  2. Optimize the swatch section using limited disolve. This probably does not solve by itself, but gives extra umpf when added to 3 / 4.

  3. I do not know how glb exporter handles linked meshes, do not even know how to do them in 2.80, but it might result in InstancedMeshes on import.

  4. just export the swatch. Write code to create instancesMeshes, positioning all at Y being 0.

1 Like
  1. Yeah that probably is the cheapest and most straight forward way. Though now we are talking about the floor and I guess when I’m going to create a castle from the same tiles I found I will face the same problem and that saddens me a bit.

  2. I need to look into it.

  3. Same as above.

  4. Yeah probably that would be the way though it will be okay for the floor but it means ,like I mention in 1st bullet that I won’t have the ability to do it again in general for structures in my world and whatnot.

So I guess it’s not my fault then ? Would having a more powerful pc solve this ? Or is it just because of unoptimized models found on web ?

How many duplications do you made with array modifier?

On my side, using 50 on X + 50 on Y, my desktop start freezing a bit when switching to edit mode (but I consider it normal, by getting near 3 millions of vertices)

Same as you apparently

After I press apply this is the result.

The thing is when I’m going to export the scene to glb blender hangs up after a while and crashes. While it’s memory consumption is growing larger in taskmanager.

I guess my pc is not good enough for the exporting ? Should I find lighter props for my scene ?

Why not use only top faces of the floor? (sides & bottom will never be seen right?)

Or… simply use a normal map :smiley:

1 Like

That seems very cool though I don’t understand what to search to be able to do it.

Is this included in the model so I can extract it ?

Some keywords to know more about it: texture baking, baking highpoly to lowpoly, normal map baking (you get it, the purpose is to bake something :slight_smile: ).

Here a tutorial about it, which seems OK: https://youtu.be/2ClzsuExtCo

Basically:

  • model a lowpoly object above your highpoly
  • unwrap your lowpoly UVs
  • make sure you have material on both your objects
  • make sure you’re on Cycles renderer (Eevee doesn’t have baking for now)
  • check the doc’ about Bake panel
  • use the Selected to active option (select first your highpoly, then your low)
  • make sure your lowpoly material have an active image texture node (the baking will be saved on it)
  • press Bake button
  • wait until your PC has finished burning
  • … profit!
2 Likes

Wow thanks ! It took a while to get it but I think I did it, learned something new too !

One last thing though even though in the sandbox it looks perfect in the live version it looks black.

Why would this happen ? Do I need to do something special when I load my scene ?

1 Like

I don’t know how you configure your bake settings, in theory you can keep them as default for Tangent, and your normal map should have a dominant blue color rather than yellow:

image

2 Likes

Re did from the beginning fixing the yellow to blue color and everything turned out great.

I suppose it would be the same result with finding good textures though.

Can’t thank you enough. Wish you have everything you ever wanted in your life !

2 Likes