Specific Terrain formations

Started by Stephen, April 05, 2012, 10:18:25 AM

Previous topic - Next topic

Stephen

So i have been playing around with Terragen for a little while now, and i am loving the kind of images it can produce! I just have one question..

How do you produce a specific terrain feature?

To explain a little further i should probably provide some background so you know where i am coming from  ;D

I have done quite a bit of 3d modelling in blender and have recently moved onto maya. At present i have been working on a scene that i plan on animating when it is all finally done (sci - fantasy) and have many of the objects well on their way to completion. What my scene is lacking is terrain. A 3d modelling program like maya or blender is not really designed for producing large scale terrain - and definately not at all quickly. The other problem is it needs to be high detail as well - and my graphics card is not what you would call "millions of polys running seamlessly with no lag" material. That is exactly what this scene would be if it was all done in maya/blender.

So here we are!! ;D im wanting to build a scene that i have plastered in my head and im wondering how to do that in Terragen. I do not want to go over every inch of my world and place every mound and boulder where i want it (that would be just applying a bunch of objects into a scene) but i would like to know how to have more control than just move this slider here and.. poof, thats my terrain - if i dont like it try again.
I understand that a procedural is what i need to cover vast amounts of space with varying yet similar terrain and a heightfield is what i need for something more specific set in a bounding area, that i can presumingly tile all over the place to get my features (I plan on using the second method). Im just not sure how to do this.

All tutorials that i have read so far (most of the user wiki ones) all have useful info, but they are all very much: put this value here, that value there and do this, this, and this - without really explaining what each one is doing or why we are doing that. So far what i am picking up is have a play with the terrain features -> move camera into ideal position -> add objects and shaders -> render your random image. This is very handy for those that are artistically programed as the results obtained can be absolutely amazing! But i am not so enlightened  :-\ . i am one of those people that will read the entire book before i play a game - i like to know how things work before i use them  :P

So i guess what i am really looking for is something that does not exist - and that is more documentation on how T2 works, which is why i humbly present myself to the gurus that have been using this program for years now (or at least longer than a bit over a week). How can i manipulate my heightfields so i can produce the terrain that is inside of my head and into a render?

I have intentionally left out the finer details of the terrain in question so that your answers do not just cover a specific feature but will (hopefully) be a little more 'how to make heightfields look how you want them to' instead of how to produce this one or that one  ;D

cheers for your time guys and sorry for the long post, but i really appreciate the help

Stephen

red_planet

Hi,

Welcome...

Others will chime in .. be patient.

A lot depends on what specific terrain features you are trying to represent. There is a lot on this forum with regard to ways of achieving different kinds of terrain elemts, towers, swirls, caves , canyons etc.

You could, if your modelling skills are ok, generate a mesh in either Blender or Maya and import that into TG2 as a base terrain to be textured and rendered within TG2.

Heightfields can be bitmaps, do a bit of research on how bitmaps can be used as heightfields, they're normally greyscale images with white being the highest altitude and black being the lowest. Again plenty of info on this forum. You could even use Terragen Classic to "paint" a terrain, save the result as a .ter file which can be directly impoerted into TG2. You can use the Paint feature in TG2 to mask areas of a terrain for modification.

There's always more than one way to do something, it comes down to whichever method you feel most comfortable with.

Hope this at least points you in the right direction.

Rgds

Chris

cyphyr

#2
Many kinds of terrain can be produced by Terragen. A possible way forward would be to provide some links to the kind of features your interested in. Forward planning is your friend here, the more you know where you want to go (in detail) the easier and more pleasurable journey you'll have getting there.
The point you make:
Quote
but they are all very much: put this value here, that value there and do this, this, and this - without really explaining what each one is doing or why we are doing that.
is not a new issue. Many have said similar things many times before. The conclusion I have come to is that Terragen is simply a program that dose not lend itself well to tutorials/manuals etc. Their are just too many possibilities to de-construct simply.
Good luck
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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

rcallicotte

And check this out - http://forums.planetside.co.uk/index.php?board=14.0  The more you use TG2 and try to change others' files to do what you would rather see, the more you will learn.
So this is Disney World.  Can we live here?

inkydigit

Hi Stephen...you can check my post here:
http://forums.planetside.co.uk/index.php?topic=12716.0
might give you some ideas?
have fun!
Jason
:)

Oshyan

As you've found, TG2 makes it very easy to create semi-random, procedural terrains with lots of detail and variety. Getting explicit forms is a bit more of a challenge. There are several possible approaches which I'll outline (but not yet detail) below.

