Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CHANGING LEVELS OF DETAIL

This tutorial will show you how to use Kismet to swap out low poly models for high poly models without programming. It takes a ton of kismet to get it done for all static meshes in your scene, so I would recommend using programming or only using it for major items in your scene. Either way, here is a way to do it. You will need: 1 1024x1024x1024 subtracted cube level 1 light to light the scene 1 player start 1 static mesh set to be hidden (click on the mesh, press f4, under Display, turn on bHiddenor use kismet to turn it offthis will be discussed below)

Here is the kismet:

You will see that you need some way of telling the computer how far you are away from the mesh or how close you are to it. For that I used a Get Distance (New Action, Actor, Get Distance). It gets a distance between 2 objectsI set them to the player and a static mesh. That way, when the player gets inside the set distance, the low poly will change to a high poly. You could also switch textures, play an animation ,etc, but in this example, we are just swapping out models.

You will notice that I set the distance to 0 Thats because I want to count and it is easier to count from zero. So, what happens is that when the level starts, it gets the distance between you and the meshone timethat is why I have the get distance out connected back into the get distance in slotso it will get the distance constantly. The float counter will count a decimal number (right click, new comparison, counter, float counter). I have it set to unhide my high poly when the numbers are equal or the distance is less than the B number. I used less because that means you are even closer than the B number. I have set the B number to be the distance in unreal units for how close the player has to be in order to see the high poly detailsthis is just a random number for this example. You will notice that all other comparisons are resetting the distance value back to zero so it can start counting again (right click, new action, set variable, float). So, once the distance is correct, do whatever you want. In this case we unhide the high poly (right click, new action, toggle, toggle hidden).

You might also like