Planetside Software Forums

General => Terragen Discussion => Topic started by: Rob Allen on January 29, 2007, 06:58:38 PM

Title: Generic Earth?
Post by: Rob Allen on January 29, 2007, 06:58:38 PM
The default planet in TG2 is pretty much just a ball of grey rock with a blue sky.  I've been tossing around the idea of creating a kind of "generic earth", that is a full-featured earthlike planet, complete with continents, mountain ranges, forests, biomes/climate zones, polar ice caps, cloud systems, and maybe even procedural weather systems.  By randomizing various seeds, it should be possible to use TG2 as an "earth generator", to create random terrestrial planets on the fly.  This could speed up the process of creating all kinds of planets and space scenes.  Although I'm fairly certain this should all be possible, to do it right it will take some time, and I'm still not all that experienced with TG2.  So I was wondering if perhaps someone more experienced is already working on this, has already done this, or has some tgd files that I could use as a basis to start from.  No sense in reinventing the wheel, right?
Title: Re: Generic Earth?
Post by: Will on January 29, 2007, 07:02:59 PM
well if you just want space orbital stuff you could try the planet shader and just play around with the cloud setting  but it would be neat if it had weather systems.

Regards,

Will
Title: Re: Generic Earth?
Post by: Rob Allen on January 29, 2007, 08:19:24 PM
Well the idea is to create a complete planet simulator, that could be used for any kind of render, from space scenes to landscapes.  Sort of an "all-purpose earth".  Plus it would be kinda fun to just randomly generate planets and then explore them.  And of course, certain shaders and such could be disabled for certain scenes in order to speed up render time.  But it's faster to have the scenes available and then disable them when neccessary than to hand-make a planet each time you want to start a new render series.
Title: Re: Generic Earth?
Post by: Will on January 29, 2007, 08:23:25 PM
so you mean like a more realistic version of mojoworld then that would be neat.

Regards,

Will
Title: Re: Generic Earth?
Post by: old_blaggard on January 29, 2007, 09:52:59 PM
I've talked to a few people who have played around with it.  It's very difficult and complicated, but it could be extremely useful.  I don't have time myself, but I would definitely be interested to see what you come up with.
Title: Re: Generic Earth?
Post by: Cyber-Angel on January 29, 2007, 10:14:00 PM
Rob,

I have some ideas for this but it depends how far down the road of realism you're wanting-to take this project which we can talk about in privet on PM if you like.

Some of the ideas I have would require considerable R & D and would mean going into literature outside of the CG field such as physical hydrology, physical geography, geomorphology and geochemistry, mineralogy, crystal optics, metrology and physical oceanography. In other words the research would have to be cross disciplinary in nature.

Would you be prepared in such a system to have land, water bodies and atmospheric models are interactive with one another as they are in nature? That is to say for example that waves on the ocean are produced by air pressure on the surface of that ocean causing that are of ocean to be depressed combined with the rotation of the planet creating waves.

The planet generator would need to consider the slope and angle of the ocean floor as it rises to the beach, the beach slope angel would also be of importance as would the nature of the beach its self (Shingle vs. Sand etc) as part of the model, the model would need to be aware enough of the terrain that sea cliffs and other protrusions in the surf zone would automatically produce spray (Note: that sea spray is a source of cloud condensation nuclei).

Regards to you.

Cyber-Angel  
Title: Re: Generic Earth?
Post by: Oshyan on January 29, 2007, 10:24:32 PM
C-A, I'd say your aims are probably *significantly* more ambitious than Rob's and wouldn't be possible to implement in TG2 currently. But the fundamental idea of a pre-set randomizable planet is a great one and no doubt very familiar to MojoWorld users. I'm not aware of anyone seriously tackling that sort of project and I encourage you to pursue it. You may even want to find people to work with on it, each person tackling different areas.

Fundamentally just about everything you want to do is possible, but there will be many challenges. I would suggest starting with a desert planet with no cloud systems, implement continental-scale features, mountain ranges, canyons, etc. then perhaps put some latitude variation in (ice caps, etc.). Then texture it all realistically - a very long-term task if you want to include proper locational variation.

