Working with some procedural code:
return FMath::Clamp(FMath::CeilToInt(FMath::Log2(Size / float(CHUNK_SIZE))), 1, MAX_WORLD_DEPTH - 1);
returns an int based on Size. I don’t want to calculate based on Size only, want to generate based on 2 additional things:
- If character is within certain range return
FMath::Log2(Size / float(CHUNK_SIZE))
- The more complicated part:
If character is outside of a certain range and the the object is within character viewport return an int
FMath::Log2(Size / float(CHUNK_SIZE))
If the object is not within the character viewport and is also not in range I want it to be
FMath::Log10(Size / float(CHUNK_SIZE))
instead.
In essence returning a smaller exponential increase in lod on the front of a sphere with a rapid lod increase on the non-visible backside of a sphere.
Any help/tips would be appreciated.