Mesh Slicing Sop Random Tiles

   1342   1   1
User Avatar
Member
169 posts
Joined: April 2014
Offline
I'm plugging some geometry through a Mesh Slicing sop set to 4, 1, 4.

It's a terrain so I get 16 tiles.

The problem is that the tiles number (given by the class from 0 to 15) are random. So tile 0 can be in the northeast corner, then tile 1 is in the southeast corner. They just jump all over the place.

But it gets even more complicated: I have to lod things, so I'm slicing up the different lod levels (from the same source). 2 of them match (as in tile 1 from one polyreduced model matches tile 1 from the other) but the third it places tiles in a DIFFERENT random pattern. Below is tile 0 from lod0 and lod1 (highlighted) and tile 0 from lod2. As you can see it's a different tile.



Is there a setting or anything I can do to have the splitter actually keep the same tile order?

More than that, is the a way to set the splitter to not place tiles almost randomly. So look at the example below: The corner tile (0) has as its neighbors tile 7, 6 and 3? Doesn't seem very logical.


BTW, tile 1 is down, BELOW tile 7

Maybe I'm not setting something correctly but there aren't any docs on this node as it's pretty simple.

Any help would be appreciated.
Edited by firefly9000 - April 10, 2021 19:52:52

Attachments:
randomtiles01.png (38.4 KB)
randomtiles02.png (753.2 KB)
randomtiles03.png (714.0 KB)

Winter is coming!
User Avatar
Member
169 posts
Joined: April 2014
Offline
Oh well, did it in vex. Not very elegant (or scalable at this point) but it works.

s@groupname = "tiling" + sprintf("%i", @class);
setprimgroup(0, @groupname, @primnum, 1, "set"); 
v@result_bb = getbbox_center(0, s@groupname);
v@tile = rint(@result_bb/1024) * -1;
f@tilenumber = @tile.x + (@tile.z * 4);
Winter is coming!
  • Quick Links