The first point that should be made is that the best approach to terrain building depends somewhat heavily on your final goals, what you are going to do with the terrain. More specifically, if you have little or no interest in actually rendering a terrain with Terragen and you instead intend to import it into another program to render, or use it in a realtime game engine for example, then using TG as your terrain *builder* may not actually be the best approach to take. While TG2 is a very powerful and capable terrain generator, much of the benefits it has are confined to its procedural functions, the details of which simply cannot be exported to other applications at this time (imagine billions of polygons of terrain geometry being imported into Maya).

So, if the goal for your terrain is not a TG render (at least in part), consider a dedicated heightfield modeler like World Machine, Geocontrol, Leveller, L3DT, Wilbur, etc. This means you would basically skip TG, not use it at all. It may simply not be the right tool for your needs.

Now, even if you do intend to render in TG, using 3rd party terrain modelers can still be a very good option. They provide much more extensive tools, particularly in the area of heightfield-based modeling, erosion, and explicit feature editing and generation. For example Geocontrol has very powerful combined painting/spline and procedural functions to create semi-random terrain with specific shapes. World Machine has powerful spline support for creating e.g. a mountain range, driven by procedural noise functions for natural randomness. L3DT has similar functions. Leveller and Wilbur are even more "painting"-oriented, but you can run post filters to roughen things up and make it look more natural.

If you don't want to buy these programs, can't live with the limitations of their free versions (mostly limits on terrain size), or if Wilbur (free) is not capable enough for you, or perhaps you just don't want to learn yet another tool then...

Consider hand-painting a base terrain map (or mask) in an image editor like Photoshop. You simply paint with gray-scale values, 0-255 shades of dark-to-light, with dark being "low", light being "high". This can be trickier than a dedicated heightfield modeler as heights are relative to scale once imported into TG2, and it can be challenging to actually paint more subtle altitude variations, but if you're already comfortable with an image editor it can be a good way to lay down a base terrain. Once created, you would import into TG2 and use it to drive base displacement, upon which you could add additional displacement functions for random and realistic variation. Alternatively you could paint a mask to apply to the random procedural terrain, using black for "don't show here" and white for "show full effect of procedural terrain here", and everything in-between of course. I imagine you're familiar with these concepts given what you've described above, but for the sake of being sure, I've explained a bit here. ;)

Ok, so how about working *in* TG2 to get what you want? Well, there are a couple of options, depending on just how specific you need your terrain forms to be.

You can use the built-in Painted Shader either as a mask (similar to the Photoshop painted mask) or to directly drive displacement. This is a good option for rough masking and base displacement forms, but can easily be over-used, and the Painted Shader does not currently handle large amounts of data (paint strokes) that efficiently.

Another approach, more complex still, and less explicit but still powerful, is to use function nodes and mathematics to create masks or drive displacement. This is probably the last approach I would recommend, but it's worth mentioning just as an option.

- Oshyan

Stephen

Thank you guys for all of the great replies! :D Especially Oshyan - you really hit home how much more research i need to do before i delve too much further into this rabbithole.

I have had a brief look at some of the other programs you (Oshyan) mentioned - World Machine, Genocontrol etc. - and if i cannot get the results i am looking for in Terragen i will definately look into them. I noticed in my reads that some of them have importing tools into Terragen as a .ter file* which could prove to be quite handy.

I would rather stay in Terragen** and i was hoping to do my rendering there because what i have seen you guys creating with this amazing tool is absolutely outstanding and i was hoping to get similar results  :P. It is my goal to set up not just a single scene in Terragen but create a vast landscape that will start at a specific point (where i plan on rendering my 1st animation - a small port actualy) and then grow and evolve as i add more and more detail as i explore my creation, until it eventually covers the area of, say ~100 km2 (maybe a little big - not sure about scale yet). I could then create animations anywhere in these bounds that are all in different locations but all tie together (does that make sense?)



QuoteAnother approach, more complex still, and less explicit but still powerful, is to use function nodes and mathematics to create masks or drive displacement. This is probably the last approach I would recommend, but it's worth mentioning just as an option.

???

Is this the last approach because it is complex and requires a mathematical background, or because it produces poor results for the work required, or ... ? you have me quite intrigued. I would call myself quite competent at maths - so if this is a viable option i would love to hear more  ;D - even if it is not necessarily a direct means to my specific ends it might help me understand things a bit better.



Stephen


* How much information does this type of file (.ter) hold? I realise it does probably does not include shaders and whatnot - but if it can maintain a high level of detail in the terrain then importing them after creating them from another program designed for the task might be the way to go.

** The only reason i would not like to render in Terragen is if i could not animate objects in it (something i have not looked into at all yet in Terragen). If that is the case i will probably use maya/mental ray, which will make importing terrain a bit ... iffy.. but we shall cross that bridge when it comes. The animations will not have to be terribly detailed - just objects moving and deforming to a degree (people walking and whatnot).

