Working with some procedural code:
returns an int based on Size. I don't want to calculate based on Size only, want to generate based on 2 additional things:
1. If character is within certain range return
2. The more complicated part:
If character is outside of a certain range and the the object is within character viewport return an int
If the object is not within the character viewport and is also not in range I want it to be
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.
Code:
return FMath::Clamp(FMath::CeilToInt(FMath::Log2(Size / float(CHUNK_SIZE))), 1, MAX_WORLD_DEPTH - 1);
1. If character is within certain range return
Code:
FMath::Log2(Size / float(CHUNK_SIZE))
If character is outside of a certain range and the the object is within character viewport return an int
Code:
FMath::Log2(Size / float(CHUNK_SIZE))
Code:
FMath::Log10(Size / float(CHUNK_SIZE))
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.
Comment