Download

Maximum texture resolution and world geometry

Greetings,

I am creating a space sim in UE4 and currently working on the earth shader. Since most of the environment consists of the space around the earth I want an extremely high resolution/detail of earth’s terrain. While going through the documentation it states that by default UE4 limits texture resolution to 4096x4096. In addition, texture resolutions up to 8192x8192 are possible by modifying the engine’s source code.

Here are my questions:

  1. Is it possible to go beyond 81928192? (I have a texture 163848192 and like to use that).

  2. Is there some way around this resolution limitation for cases where textures (that are not going to be tiled) are being applied to meshes representing world geometry?

Any advice/knowledge/help is greatly appreciated,

Muunich

The problem is that hardware is limited to how big textures it can access. 4096x4096 works on most, but not all, hardware currently in use (the tail end of integrated graphics tops out at 2048x2048 IIRC.)

What you want to do is probably to build your Earth with many materials. Then map each sector to a particular material. For filtering to work across the edges, there needs to be a small amount of overlap at the edges. For example, you can break the Earth into a cube with 2x2 textures on each of the 6 faces. Make perhaps 32 pixels overlap on each side, and map the center of that overlap to each edge vertex, which gives you (4096-32)*2 resolution for each quarter-circumference. The “cube” then needs to be stretched/inflated to actually become a spheroid.

I know you specifically asked about textures that aren’t going to be tiled, but I would invest a lot of time in trying to tile those textures. You could probably get matching levels of quality with tiling and it could also scale based on camera distance so it would look good from space and while standing on the ground.

3 workflows:

  1. Create a big mask(8 colors) for your earth and blend the textures.

  2. Use the Frac node to combine your 4k textures to one big texture.

  3. Create for your earth mesh MatIDs and use instance materials.

I think the first way is the best solution for performance and quality. You can use distance blending for clean fade in/out.
Here a sample for distance blending distanceand near. In the Distance is only a simple mask texture with blend colors. In the near is blending to textures.

Well I am happy to see there are (many) solutions to my problem :). I am very new to this, so I didn’t know the best way to approach the problem.

I will evaluate all these approaches. I appreciate all your responses.

@Ulrich Can you elaborate a little on solution # " 2." that you mention? Looking at the documentation it says “The Frac expression takes in value(s) and outputs the decimal part of those values”. I am really not sure how I would use this to combine all the 4k textures. I just tried inputting some textures into their own frac node and added them, and it didnt look too pretty. How would you make sure the combination of the separate textures would be in the correct order?

Thanks again

Muunich

way 2

http://img5.fotos-hochladen.net/thumbnail/megatextureyt8cmjbwa5_thumb.jpg

result

http://img5.fotos-hochladen.net/uploads/result70y4dnac5v.jpg

Wow, thanks for that thorough example. It is quite busy but I’ll figure out the logic later tonight.

Thanks again mate.

Muunich