Exporting image map for planet

Started by balteus, October 24, 2018, 04:26:30 PM

Previous topic - Next topic

balteus

Hi all,
I was wondering if there is any method for creating an image map for the planet in terragen so that the map can be used on a sphere in another application. I have been searching this forum for the same and have not been able to find a good solution.
If there is no direct way of achieving this then I was thinking of maybe using several cameras to render the planet surface and stitching together the rendered images in Mari. Has anyone here tried that before?
Any suggestions are welcome.

Thanks.

sboerner

Do you need displacement or just the diffuse color?

What if you put a spherical camera at the center of the planet? (Thinking out loud here.)

balteus

@sboerner: thanks for the reply
I just need the diffuse colour although being able to get displacement map would be handy as well.
Camera in the center of the planet doesn't work.

Oshyan

This is not officially a supported function. But one possibility would be to put your camera *inside* the planet (good call sboerner!), give the planet a negative radius, and render a spherical image. The trick is giving it a negative radius (equal to its original radius; just put a - at the beginning of the radius value you had, after you put the camera inside).

For displacement it's a bit more complicated than that, you need to disable GI and other lighting and turn the height values of the planet into color values (black to white). You also would ideally remap the black and white point values so you get a more manageable ramp of height values you can use. Then render out spherical and save to 32 bit EXR. I've attached an example project file which shows a basic setup. Note that the Color Adjust values need to be changed to reflect the minimum and maximum displacement values of your terrain for the color adjustment/remap to work right. And you'll need to fiddle with this in your other app(s) to get the height remapped correctly. If you take it into Photoshop for example, it will appear all black, but increase Exposure by a good amount and you'll see the height values.

- Oshyan

sboerner

Negative radius – of course. The background shader uses one, and I used a sphere with a negative radius a while back for a starfield. It reverses the surface?

Oshyan


WAS

Makes sense from a mathematical perspective (really shocked I can comprehend that). As 0 would be folded on itself, thus, negative values would be that fold continuing, thus reverse faces.

Oshyan

Sorry, forgot to make the surface luminous. This should help get the values into a viewable range out of the box. :D New TGD attached.

- Oshyan

balteus

Negative radius! did not think of that. I was wondering if there was a way to flip normals for the planet to render it from the center. This is so cool. Thanks oshyan   ;D ;D
Can this method do atmosphere and clouds?

Oshyan

You could disable surface rendering and put the camera in the center of the planet to export a full spherical atmosphere, but you'd be looking at the haze bottom-up, which would strongly affect things, and I don't really know how you'd apply that in any other application anyway. If you mean to export something like a cloud shape/density mask, you might be able to fake this by disabling both terrain and atmosphere with a *non*-inverted planet and having the camera at the center...

- Oshyan

ajcgi

Ah man, how did I never think of this!?
Negative radius has been staring me in the face all this time.   :-\

balteus

Well the intention behind getting a map for the entire planet with the clouds was to map that on a sphere in maya for my previz. Getting the layers for the surface and clouds separately would have helped in the comp stage if I needed to tweak the layers as I wanted.

sboerner

Can you let us know how this all works out? Who knows, I may need to do something like this some day.

balteus

UPDATE:
Ended up rendering a bunch of camera angles for the planet and stitching the renders together in Mari. This gave me the most control but at the expense of time since it takes some time to set up everything. I have 6 cameras at the moment but for higher res I might end up with 24 or more cameras and writing a python script for Mari to project and bake the images from the respective cameras.
The other method discussed in this thread for keeping the camera in the center of the planet was really useful for doing maps for moons. Since I have a lot of moons and they do not have any clouds or atmosphere, generating a diffuse and heightmap works well especially for the far away shots. Heightmap for the planet would also work well with this method.

I need to figure out atmosphere for the planet now. I already have maps for the surface diffuse, cloud diffuse and cloud alpha. I would prefer a volume out of Houdini or Maya but I know they wont handle a volume of planet scale, if only I could get the atmosphere as a sphere out of terragen. Is vdb gonna be an option in the future for terragen? How about using GPU for rendering (would be so useful at production level).

ajcgi

Ah now the 6 cameras method is something I've done with a Nuke compositor in the past. That I recognise.
VDB is slowly in development and we're regularly mentioning GPUs just in case Matt suddenly finds 24 hour working days to be attactive.
My answer to atmospherics has been to fake it in the comp sometimes. Even when I render out of TG and comp in Nuke I'll often manipulate the atmosphere or create one from scratch using the depth channel as a way of knocking out some detail for mountains etc.