using huge earth tex map

Started by skarlath, July 03, 2012, 01:28:32 AM

Previous topic - Next topic

skarlath

i have a 86k x 42k texture map of the earth i need to use for a project but i can only save it as a psb and terragen 2 dosent seem to want to read a psb, i can break it up into smaller chunks and use jpg but how can i use multiple images as image map shaders to apply as one image to a planet in tg2?

bigben

Check the maximum area of image you can handle in TG. Slice the texture into cube faces. Set up 6 cameras (1 for each cube face) at the center of the planet and then simply add an image map projected through each camera.  You can flip the image in the image map node so you don't have to worry about the fact that you're projecting from the center of the planet. (I used 91° tiles in my test to avoid possible issues at the seams)

cyphyr

Excellent Ben, I always wondered if this would work. I presume it will also work just the same for displacement maps?
Although how would he go about creating the maps for the north and south pole?
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

bigben

Quote from: cyphyr on July 03, 2012, 08:05:48 AM
Excellent Ben, I always wondered if this would work. I presume it will also work just the same for displacement maps?
Although how would he go about creating the maps for the north and south pole?

I use panoramic stitching software to create the cube faces. You can't just crop them out of a texture map as the projection would not match the camera (equirectangular and rectilinear respectively).  Dealing with a single, really large texture map can be a bit trickier, but it is possible to crop the image down into smaller pieces before remapping.

Most of the blue marble texture maps are also available as tile sets which can be easier to work with.  The other advantage to this method is that you may not necessarily need the full resolution for the entire globe, so you can make each of the cube faces with different resolutions to optimise performance.

bobbystahr

looks like another app I'll need eventually...thanks for the visual tute in it's use Ben....
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

skarlath

awesome thanks ima go try that now, oh and the images are already broken into 8 chunks of 21k each

bigben

Quote from: bobbystahr on July 03, 2012, 10:16:48 AM
looks like another app I'll need eventually...thanks for the visual tute in it's use Ben....

There are free apps that are perfectly suitable for this e.g. http://hugin.sourceforge.net/

skarlath

having an issue with that program of yours, i cant import the full size image becaues it just dosnt support it so i tried to add the smaller parts of it and stitch it in the program but it requires areas that overlap so how can i compile the image in this program then break it up into a cube when the earth maps dont have any overlap

bigben

I use PTGui but the interfaces should be similar as the principles are the same.
Assuming the images are 2 rows of 4, each column of images = 90° wide (equirectangular/geographic projection). For each horizontal cube face (rectilinear projection), load a 2 x 2 grid of images. To position the images you need to use offset (1/2 the images size) rather than yaw and pitch.
[attach=1]

Adjacent images are typically stitched with a feathered edge to disguise the seams but in this case you need to set the feather to 0.
[attach=2]

For the poles, you'll need a full row, using offset position the images as before, and yaw, pitch and roll to reorient the entire image to put the pole in the center
[attach=3]

I don't know if it's necessary, but to be safe I'd create images with 91° fov to avoid possible issues at adjoining edges in the TG render (matching the fov of the camera to whatever number you choose)

bigben

Had a play with August 2004 blue marble.  Image maps load/render quickly, but don't forget 2Gb RAM per image ;)

skarlath

wait what, 2g ram per image??? darn my 8gig may not be enough for this then

bigben

#11
There's VM as well, but when I loaded 1 image both went up to 2Gb (~ uncompressed size of the image so no surprises really)

The question then is why? To see the full resolution you'd need to be quite close to the planet, but at that distance you wouldn't need more than 3 tiles, and even then, only when you're at the "corner" of the cube faces.  The other challenge with the blue marble textures is that there is no texture for the open ocean. It's just a solid colour R2 G5 B20 (which is why they compress so well).

bigben

#12
Dusting off the cobwebs... Here's a crude hack to replace the ocean with water.  It's possible that this may be putting small amounts of water in other areas of "terrain", and some areas of bright shallow water may (should, according to the principle used) be excluded.

Running a render at the moment.  Single cube face, no atmosphere. 5Gb RAM, 6Gb VM (I only have 8Gb RAM)

skarlath

yeah i use a water shader connected to a distribution with a image map shader as a mask of the ocean it seems to work well

bigben

SW coast of S. America up too close for the resolution of the texture, but you can see where them mask "fails". That said, unless your mask image is at the same resolution as the image, this may be an improvement