My engine requires my tiles to include the spanning edges, and since I figure this was a common requirement I thought that was what enabling the +1 did. When I ran my tiled build, however, the heightmap files (output as .r16) clearly only contained 2^n samples, not 2^(n+1). Is there any way to obtain tiles that cover 2^(n+1) ? And what exactly does that checkbox in extents do? Thanks!
You know, you have a good point. The resolution of the tiled builds have always been de-coupled from the primary one for many good reasons… but it is reasonable that if you have the +1 checked, you should get that on your tiled builds too. I will change this for the next release.
In the interim, you can just click the “custom” button next to the tiled resolution slider and set it to the 2^n + 1 size that you need.
Would that work though? In most tiled terrain engines I’ve worked with (mine and others) the 2^n+1 tiles include the leading of the adjacent tiles. This is typically done as other data channels like texturing, collision, ect., are managed on a per quad/tile at 2^n, while heightmap vertices define these and are cached as tile grids (or other [C]LOD structures like PQT,) where the shared edges are duplicated so you only have to code one resource/render case, hence the +1.
I’ve worked around this for now by adding a processing step to the import path I’m building for WorldMachine content, but it would be nice if the +1 feature existed in the future…
If I understand your needs correctly, this should already exist:
Make sure that “Share edge vertices” under tiling options is checked.
If this is checked, all edge values for each tile are identical with the adjacent edge of its neighbors. If it is not, the tiles areas of coverage do not overlap.
I did have that option checked, but it didn’t appear to work.
My extent: normal build: rez = 16385x16385, +1 checked; tiled: Shared edge checked, tile rez=256x256, tiles per side=64x64.
What I see generated are 4k files at exactly 131072 bytes, which for .r16 is correct for a 256x256 point tile.
Presuming each tile point is unique (not shared) that works out to 16384x16384 samples exported.
If these tiles do in fact contain shared edge data, then there are two problems - first, that would work out to 255x255 unique points per tile, or only 16320x16320 unique samples being exported; second the tiles won’t work in the way I expect +1 to work - for all the terrain engines I’ve used in past (mine and others) based on quad tree or large tile, which expect a 2^n quads per tile, which means 2^n+1 heightfield samples per tile with 2^n unique samples per tile.
That said, a) I’m still not clear where/how the +1 is being applied, and b) either “shared edge” reduces the size of the exported heightfield by 1/, or it doesn’t work?
Now I certainly can’t impose my understanding of terrain engine tile +1 on others, as the way I’m used to might be different from what other engines use, and as I mentioned I’ve already worked around this in my WorldMachine importer. I might also have a math problem above, but I don’t think I do. It is also possible that “shared edge” is exporting shared edges with a reduced total output, I haven’t manually compared points and I’m about a day from seeing the exported terrain in engine, I should see a repeating grid pattern if that is the case.
In any case, I still certainly love the tool (worth every penny!), and everyone who’s seen what we generated in our first attempt has been very impressed! (screenshot attached for no particular reason.)
I believe we are saying the same thing just differently.
To recap/clarify:
[ul][li]The “+1” option right now ONLY applies to normal builds, not tiled builds. as I mentioned earlier, this is a historical accident more than anything else, and it should probably should be extended to tiled builds as well.
For a tiled build with 2^n+1 sizes, for now just set the resolution directly to what you need per-tile (ie 257) in that dialog. It will be unaffected by the presence or absence of the +1 option.[/li]
[li]
The “shared edges” reduces the number of unique samples per tile as you mentioned, as the sampling locations in the tile are adjusted so that in the complete set, each adjacent tile edge samples the same world space location. If you set the tilesize explicitly to what you need, this should produce your desired result.
[/li][/ul]
If you export a simple tile test set and load it into photoshop or similar you should see the expected behavior in the output.
I think the confusion is just that WM is, rather than taking your desired samples and adding additional ones, is slightly reducing the unique sampling to give you the border edges. This is because WM is not constrained to power of two sizes at all; you can export any size tile and still get common edges by its method.
Hope that helps! And, I like your island terrain. Post further results as work proceeds!
Ah, now I understand much better, thank you for the clarifications!
Wow, that is a really nice result!
Hats off to you, sir!
I was looking again and again to your screenshot and I can`t stop asking myself how you did it?
Even though it has a light cartoonish feeling, I love it. Do you mind if I ask how did you made the beaches around the island?
Also the terrain. What did you used to build the hills with that random look and slightly rocky feeling. And still maintaining the size and proportions with the island.
I tried to do something similar but I was not even close.
Any help will be highly appreciated.
Cheers,
Taku
Glad you like it, and no problem sharing techniques at all.
Hardest thing w/ fractals is getting the look and feel right if you’re going for something specific, I use successive refinement. I knew I wanted an island with a complex shoreline, so I started w/ Advanced Perlin, the “Billowy” style seemed to do a nice job with island like shapes. I scaled it to where it was creating lots of islands, then randomized over and over until I spotted a good candidate, called that generator ‘gross terrain’. Created layout bounds with a poly to use as mask input to isolate just the one I wanted and smooth down to ocean floor everywhere else, leaving a little noise height.
I brought erosion in here so I could refine terrain against eroded shapes, used Erosion feeding into Coastal Erosion.
Next level of shape (fine terrain) was another Advanced Perlin, masked from gross terrain, ‘Ridged’ style seemed nice, and here I played with scale until I was seeing mountain features of the general complexity I wanted, then randomized and tweaked scale until I found something close to the look I wanted. Fed that output through Terrace on smooth, tweaked until I liked the final shapes.
For the look I wanted I had to apply two modifications to the fractal terrain, one was to flatten the southern side of the island (for geological reasons, simulating pacific hot spot island, its the trailing eroded side,) got that by creating another layout generator and a polygon splitting island, used it as mask input to a clip module.
The volcano was harder, I wasted a bunch of time trying to get the shape I wanted using fractals until I realized I was doing it wrong - its new terrain and starts w/ simple self-deposited geometric cone, so I built a cone in layout generator for the volcano mountain, subtracted a dome (using combiner) from another layout generator, and masked it all onto the terrain using yet another layout generator to mark off the whole volcanic region. That output I fed through another erosion engine set differently (harder rock, less time, ect.), then combined all the erosion outputs (heightfields and flow/wear/reposition masks.)
Colorization tool a while to get right, I ended up taking the Coastal Overlay macro apart and using parts of it. In order - I selected rock using the select slope/height and combiner from Coastal Overlay, fed that into two choosers also ala Coastal Overlay to add color for rock, vegitation, and volcanic terrain. I originally used perlins w/ colorization, which made the render prettier, but I needed color key output to drive biome population so I reverted that back to solid colors which still looked good. (Wish there was easy way to select options so I could leave both in.)
The beach took the most time - most techniques I saw used select height, but that got all the low lying inland terrain. To fix that I started with a select height set to 0 to water level with falloff at 0, which gave me a hard waterline mask. That fed through expander set to max, hybrid, distance 11 to blur the mask edges in land from the ocean some. That was used as a mask input for another height selector set a little above water level and up, which was finally used as input to a chooser to put a beach color everywhere it selected, and the other colorization output everywhere else. The blurred water mask input was the trick to keep the beach constrained to near the waterline, which only worked when there was no hole in the island. Final output there was my surface color key bitmap layer.
For rendering I added the combined flow to the surface layer, masked above waterline, which hightlighted erosion nicely. Lighting was the light-map maker and associated modules from Coastal Overlay, applied at this stage using the flow blended surface map and final heightfield.
Sorry post was so long, but that captures what and how I got to that final result. Again, I love this tool - I’ve been using fractals for game terrain for 20+ years, and this tool works exactly how I always wanted a fractal terrain designer to…
Thank you so much for your answer. I was able to follow you for a while and I definitively need some time to try it myself to see how close I can get. Ill be back in a few days and if I manage to come with something close I
ll post it here.
Again, thank you very much for your detailed answer.
Cheers,
Taku