After that you can spend time working on a complex, realistic cloud system that works from orbit and ground level (very challenging to mix the different scales properly). Once you're done with all that I think the water system may have matured to the point where you could reasonably implement planetary oceans with real underwater topology, transparency, etc.

I hope you make some headway on this. I'd love to see the results. :)

- Oshyan
Title: Re: Generic Earth?
Post by: Rob Allen on January 30, 2007, 12:17:15 AM
Maximum realism would be great but my concerns are that too complex a system could needlessly inflate render times, even though stuff could be disabled to increase render time, i don't want to create a system whereby it's neccessary to turn stuff off for every render, especially since this is to be used as a sort of foundation upon which to build.  If your foundation alone takes a day to render, imagine how bad it would be once you actually did something with it.  So, there is a threshold.  That said, I don't really know exactly where that threshold would be, and it would be different for different users and different machine specs.

I would want something relatively simplistic, but also capable of simulating complex realistic nature systems acceptably enough to make it universally useful.  Impossible?  Not sure yet.  I think we can get pretty close though.

The way I intended to approach this is to start with the bare essentials.  Implement the most basic system as a goal, and do it really well, such as the hydrosphere, and then call that a version.  Then, the next version includes continents, and so forth.  I think it might be really interesting to do this as a community project.  If someone out there is really good at making a full-planet hydrosphere, then they should do that and submit it.  If someone can do really realistic continents, then they do that, and so forth.  As long as the contributors work with the understanding of keeping render times manageable, and there is someone to oversee the entire project, it could probably be done quite rapidly and the results would be quite good.

The big problem with any project like that is management.  When enough people are working on something, it becomes a seperate job entirely just to make sure everyone is on the same page and the work being done doesn't end up clashing with the work that needs to be done.  And so the question becomes, is a multi-contributor approach neccessary?

This is why I started the thread in the first place; to see if anyone else had already done some work of thier own that could help.  But there is definately room for discussion, and I am starting to see that this is a project worth doing, which will help to motivate me.
Title: Re: Generic Earth?
Post by: JimB on January 30, 2007, 04:56:42 AM
Instead of looking at Mojo only, there is a 2D plugin for Photoshop that creates planets called Lunar Cell, including Earthlike ones, seen from space but entirely procedural and very detailed for closeups.
http://www.flamingpear.com/lunarcell.html (http://www.flamingpear.com/lunarcell.html)
http://www.flamingpear.com/products.html (http://www.flamingpear.com/products.html)

As a 2D solution it's very good indeed, and I suspect the interface and modus operandi might be useful to look at.
Title: Re: Generic Earth?
Post by: Will on January 30, 2007, 05:23:09 AM
jimb thats pretty neat find there.

Regards,

Will
Title: Re: Generic Earth?
Post by: MeltingIce on January 30, 2007, 11:27:30 AM
Quote from: JimB on January 30, 2007, 04:56:42 AM
Instead of looking at Mojo only, there is a 2D plugin for Photoshop that creates planets called Lunar Cell, including Earthlike ones, seen from space but entirely procedural and very detailed for closeups.
http://www.flamingpear.com/lunarcell.html (http://www.flamingpear.com/lunarcell.html)
http://www.flamingpear.com/products.html (http://www.flamingpear.com/products.html)

