I read somewhere by Hannes to turn all GI settings to off or 0, turn off sun shadows, and disable atmosphere. That's good for exporting the geometry, but what settings should one use when exporting the image for use? Should any GI be on, same as for a regular render? Should jitterings be back on? Sun shadows maybe not if the 3d app will generate those. Thanks.
Not quite sure, what you mean. Yes, it's fine to turn unnecessary things off to speed up the exporting process. What do you mean by exporting the image for use?
I exported a 200x200 geometry, but of course the image is super bad, so I have to render a high resolution to slap on it in 3dmax.
So you want to render something out in 3ds Max with the terrain you exported?
I'd say no good idea. I don't know what you're planning to do, but I guess the main reason for exporting a piece of terrain out of TG is to place something on it in another app (like 3ds Max), maybe render it there with the appropriate light settings and some shadow pass and compose it together with an image rendered in TG, right?
If you're trying to do some kind of front-projection to get TG quality in Max, then you'd render out the TG scene at "full" quality. If you are just trying to get a texture, then you'd want neutral lighting of course, and no haze/atmo, however you'll find it basically impossible to reproduce TG's render quality in Max in large part because the procedural functions do not export well, not to mention there is not a dedicated texture export function.
Thanks Hannes and Oshyan. What I'm doing is exporting the terrain for the sole purpose of rendering the objects on the terrain (that will be hidden from camera), then comping together the TG shot with the object/shadow pass, like you said Hannes. The purpose of the image for the geometry was only for light bounce.
Quote from: dorianvan on May 25, 2017, 12:17:09 pm
The purpose of the image for the geometry was only for light bounce.
In that case I reckon you have two options.
A) Render with all lighting and GI, but make the atmosphere invisible with the checkbox on the render node (or render layer). Then apply this texture as a fully luminous/emissive texture in 3ds Max. This way you can guarantee the lighting on your Max terrain will be the same as the Terragen render. Unfortunately, this won't catch the shadow of your object, so you will get more bounce in the shadow than you should. But perhaps you can do some special trick in the material to apply the object's shadow at render time. Or perhaps you can bring the object into Terragen to cast the shadow, and then it's going to be correct.
B) Render just an unlit diffuse texture and apply this to a diffuse material in Max, so that the Max lights light the terrain. This way your object will cast a shadow onto the terrain before it acts as a bounce light. The potential downside is a lack of resolution in the shading if your geo isn't as detailed as the texture, and you'd also want to be careful to match the brightness of the terrain between Terragen and Max. To render and unlit texture from Terragen, turn off GI, shadows and atmosphere to save render time, and output the "Surface Diffuse Colour (before lighting)" in Render Elements. Actually you might want to enable that render element for all your renders whichever method you choose, in case it's useful.
This is very similar to the process I used for my animation "Desert Dawn Drive":
Quote from: undefinedhttps://vimeo.com/353207617
and here's a breakdown of the elements:
Quote from: undefinedhttps://www.youtube.com/watch?reload=9&v=Ifn1X1kGNqo&feature=youtu.be
If you check around 0:16 you'll see the terrain I used in Maya. Sections of the terrain are higher-rez than others and I used tiling with my custom Mel script to split the imported micro exports from Terragen into foreground and background layers.
As you can see, the terrain in the foreground where the car passes over is not as detailed as the Terragen render, but works just fine for casting shadows. Also, as Oshyan mentions, the terrain color maps are nowhere near as detailed as Terragen, but for the purposes of bouncing GI onto the Maya vehicle, they work ok.
I could have used more tiling and higher-rez maps to import terrain textures into Maya, but this was a good trade off between speed, memory and quality. As Matt mentions, add the Surface Diffuse Colour (before lighting) render element (if you have the Professional version) to get the diffuse albedo with no lighting baked in.
Quote from: Matt on May 25, 2017, 05:32:55 pmOr perhaps you can bring the object into Terragen to cast the shadow, and then it's going to be correct.
You can do that, but depending on your animation your shadows won't be motion blurred as imported obj won't render with motion blur.
My solution was to render a shadow matte from Maya (using Arnold) (at 0:18 in the video) - I used that in a composite to matte out the direct light in the Terragen render:
The TG render had tgSurfDirectDiff and tgSurfIndirectDiff render elements turned on and the shadow pass matted out the tgSurfDirectDiff, this way the composited shadow matches the Terragen shadows exactly. With Arnold, there was an added AOV from the shadow pass that rendered the bounce from the vehicle onto the terrain so that could be added to the terrain render also.
To get the Terragen lighting into Maya, I rendered a spherical camera from roughly the position of the animation and added three render elements:
If you add these together in a compositing package but omit the Surface Emission (Luminosity) render element you basically get the ambient light from the Terragen scene. You can then add a Direct light in 3dsMax to restore the sun direct light. I wrote a script to get the position of the Terragen sun based on the hotspot in the emission map and the postion of the shadows matched very accurately, but this can be done manually also.
Great job Graham, I would have gone a bit overboard on working over the shocks in this terrain, but this is really good compositing and animation work!
What is an AOV? A render element?
I like that volume pas with the dust following.
Also, I must be doing something wrong when exporting the micro terrain because when I bring into max, there are faces on faces and other problems that cause blotches to render on all the frames and obnoxiously different as well. So I can't even show a preview it's so distracting. Is there a standard check off list for doing this? Would be good to have a Terrain Check... button, eh?
Quote from: dorianvan on September 05, 2019, 06:15:15 pmWhat is an AOV? A render element?
Yes, exactly the same - stands for Arbitrary Output Variable - it's what Arnold, Renderman and a few other renderers call Render Elements.
Quote from: dorianvan on September 05, 2019, 06:15:15 pmthere are faces on faces and other problems that cause blotches to render on all the frames
You probably need to clean the micro geo either before it gets into 3ds max or using max's tools.
The geo will definitely have duplicated vertices and sometimes faces, and depending what you're rendering the terrain with can cause artifacts.
I don't know how max is with editing geometry like this, but in Maya it's horribly slow, so I use an open source prog called Meshlab
More info in this post:
P.s If you have Mudbox, you could export a vector displacement map of your terrain from Terragen and have it displace a plane in Mudbox, then you would have a very clean (in quads) hi-rez mesh to work with:
I have it now. If you turn it to 1 thread, then change the bucket controls to a big enough size like 1000x1000 (a little testing), and uncheck Allow auto reduction, that the mesh rendering problems are gone in max. I'll have to look at vector displacement. Thanks. And I really appreciate your breakdown shot!