matching Terragen sky sphere in Nuke

Started by james adamson, March 01, 2020, 04:17:00 PM

Previous topic - Next topic

james adamson

Hi all.
I would like the flexibility to replace a background in a rendered Terragen scene. The scene will be rendered with elements and Ideally I would like to re project
different images onto a sphere in Nuke and replace the rendered one. Colour and atmos issues aside are there any numbers I can just tap into a sphere in Nuke
that will give me the same surface. I will obviously have the correct camera.
Cheers.
James.

digitalguru

Do you mean you are going to replace the sky in the Nuke comp?

james adamson

Yes. The sky is one I have already built in Nuke and I have placed into my Terragen scene. I would like the ability to replace it or change it later so have rendered all the elements using your lovely tutorial. Some of the alphas are a bit odd but I think that is the way Terrgen has to process them. I was just wondering if there were numbers available for the sky sphere that Terragen uses.
Cheers.
James.

digitalguru

See below for a snippet from Nuke with a sky image / camera setup - this should work for an input image (not included) of 4096 x 2048 - you might have to play with the reformat setting for your scene.

Also, if you're rendering your Terragen scene and planning on replacing the sky - turn off "Atmo/cloud on background" in the Layer Settings of the Render Elements node to give you the correct premult against black for the color elements of your terrain.

Nuke code snippet:

set cut_paste_input [stack 0]
version 9.0 v7
push $cut_paste_input
Camera2 {
translate {29766.85742 1174.575439 -48914.14063}
rotate {13.00316143 127.4347305 -2.942439079}
scaling {10 10 10}
focal 32
haperture 36.00000381
vaperture 24.00000218
near 10
far 600000
file
name Camera1
selected true
xpos 249
ypos -140
}
Read {
inputs 0
file
format "4096 2048 0 0 4096 2048 1 "
origset true
name Read1
selected true
xpos 96
ypos -370
}
Reformat {
format "4096 4096 0 0 4096 4096 1 temp"
resize fit
pbb true
name Reformat1
selected true
xpos 96
ypos -226
}
Sphere {
cast_shadow false
receive_shadow false
radius 100000
rotate {0 -30 0}
name Sphere2
selected true
xpos 96
ypos -132
}
Scene {
display textured
render_mode textured
name Scene2
selected true
xpos 105
ypos -32
}
push 0
ScanlineRender {
inputs 3
conservative_shader_sampling false
samples 2
motion_vectors_type distance
name ScanlineRender2
selected true
xpos 240
ypos -24
}

james adamson


james adamson

Will turning off atmos cloud on background affect the Gi cache I have rendered? I guess it would.

digitalguru

I don't think so, as you've cached before turning that off the correct GI is stored.

I think that switch just prevents the atmo from being displayed in the render but still calculates internally.


james adamson

What about the other atmos switch lower down to the right?

james adamson

I think I saw a tutorial you did where you used Terragen to build a hdri lighting setup for a Maya scene? I have a large scene I have built in Modo but would like to replace all the terrain with Terragen terrain. I have hundreds of buildings all textured. They are Arch models so they are pretty detailed and all positioned. I am not sure of the most efficient way to go. Either importing my city into Terragen and rendering there which sounds painful there are loads and loads of instances. The scene file is a few gig. Or creating a skydome from Terragen and lighting my Modo scene with that. Any thoughts?
Cheers.
James.

digitalguru

Quote from: james adamson on March 02, 2020, 06:05:04 PMWhat about the other atmos switch lower down to the right?
You don't need to touch those if you're just turning off the sky for comp


Quote from: james adamson on March 02, 2020, 06:11:30 PMOr creating a skydome from Terragen and lighting my Modo scene with that
IMHO definitely the way to go, though there are advantages and disadvantages in both methods:

If you render all your scene in TG (importing the city geo), you'll probably have to re-lookdev your buildings with TG shaders to match the Blender renders and you'll lose any instancing unless you can think of a clever use of the population node. That being said TG is pretty good at handling large amounts of geo.
or the other way - render a skydome and use that to light your scene, export a hi-rez obj of the terrain to use purely as a matte object for the city to ground intersections. Terraman could help if you use Maya, but doesn't support Blender.

james adamson

Cheers. Yeah I have been exporting Hi res meshes into Nuke and Modo. (not blender) and its been working a treat. I did go through the whole vector displacing tutorial. The one from Terragen to mudbox only to discover that Modo does vector displacement in a different manner so the maps did not work so that was a bust. But it turns out the objs are fine on my system so happy days. I do like the idea of rendering the whole thing in Terragen. It has got such a great look but I think it may be painful. Probably give it a go. I will post update on which route when I get stuck in.
Cheers.
James.