As a 2D solution it's very good indeed, and I suspect the interface and modus operandi might be useful to look at.
I love Lunar Cell, its how I made orbiting planets for TG 0.9 renders  :P
Title: Re: Generic Earth?
Post by: Jane on January 30, 2007, 12:41:28 PM
Ive been using Lunar Cell for a while too, I make the planet, then put it into my TG image.
(I love FlamingPear products.)
I am not too good at this yet, but it works.  I would imagine some of you experts here really could do some amazing images with LunarCell.
Jane
Title: Re: Generic Earth?
Post by: edlo on January 30, 2007, 03:59:35 PM
A "generic earth" from space its  very easy to achieve with the fantastic planet surface shader and a global weather system can be obtained using global weather infrared satellite images and apply those as distribution.
Now a planet that emulates even medium detail to earth its extremely difficult and the power needed for this just to populate several billion trees and plants its out of our hands.
Now to emulate the vast diversity of geological formations, I think that the best way to do it its by collecting and importing all of earth surface with DEM ´S; but again cpu power required will be to great.
What I think its attainable its building up a procedural network that more or less behaves as earth and presents different features according to geographical location. For this we need a wizard that handles the node network as well as his/her own hands. :P
Title: Re: Generic Earth?
Post by: Rob Allen on January 31, 2007, 01:18:02 AM
An interesting idea might be to see if TG2 can use a link as an image source for a shader.  Link directly to one of the infrared satellite images, and the planet's clouds will update in real-time with Earth (theoretically).  I have used Lunarcell quite extensively and use Solarcell for the sun effects as post-processing of my renders.  I like to have the "spikes" coming off my suns, plus I use Glitterato to generate starfields for backgrounds (now that I know how to do this).

What I would consider as a goal for this project is to create a kind of TG2 Lunarcell.  That is, capable of creating realistic-looking detailed planets with modifiable parameters, so they look good from orbit, but with TG2's ability to go down to the planet and generate equally realistic landscape scenes.  To accomplish this while maintaining a respectable usage of CPU resources and a decent target render time would be the ultimate goal.  Difficult yes, but I think with some skill and a little "thinking outside the box", it should be possible.

My rendering computer is working on a particularly long render at the moment so I'm not going to start on this project until it is done.  It has been rendering for about a day now and looks like it may still have another day or two to go.  Just to reassure everyone, this is NOT what I consider to be an ideal render time.  The scene in question is particularly experimental, but I think the end result will be worth the time.  My target render time for the generic earth would ultimately be less than 30 minutes on a high-end machine, with all details/shaders turned on.  I'd like for it to weigh in at around 15 minutes, but I'm not sure that will be possible, and I can't promise 30 minutes either.  Until I get some progress on it, every estimate I make is going to be a ballpark figure.
Title: Re: Generic Earth?
Post by: swiftstream on January 31, 2007, 04:29:17 AM
Populating billions of plants is, as somebody pointed out, unreasonable. However, it may be possible to make clever use of the distance shader to avoid this, and only populate plants when the camera is close to the ground, and only in the area near the camera.

Obviously, if you had a camera a very long way away with a very very high zoom, this effect would break down. But the distance shader could be manually modified for this situation.

This is one case where the ability to alter any parameter of any shader with scalar nodes, ala World Machine, would work wonders. Even better if you could access the value of any parameter, which IIRC World Machine does not do. Then you could get the size of an object, and use a distance shader to calculate the angular size of each object, from which, with the camera zoom parameter and the image size, you could calculate how large the object will be in pixels. Then you create a shader based on this which is white where the size is above a certain threshold and black below, which is then used as a distribution shader for the population, so you only have objects where they are large enough to be seen. Every else where the object would be can be replaced with an appropriate surface layer.
Title: Re: Generic Earth?
Post by: Rob Allen on February 01, 2007, 01:24:43 AM
I was thinking of trying to see if it would be possible to use a fake stones shader to do distant trees.  The trick would be getting the distance shader to blend smoothly between the fake trees and real trees.  Alternatively, I was thinking about using tree sprites for distant trees, though this could be a problem from steep angles.  Essentially what we are talking about here is the creation of a LoD (Level of Detail) scheme, and there has been alot of research and development in this field within the video gaming industry.
Title: Re: Generic Earth?
Post by: old_blaggard on February 01, 2007, 09:01:13 AM
Interesting idea.  So you mean just applying a sort of conditional to the object: if object size > x, then render the object, otherwise use a similar-loooking surface layer.  We've already got conditional functions built into TG2, I guess all we need is something to detect the size of an object.
Title: Re: Generic Earth?
Post by: Dark Fire on February 01, 2007, 02:46:41 PM
Quote from: Rob Allen on February 01, 2007, 01:24:43 AM
Essentially what we are talking about here is the creation of a LoD (Level of Detail) scheme, and there has been alot of research and development in this field within the video gaming industry.
An LoD scheme would be very useful for speeding up render times, and should be built into Terragen.
Title: Re: Generic Earth?
Post by: Will on February 01, 2007, 04:55:22 PM
yea I level of detail system would be nice but it would to be implmented in such a way that it would have the ablity to be toggeled on and off.

