Author Topic: Mesh optimizations  (Read 1246 times)

yankee_racers

  • Newbie
  • *
  • Posts: 2
Mesh optimizations
« on: February 19, 2016, 06:16:52 AM »
Does Crocotile 3D have optimizations on exported objects like combining all the triangle faces where appropriate?

Alex

  • Administrator
  • Sr. Member
  • *****
  • Posts: 327
Re: Mesh optimizations
« Reply #1 on: February 19, 2016, 07:21:57 AM »
There currently aren't any optimization options when exporting.
Are you asking about an option to combine vertices that overlap, or is there something else? Combining faces might be difficult since each tile can have UVs in different locations on the texture that aren't nearby each other. It would require having to generate a new texture to accomplish that, which might be difficult to implement.

yankee_racers

  • Newbie
  • *
  • Posts: 2
Re: Mesh optimizations
« Reply #2 on: February 19, 2016, 11:42:18 AM »
Let's say we have a tile and use the tile 16 times to build a 4 x 4 wall with it.  Instead of 32 tris we can reduce it to 2, because instead of 16 'squares' we can make it one bigger square.

Alex

  • Administrator
  • Sr. Member
  • *****
  • Posts: 327
Re: Mesh optimizations
« Reply #3 on: February 19, 2016, 03:40:56 PM »
That's something I want to explore and try to implement, but it's not something anyone should expect to be implemented soon.
I'd have to figure out a way to recreate a texture and map out the tiles onto it so that the UVs still work when the triangulation is optimized.
It would be great if this process was somewhat realtime and did it while you worked, being capable of previewing the texture/optimization as you build stuff. But more realistically it'd probably have to be something done when exporting.
I guess the only parts that would get optimized would be the flat areas that consist of multiple tiles. So if that's the case, it might be simpler than I imagine. Things get difficult when tiles are warped or the uvs are stretched, etc..