Jump to content

Correct viewer behavior when region terrain elevation limits are reversed.


You are about to reply to a thread that has been inactive for 579 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

One of those obscure things I have to deal with in my experimental viewer. (All new code, in Rust, with completely different bugs.)

Babbage Palisade does a clever thing to reduce the number of prims required - the cobblestone street texture is the highest terrain elevation texture. So streets don't need prims. Usually, the exact places where textures transition are changes from grass to rock to snow, and the exact locations aren't critical. But here, it matters.

Here's the region textures dialog, from Firestorm.

babbagepalisaderanges.png.52c43a2bbd1f10f8491a28c150596fc7.png

Oops. For the northeast corner, "Low" is larger than "High". That looks wrong. Negative numbers for elevations are kind of strange, too.

 

babbagepalisadewrongcobbles.thumb.png.69cd48573b5e0aaf129d7fa21844e18b.png

Babbage Palisade, east edge, near northeast corner. Next region not shown. My experimental viewer gets this undefined behavior wrong. This wasn't supposed to transition to cobblestones.

I followed the directions for how to create terrain textures in the SL Wiki. But it doesn't describe this case. Looks like I need to be bug-compatible.

The way this works is that, for the terrain thresholds for all four corners, for every point in the region, the terrain height is interpolated.  So, if the corners agree for adjacent regions, the textures match. Here, there's a huge range for "Low", from 116 at the NE corner down to -20 at the SE corner.

I suspect I need to clamp some numbers into the allowed range, but I'm not sure exactly how LL does that, and I have to match. Some of this is done in custom shader code in the LL-based viewers, but I'm doing it by breaking terrain into multiple meshes with different textures and treating them like normal meshes.

Actual ground height here is around 92, by the way.

Any idea on exactly how this is supposed to work for these strange cases?

(This can't be as bad as sculpts were. SL sculpts heavily exploit bugs in the sculpt code to get 2x triangles for free.)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 579 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...