Oshyan

Quote from: Stephen on April 09, 2012, 09:38:22 AM
I would rather stay in Terragen** and i was hoping to do my rendering there because what i have seen you guys creating with this amazing tool is absolutely outstanding and i was hoping to get similar results  :P. It is my goal to set up not just a single scene in Terragen but create a vast landscape that will start at a specific point (where i plan on rendering my 1st animation - a small port actualy) and then grow and evolve as i add more and more detail as i explore my creation, until it eventually covers the area of, say ~100 km2 (maybe a little big - not sure about scale yet). I could then create animations anywhere in these bounds that are all in different locations but all tie together (does that make sense?)
That's definitely good info, and I agree that rendering in TG could indeed make sense for your needs, especially if you want to cover large areas, but still maintain good detail at any point.

QuoteAnother approach, more complex still, and less explicit but still powerful, is to use function nodes and mathematics to create masks or drive displacement. This is probably the last approach I would recommend, but it's worth mentioning just as an option.
Quote from: Stephen on April 09, 2012, 09:38:22 AM
Is this the last approach because it is complex and requires a mathematical background, or because it produces poor results for the work required...

Mostly because it's more complex and requires a good knowledge of math. It is, as I said, generally less outright "explicit", i.e. "put that feature exactly there" (although with enough work you can more or less do that, e.g. specify coordinates), but it does allow you to do a lot of cool things you can't otherwise do. Knowing math helps a lot, but so does knowing shader development from other systems like Renderman, Maya, etc. Regardless it is not something I would suggest tackling right off, as I think that way you miss a lot of the powerful base level functionality that's available to more quickly and easily get things you need. It's easy to end up trying to make a function network solution to things that could be done much more simply in other ways.

Quote from: Stephen on April 09, 2012, 09:38:22 AM
* How much information does this type of file (.ter) hold? I realise it does probably does not include shaders and whatnot - but if it can maintain a high level of detail in the terrain then importing them after creating them from another program designed for the task might be the way to go.

.ter holds raster terrain data and scaling info in 16bit (I believe) format. No texture, lighting, or other data is stored. It produces high quality terrains with the potential for a good amount of detail. Basically it's like many other heightfield formats, and can reproduce similar levels of detail. Heightfields are also relative to their scaling, so you can have a heightfield of 1000x1000 values (pixels), and have it cover 1000 meters square (1 meter per pixel), or 10 meters square (100 meters per pixel). This affects relative but not absolute detail, detail relative to the scene area. The amount of "detail" in the file, the amount of *information*, remains the same regardless of scaling.

Quote from: Stephen on April 09, 2012, 09:38:22 AM
** The only reason i would not like to render in Terragen is if i could not animate objects in it (something i have not looked into at all yet in Terragen). If that is the case i will probably use maya/mental ray, which will make importing terrain a bit ... iffy.. but we shall cross that bridge when it comes. The animations will not have to be terribly detailed - just objects moving and deforming to a degree (people walking and whatnot).

You cannot animate object parts/elements directly in TG, though you can animate object movement (whole object) and rotation. What you can do, however, is animate something in another app then export it as an OBJ sequence and render that in TG. Here's an example of doing that:
http://www.youtube.com/watch?v=HNf6E0GMJ1g

You can export terrain from TG in OBJ format, which most 3D apps can read, and this can be fairly detailed, but textures, not to mention atmosphere and lighting, can't really be properly exported at this time. So if TG's landscape render quality is what you're after, it would be best to aim for a workflow that kept a majority of rendering in TG. You have 2 basic options, either try to get object sequences into TG, which will be fairly successful depending on the complexity of the models and their shading. OR, try to setup a compositing workflow where you export base terrain for collision detection, shadow casting, occlusion, and other reference, then use that to setup your model animation and renders, render the object animations in your 3D app of choice, output an alpha, then render your TG scenes of the same data, and composite the images together at the end.

- Oshyan

Stephen

Thankyou for all the great info Oshyan - sorry for the late reply too, i have been out of action since Easter.

Will look into what you have suggested thoroughly and with great enthusiasm!

The animations are going to be prety basic for now, just walk cycles and maybe a few fight scenes. This should be ok for the OBJ sequence (although maybe a bit tedious for extended scenes)

Stephen

King Mango

This is a very interesting project.