Regards,

Will
Title: Re: Generic Earth?
Post by: §ardine on February 01, 2007, 07:12:25 PM
Quote from: Dark Fire on February 01, 2007, 02:46:41 PM
Quote from: Rob Allen on February 01, 2007, 01:24:43 AM
Essentially what we are talking about here is the creation of a LoD (Level of Detail) scheme, and there has been alot of research and development in this field within the video gaming industry.
An LoD scheme would be very useful for speeding up render times, and should be built into Terragen.

I believe Oshyan said something about this before.
Something like, LoD is already implemented to a very limited degree and perhaps it will be improved upon in the future...

Along the lines of what Rob Allen was saying though, It's fairly easy to create a simple tree sprite that would even look good from steep angles. The trick still would be in getting the switch between the two to be unnoticeable.  :-\
Title: Re: Generic Earth?
Post by: Oshyan on February 01, 2007, 10:31:51 PM
Just a note to say that rendering planetary shots is actually much faster in most cases than rendering from the ground. So even a highly detailed planet would probably render at decent speed from orbit. When you got down to the surface it might be a different story though.

- Oshyan
Title: Re: Generic Earth?
Post by: BPauba on February 01, 2007, 11:49:08 PM
Quote from: Oshyan on February 01, 2007, 10:31:51 PM
Just a note to say that rendering planetary shots is actually much faster in most cases than rendering from the ground. So even a highly detailed planet would probably render at decent speed from orbit. When you got down to the surface it might be a different story though.

- Oshyan
Tis very good to know. I have noticed that a bit with some of my test renders. :D.

Oh, and I am interested in this idea. Especially the terrain aspect of it. I really have been doing alot of experimentation with the terrain nodes and functional nodes. I wish I had somebody that was as interested in the terrain nodes as I am, so I could collaberate with them in learning!
Title: Re: Generic Earth?
Post by: Rob Allen on February 05, 2007, 02:48:23 AM
Progress Report #1:  I've started on the Generic Earth Project.  I've implemented the ocean sphere, and it was looking good until I hit some kind of weird issue where now TG2 quits to desktop at some point during a full render.  I'm not sure what caused it, since about the only thing I've really changed since putting the ocean in is the position of the camera.  I managed to get a surface shot at about 700m altitude, an underwater shot, and a low-orbital shot, and now it crashes on every render.

I won't post the pics unless someone requests it.  I mean, really, it's just a big ball of water.  Once I get this issue worked out, I will start on the landmasses.
Title: Re: Generic Earth?
Post by: Will on February 05, 2007, 03:26:04 PM
excelent keep it up.

Regards,

