DQXIS-SDK icon indicating copy to clipboard operation
DQXIS-SDK copied to clipboard

Improve distance of outline/cell shading

Open emoose opened this issue 3 years ago • 1 comments

Outline stops being drawn on NPCs after just a few meters, would be nice to increase the distance.

Two cvars seem to be distance related: r.SkeletalMesh.OutlineMaxLOD & r.StaticMesh.OutlineMaxLOD, but changing them doesn't seem to make much difference at all (didn't notice any difference whatsoever :/), fortunately there is code actually checking them though, so that might be a good lead on where the outline checks are done.

emoose avatar Mar 03 '21 23:03 emoose

E: actually seems I was wrong, r.SkeletalMeshLODBias doesn't seem to have any effect, maybe it was something else I was trying at the time, hm


Seems that it is tied with LOD, changing the r.SkeletalMeshLODBias can increase/decrease the distance, but only up to a point (I guess there's some other LOD check besides r.SkeletalMesh.OutlineMaxLOD)

Forcing the LOD level with code such as below still seems to make the outline fade after some distance though, maybe there's something more than LOD being used...

  auto ffs = UObject::FindObjects<USkinnedMeshComponent>();
  for (auto objs : ffs)
  {
    objs->SetForcedLOD(1);
  }

emoose avatar Mar 16 '21 02:03 emoose