Sounds like all kinds of prolems to solve!
Camera tracking. Can the camera animation solution from TGD be exported to your external modeling app? I don't know, but a search should yield the answer maybe even before Osh responds! So if the answer is Yes? Great! We simply render the animation sequence in TG, then create a set of images from a representative location to be used as an IBL in our modeling app for this camera shot. Set those images up using cube2cross or something similar and convert it to an HDR using HDRShop.
Export the terrain from TGD as a LWO or OBJ I can't remember which it uses, import that to your modeling app. Use it simply to block out your custom assets and set up your animation tracks. In Maya which I use, there is a shader called a background shader which is essentially a transparent material that catches shadows along the contours of whatever geometry it's assigned to. If you assign this to your terrain, it will not really render the terrain, but your objects will cast a shadow as if they are on the terrain which will then enable them to be comped in with the animating objects. I'm sure all the other packages have a similar functioning shader, I just wouldn't know what they are called.
Now you just need another expensive piece of software like Shake. Which I've heard was scheduled to be available for PC at some point though I don't know if that ever happened. Perhaps Adobe After Effects could also work, I have never done an animation comp, simply still comps with render layers that I put together in PS. I surely would not want to have to do that frame by frame, though a batch action might be worth a try.

If the answer is "no we can't export camera tracks..." then ouch, how do we overcome that... Well you could consider a matchmoving solution which I've never used, or you can think about how involved you need the camera work to be. If you can get away with static camera shots, where it's a simple pan then it would somewhat simplify manual matching. But adding in Dolly and tumble and you can start to see that rendering in one app and matching in the other it is vital to have an exact scale duplicate of the camera moves.

All in all, it's (to me anyway) a serious undertaking and I would probably start with rendering a very simple single frame of terrain in TGD for a test background. Create my IBL node with TGD, then see if I can get the terrain into Maya, and then I would simply animate a sphere moving across the scene in a straight line (with maybe a little bit of squash and stretch out of pure respect for the old time animators), then see if I ccould comp that into a convincing result.

Things to look out for in your modeling app when setting up the lighting, obviously the pitch and azimuth of the main light source(s), the HSV of the shadows, ambient occlusion of geometry and terrain features, and shadow edge fidelity. Are they sharp or soft? After that it's a matter of observation and correction to get a good result. This would be where render passes come in extremely handy. I hardly use them in my still renders. But if you need fine control of the shadow tones, AO level, diffuse abberations, specular levels... It's definitely not going to be easy. That's why there are people who make a living out of compositing and matchmoving. There is just so much to know and be experienced with to create a realistic or at least convincing enough to suspend disbelief scene, that each discipline has very few people who are good at everything. Animators, riggers, coders, modelers (which can further be broken up into environment artists and character artists), texture artists, lighting artists. It's no easy task to do it all yourself that's for sure.

But there's no substitute for motivation either so try that single frame terrain render with a moving object to see what you can come up with. That's what I would do first. I expect to see something by the weekend. ;) j/k

penboack

One approach would be to create the terrain in Terragen, export it to Maya, create the camera animation in Maya, export the camera animation from Maya to Terragen. You then render the action animation in Maya and scenery in Terragen and put the resulting image sequences together in a compositing program.

For information on exporting terrains from Terragen to Maya have a look at the following link. http://vimeo.com/13943941

The advantage of using this approach is that it gives shorter rendering times in both applications and great flexibility.

shadowphile

Good advice from all above, have wished for similar info in the past.
Stephen sounds like a physicist.  I too am one of those not inspired by an empirical tweak-and-render loop.  I need rules and laws!  But it's true, the organic nature of the subject that TG does so well is based on a huge amount of interactive variables that can be quite difficult to untangle into predictability.

Stephen, have you seen the 'Garden' video that came out the same time as 2.4?  It has that 'drift around a huge terrain but with close-up detail' you mention aiming for, although I don't recall animations.
Also, could you describe a bit more the target result you are doing?  Is the animation for a game, or a tv ad?  Will it be combine with anything else or is it a standalone animation?  What is the range of scales you are interested in, ie zoom from 10,000 feet down to leaf or a more static scale such as in the Garden video?

I like King Mango's entire post, but the suggestion of match-moving (camera-tracking?) is new to me because until recently it was not in Blender.  Now that Blender has useful capabilities in that manner it might be easy to just import the full TG animation and camera-track to that.  Although...camera-tracking fuzzy terrain might not work so well.  Drop in a population of bright red reference cubes and render a proxy video?  Import to Blender, then after the Blender work replace the background video with the cube-less original.  Geeze that sounds like so much work :P  But then, I don't work in animation career, this is all personal time for me.
And if you have characters trying to weave through trees, well, good luck!!!

Most of my other tricks are for single-location full-panoramic renders so may not be useful to a roaming camera, which is why I asked for more clarity of purpose.