Will
Title: Re: Generic Earth?
Post by: buchvecny on February 05, 2007, 03:36:29 PM
lunar cell sucks... make your own planets its not that hard (:
Title: Re: Generic Earth?
Post by: Volker Harun on February 05, 2007, 05:30:40 PM
The first thing that came into my mind was building continents with thei climatic system.

1. There should be a climate effect concerning the latitude
2. The distance from coast should have another effect to the climate.
3. Thus a function could be built by latitude and distance from coast - (northpole=anywhere snow and ice; Europe could have snow above 1000m in the middle of the continent; getting nearer to equator will show snow only at 3000+ meters)
4. Different types of erosion depending on height and distance from coast (fluvial and rainerosion)
5. Inserting desert-zones by a fractal shader.

Just my 5 pence

Volker
Title: Re: Generic Earth?
Post by: Sethren on February 05, 2007, 06:34:57 PM
It does suck and i tried to contact the developer with some ideas that i had for the plug in. This was long before Terragen 2 as i was just making planets in Photoshop at the time. Seems like it is a 1 man operation and development is slower then molasses at Flaming Pear. Actually in my honest opinion making planets is hard, very hard. I mean when you are taking about good continent shapes and proper poles, isolating long mountain chains were they should be, creating different types of climates, if one wants realism for the sake of making earth-like worlds then there is a lot involved there. I have been studying geology for a long time now and i still can not get it down. Perhaps if there was a feature inside Terragen 2 were we can paint the shaders over the planet-size sphere then it would be easy to have specific elements of a planet's features were we would want them to be rather then second guessing for days on end using the current system of setting up shaders over an entire planet.
Title: Re: Generic Earth?
Post by: Rob Allen on February 07, 2007, 02:51:52 AM
Progress Report #2:  Getting the ocean trenches and seabed shaders just right took some time, but adding the continents on top of that took even longer.  Getting them all to work together to the proper effect was a bit of an excersize, but I eventually got it working.  I've got basically realistic shaped continents, though they are very simplistic at this stage.  I've also begun implementing the biome system.  Unfortunately, there does not seem to be any easy way to determine latitude, or if there is I haven't found it yet.  Therefore, the current biome system is very simplified.  Beaches are generated at coastlines, with forests being randomly scattered around the planet up to a treeline altitude.  Deserts and plains appear in randomized patches for the most part, and mountains occupy the higher altitudes with glaciers at the highest.  Therefore, the "poles" right now are at the center of the continents.  Not quite realistic, but it's still very much a work in progress.  I've just recently added a basic mountain generator, which creates denser, higher mountains in ares with higher base altitudes (hills with occasional outcroppings on coastlines, and craggy cliffs in the glaciers).

I'll get some pics from the render machine and post them here soon.
Title: Re: Generic Earth?
Post by: king_tiger_666 on February 07, 2007, 05:28:31 AM
Quote from: Voulge on February 05, 2007, 05:30:40 PM
The first thing that came into my mind was building continents with thei climatic system.

1. There should be a climate effect concerning the latitude
2. The distance from coast should have another effect to the climate.
3. Thus a function could be built by latitude and distance from coast - (northpole=anywhere snow and ice; Europe could have snow above 1000m in the middle of the continent; getting nearer to equator will show snow only at 3000+ meters)
4. Different types of erosion depending on height and distance from coast (fluvial and rainerosion)
5. Inserting desert-zones by a fractal shader.

Just my 5 pence

Volker

good points... I like the part about different types of erosion. but i suspect this would need to be fairly lengthy which the various types of erosion.. one i would like to see if glacial erosion functions if that were possible......

also sethren... I can see where you come from with a geology background....
Title: Re: Generic Earth?
Post by: Will on February 07, 2007, 05:53:47 AM
Great job rob! I can't wait to see how this al turns out.

Regards,
Will
Title: Re: Generic Earth?
Post by: old_blaggard on February 07, 2007, 09:33:17 AM
It looks like this is really coming along.  Could you possibly do a couple of test renders at some point and post them for us to see?
Title: Re: Generic Earth?
Post by: Rob Allen on February 08, 2007, 01:51:44 PM
Yeah, was getting around to it but kept getting side-tracked.  Here are some test renders.  Note the exaggerated coloring, which I was using to determine biome distribution easily from orbital views.

After taking some time off from working on this, and thinking about it from a distance, so to speak, I think that my current approach may not be the best.  The altitudes are becoming difficult to manage and rather unrealistic, and several other factors are becoming too random to be manageable.  I have decided to apply my experience with this version to a new, more simplified version.  This should be more efficient and produce better results.

But here are the test renders from v0.1401:
Title: Re: Generic Earth?
Post by: dhavalmistry on February 08, 2007, 02:05:56 PM
nice ocean reflection...would you mind tell me (us) how to get it please??...
Title: Re: Generic Earth?
Post by: Rob Allen on February 08, 2007, 03:54:24 PM
Nothing special, that's the default TG2 water shader.  Just use a water shader as your surface and there you go.  What I did exactly was create a sphere with the same center coordinates and radius as the planet, and gave it a water shader.  Pretty simple, but I'll have to think of another way when I get to the point where I need to put in rivers as they are above sealevel.

BTW, something fun to do with water shaders: try applying a green one to a fake stones shader.  Attack of the blobs!
Title: Re: Generic Earth?
Post by: BPauba on February 08, 2007, 11:23:20 PM
I am impressed with the macroshapped terrain. I was expecting a less realistic looking coastline and oddly shapped continents... Cool stuff :D
Title: Re: Generic Earth?
Post by: Rob Allen on February 09, 2007, 12:14:12 PM
Ok, been playing around with the new simplified system and it works much better.  I still have alot to do, like re-implementing the biome maps, but here are some shots showing the new continent shapes:

Title: Re: Generic Earth?
Post by: Will on February 09, 2007, 02:50:07 PM
neat, I can't wait to see where this will go. it already look very useful.

Regards,

Will
Title: Re: Generic Earth?
Post by: Rob Allen on February 09, 2007, 03:24:13 PM
The project is growing into something interesting already.  I've gotten some interesting inspiration from it and have decided to call it "Terracell", with the intent of creating something like Flaming Pear's Lunarcell, but far more powerful via Terragen 2.  The name Terracell is a combination of Terragen and Lunarcell.

I just love it when a project I'm working on takes on a life of its own...  heh.  I'll start a new thread for Terracell and link to it here.

http://forums.planetside.co.uk/index.php?topic=754.msg6501#msg6501
Title: Re: Generic Earth?
Post by: monks on February 10, 2007, 07:27:19 AM
Interesting stuff!

Sethren said:

QuotePerhaps if there was a feature inside Terragen 2 were we can paint the shaders over the planet-size sphere then it would be easy to have specific elements of a planet's features were we would want them to be rather then second guessing for days on end using the current system of setting up shaders over an entire planet.

Hey Sethren, I had the same idea a while back.  :) Apparently Joe Slayton implemented an inverse projection (which is what you need to paint on curved surfaces- I can't remember the exact details of the conversation offhand) in Fractal Terrains (Pro Fantasy). It really is a very nifty program -before its time I suspect.
Yes, that was it- the inverse projection would project back from the sphere to a flat plane.

Another idea is to wrap an image shader around a a planet but I seem to remember that this eventually leads to the requirement of painting on a sphere because you still have to be Holbein to reproject while painting! Joe did release a prog that reprojects an image so that it shows you what you have to draw in 2D in order for it to look like that  on a sphere...tricky but doable  :D

monks
Title: Re: Generic Earth?
Post by: Rob Allen on February 10, 2007, 02:59:08 PM
With Terracell, the planet will be made up of a number of shaders each of which you enable/disable, and use your own imagemaps in thier place.  There is a global topography shader which is responsible for the shapes of the continents, oceans, and islands, and a mountain shader which will give the continents depth with hills, valleys and peaks, as well as providing coastal islands, archipelagos, and ocean trenches.  Seperately there will be biome maps which will distribute biomes across the planet according to altitude and randomness.  The biomes are more than just coloring.  They will determine where things like grass fields, wheat fields, bushes, trees, cacti, quartz veins, etc, will appear on the terrain.  One of the important elements of the biome distribution system will be finding a way to determine latitude so that climate zones can modify biome distribution.  An arctic desert would become a tundra, whereas a tropical forest would become jungle, and so on.  If anyone has any ideas about how to create a latitude system, it would be much appreciated.
Title: Re: Generic Earth?
Post by: Oshyan on February 12, 2007, 01:24:16 AM
Hi Rob, looks like you're already getting some great continent shapes and whatnot. Simple but very effective, as it should be.

Although there is no real "latitude" system at present, fortunately there *is* a working alternative. Simply turn on "Use Y for slope" in a Surface Layer under the Slope Constraints tab, then adjust min and/or max slope to get the distribution you want. Very easy to create polar zones, etc. this way.

- Oshyan
Title: Re: Generic Earth?
Post by: Rob Allen on February 14, 2007, 03:58:47 PM
Aha, very clever!  Thanks for that tip.  I'll try it out once I start working on biome distribution.  Getting the mid and low level terrain sculpting to work in synch with the continent-level is a bit time consuming, but proving to be a very interesting excersize.