Planetside Software Forums

General => Terragen Discussion => Topic started by: Oshyan on June 20, 2009, 04:10:03 AM

Title: 4.7 trillion triangles rendered
Post by: Oshyan on June 20, 2009, 04:10:03 AM
I thought I'd do a few tests to try and find the limits of what TG2 can currently do as far as populations go. I'm pretty sure I could go even further than this, judging by the memory footprint, but here's what I achieved so far:

Here are the scene details:
Earth-sized (default) planet
Extreme (15,000 meters) displacement terrain
Object: Shagbark Hickory, 280,000 tris
16,777,000 trees
4.7 trillion tris total
6min 15sec to populate (not included in render times)
1000+km view distance
Detail 1, AA6, GI 2/2, Very High Pop Detail
Peak memory usage when rendering: 3.1GB

Computer System:
Core 2 Quad Q6600
2.4Ghz x 4 cores
8GB DDR2
Windows 7 RC1 (build 7100)

[attachthumb=1]
Full render - 2hrs 4mins

[attachthumb=2]
Without atmosphere - 48mins 6secs

[attachthumb=3]
Without objects (terrain only) - 5mins

[attachthumb=4]
Without terrain (flat planet, for reference) - 4mins 19secs

[attachthumb=5]
3D preview with instance previews enabled!

Notice how little difference there is between the render with and without terrain displacement. TG2 is quite efficient at rendering large amounts of complex displacements. Clearly atmospherics are far more demanding, and hopefully there is more room to optimize there.

Interestingly I actually rendered in 2.0.1.1 initially - the first TG2 final release available. Render times in that version were 3 hours, 30 minutes! Nearly an hour and a half longer. As many of you know we were able to make a significant optimization after release, and there was much discussion about that around that time. It's interesting to see this particular example of it though. It applies very specifically to the atmosphere as the render time without atmosphere was very similar. The rendered result looked very similar visually, with just some slight changes in grain.

Anyway I thought some of you might get a kick out of how far I was able to take this. Maybe I'll make this into an actual, interesting scene at some point...

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: FrankB on June 20, 2009, 05:02:36 AM
That is all very interesting, Oshyan.
Do you really think that so many polys were actually calculated? I doubt it, otherwise TG2 could not be very efficient.
For example, if the tree object has 280k polys, when rendered from 1000km away, there's only a subpixel of it left to see. Tg2 must be simplifying/sampling the geometry of the trees for distant instances - a lot.
We know this from populated scenes in general: objects far away are almost spitted at the screen in one shot, whereas the instances close to the camera take a notable while to complete.
What these numbers tell me, though, is that the instancing algorithm(s) is pretty memory effective!

Regards,
Frank
Title: Re: 4.7 trillion triangles rendered
Post by: Goms on June 20, 2009, 05:43:39 AM
It would be great, if the Render with the Objects would take as long as the one without. ;)
Maybe TG2 could notice, that the Object is very small and, lets say, replace it somehow?
when its far away, a tube with a sphere could be enough for a tree, if anyone understands what i mean.
anyway.
Title: Re: 4.7 trillion triangles rendered
Post by: Tangled-Universe on June 20, 2009, 06:29:25 AM
Quote from: Goms on June 20, 2009, 05:43:39 AM
It would be great, if the Render with the Objects would take as long as the one without. ;)
Maybe TG2 could notice, that the Object is very small and, lets say, replace it somehow?
when its far away, a tube with a sphere could be enough for a tree, if anyone understands what i mean.
anyway.

Well this is more or less what Frank is saying. It seems that TG2 adjusts the level of detail over distance and thus more or less simplifies the object to make it render faster but still representative. Like Frank I hardly believe TG2 actually renders all those triangles.
Title: Re: 4.7 trillion triangles rendered
Post by: domdib on June 20, 2009, 10:12:59 AM
No matter the technical details, I think the final one is a pretty cool render  :)
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on June 20, 2009, 03:12:07 PM
Yes, of course you are correct Frank. Perhaps the title is misleading. *However*, this is exactly the same way everyone in the industry refers to their scenes. People often quote the billions of polygons they're rendering and others are just as often impressed by it. I thought I'd join the party. ;) But pretty much all renderers "cheat" to make this work.

TG2 and pretty much any other modern renderer does a lot of "simplification" (for lack of a better word) to render large amounts of data accurately, without actually "rendering" everything that the scene consists of. This is true not just of imported object geometry though, it's also true of terrain. Terrain displacement is computed as micropolygons, essentially for a consistent screen-space resolution. If I'm animating a scene, something that is in the foreground of my scene may effectively have "10,000 micropolygons per meter" in the scene scale, while the background has only "10 micropolygons per meter". But if I fly up to the mountain in the background and view it at close range, it too will then be calculated with effectively more micropolygons per meter. This is all a gross simplification, but hopefully you get the idea.

I just thought it was interesting to see just how efficient the optimization processes are. Evidently pretty efficient. :)

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: Mohawk20 on June 20, 2009, 04:40:09 PM
You are a madman for trying!
I like that  :P

I have been known to do similar experiments, but as my pc is at the lower end of the 'newness' spectrum by now, it's not that good a tool, as 3Gb of ram total leaves just 2Gb for rendering.
Title: Re: 4.7 trillion triangles rendered
Post by: rcallicotte on June 20, 2009, 11:19:46 PM
Terragen 2 has quite a renderer, Oshyan.  I'm glad you're showing us what it can do.  Now...on to animation...   ;D
Title: Re: 4.7 trillion triangles rendered
Post by: Jack on June 21, 2009, 12:52:20 AM
thats pretty cool!!! I have noticed hoe much terragen has speeded up I rarely get a render that takes over 5 hours these days ;D
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on June 21, 2009, 02:34:06 AM
I'll see about an animation. The detail on this one was probably higher than you'd need for an animation (detail 1), although AA would need to be increased for proper motion blur. An animation starting at this altitude and diving down into the trees would be cool...

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: neuspadrin on June 21, 2009, 09:36:09 AM
Quote from: wetbanana on June 21, 2009, 12:52:20 AM
thats pretty cool!!! I have noticed hoe much terragen has speeded up I rarely get a render that takes over 5 hours these days ;D

I think its a mix of learning how to use render quality settings to what they should be at, and Terragen getting faster as a renderer.  As I know as I go I learn more tricks to keep quality up but render time down.
Title: Re: 4.7 trillion triangles rendered
Post by: Mandrake on June 21, 2009, 05:04:00 PM
This is instancing with this render correct? I don't think you calculate polys with true instancing the same as counting millions of separate tree models.
Title: Re: 4.7 trillion triangles rendered
Post by: Jack on June 21, 2009, 08:14:21 PM
how many polygons is 4.7 trillion triangles?
Title: Re: 4.7 trillion triangles rendered
Post by: Mandrake on June 21, 2009, 08:24:05 PM
two triangles will melt to one quad
Title: Re: 4.7 trillion triangles rendered
Post by: Matt on June 21, 2009, 09:48:15 PM
A triangle is a polygon, just a 3-sided polygon.

Some objects might consist of quadrilaterals or polygons with even more sides, which would be converted into multiple triangles. So the original object might consist of a lower number of polygons than triangles, but it depends on the object. Many objects are made mostly of triangles anyway.

Matt
Title: Re: 4.7 trillion triangles rendered
Post by: Matt on June 21, 2009, 09:58:56 PM
Quote from: Mandrake on June 21, 2009, 05:04:00 PM
This is instancing with this render correct? I don't think you calculate polys with true instancing the same as counting millions of separate tree models.

That's true, in terms of memory use. People often quote the numbers that way though.
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on June 22, 2009, 12:56:07 AM
You guys are way tougher than the Vue crowd. :D

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: FrankB on June 22, 2009, 03:00:51 AM
Yeah, but we're still amazed regardless. ;D

To me, the ability to simplify complexity without loosing realism in the process is the true art and magic of the renderer. I see it this way: there are 4.8 trillion triangles in the scene, but the renderer manages this complexity, so that the entire image is ready and rendered in just about an hour.
So in a sense, it's probably ok to say "4.7 trillion triangles rendered".

Cheers,
Frank

Title: Re: 4.7 trillion triangles rendered
Post by: Jack on June 22, 2009, 03:53:58 AM
um I dont know any other program that can handle nearly 5 trillion polygons without crashing im amazed but not surprised ;D I have always noticed teragen handles complex objects like no other app its like they arent even their!!!
lolz it funny when vue users brag about 60 billion polygons but come on 4.7 trillion polygons they don't even come close haha!
Title: Re: 4.7 trillion triangles rendered
Post by: Hetzen on June 22, 2009, 04:13:25 AM
It's the initial size of this app that amazes me. 5mb!

But where I think this program really shines, is in it's ability to add displacment detail that nothing else I've seen comes close to.
Title: Re: 4.7 trillion triangles rendered
Post by: FrankB on June 22, 2009, 04:30:35 AM
Quote from: Hetzen on June 22, 2009, 04:13:25 AM
It's the initial size of this app that amazes me. 5mb!

But where I think this program really shines, is in it's ability to add displacment detail that nothing else I've seen comes close to.

fully agree!
Title: Re: 4.7 trillion triangles rendered
Post by: dandelO on June 22, 2009, 04:54:46 PM
If I load a larger object in Vue/Carrara/etc, and this is likely also because of the limitations of my pc, I often get maybe a minute's hang-time before the program will begin to respond again, if it does at all and I don't have to kill the task and put it down to experience.
Depending on the size and complexity of the model.

Terragen just laughs at all of my models, loads them with a speed that no other 3D app' can match, and then just looks at me with a smile that asks for more! 'Is that all you got, Mr. delO? Ha! I'm already preview rendering!'

;)

EDIT: *** That is, unless it's Mandrake's Camaro, my TG doesn't like that one! Sorry, Kenny. :(
Title: Re: 4.7 trillion triangles rendered
Post by: Mandrake on June 22, 2009, 05:25:49 PM
Yep, I think the AT-AT-WALKER will hit the upper limit also.
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on June 22, 2009, 11:21:09 PM
Ah, so next is time to try with some really high poly models. Anyone have a source of something good in OBJ format? I remember the Michelangelo Scanning Project that scanned his statue of David at something like 56 million triangles, but I recall that had some annoying application process to use the data. Something comparable perhaps? I know, I know, instancing is far different from a single high poly model. But I'm in the mood to test boundaries... ;D

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: j meyer on June 23, 2009, 10:17:53 AM
Hi,
the model with the highest polycount i've tested (as of yet) was 2.4million
quads ->no problems.
Most likely you won't find really high poly objs on the net ,'cause the files would
be rather huge,i'm afraid.For example:had a ZBrush generated obj (no normals)
of ca. 33 mb,no textures,took it to another app to get the normals and it was
approx. 130 mb then --- and that was a rather low poly model.So maybe you can
imagine what kind of file sizes you'd get with high poly models with normals and
textures.
Title: Re: 4.7 trillion triangles rendered
Post by: Tangled-Universe on June 23, 2009, 05:46:23 PM
Quote from: Oshyan on June 22, 2009, 11:21:09 PM
Ah, so next is time to try with some really high poly models. Anyone have a source of something good in OBJ format? I remember the Michelangelo Scanning Project that scanned his statue of David at something like 56 million triangles, but I recall that had some annoying application process to use the data. Something comparable perhaps? I know, I know, instancing is far different from a single high poly model. But I'm in the mood to test boundaries... ;D

- Oshyan

I have a ~2 million poly pine tree-model, but it has no textures yet. Not really comparable to 56 million polys but at least it's a tree :)
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on June 23, 2009, 11:27:56 PM
2 million? Pah! I'm not impressed. ;)

Ah, I have an idea: Arbaro. ;D

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: Jack on June 24, 2009, 02:50:37 PM
what about that rock generator thing inst that supposed to create ridiculous size polygon meshes
Title: Re: 4.7 trillion triangles rendered
Post by: neon22 on June 28, 2009, 01:16:37 AM
Try here:
http://www-graphics.stanford.edu/data/3Dscanrep/
Thai statue is 38,800,000 triangles (but only 10,000,000 on the site - need to request the big guy....)
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on June 28, 2009, 01:57:20 AM
Yeah, that's the stuff I was remembering, thanks. Still need to request the big one though. Hmm...

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: Henry Blewer on June 28, 2009, 09:00:32 AM
I have a question about objects. I read that Terragen 2 uses triangles for it's polygons. Is this true? It would be helpful to create objects using triangles instead having the converter do it. Better accuracy.
Title: Re: 4.7 trillion triangles rendered
Post by: Mandrake on July 05, 2009, 11:46:19 AM
Quote from: Oshyan on June 23, 2009, 11:27:56 PM
2 million? Pah! I'm not impressed. ;)

Ah, I have an idea: Arbaro. ;D

- Oshyan
My Walker is up to 2042136 polys so far, but it will also depend on how many 1024x 2048x.... etc. textures maps your going to load with that too!
A two million poly model could fail over a 4 million poly model if the textures get out of hand. So I guess you need a new formula poly + Tex= total load on tg2
Kenny
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on July 08, 2009, 11:53:15 PM
True enough. It's all in the various combinations of details, settings, etc. anyway. I'm more interested in finding the specific limits in different areas, e.g. I might test (again) the max image size with some of that Blue Marble data, but do that separately from pure geometry.

Btw, now I'm playing with animating the 4.7 trillion tris, hehe. Looks like about 20 minutes per frame at 720x480... on my new Core i7. ;D

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: jo on July 09, 2009, 02:15:09 AM
Hi Oshyan,

Quote from: Oshyan on July 08, 2009, 11:53:15 PM
Btw, now I'm playing with animating the 4.7 trillion tris, hehe. Looks like about 20 minutes per frame at 720x480... on my new Core i7. ;D

Just wait until my 8 core Xeon Nehalem shows up ;-).

Regards,

Jo
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on July 09, 2009, 03:09:27 AM
Quote from: jo on July 09, 2009, 02:15:09 AM
Hi Oshyan,

Quote from: Oshyan on July 08, 2009, 11:53:15 PM
Btw, now I'm playing with animating the 4.7 trillion tris, hehe. Looks like about 20 minutes per frame at 720x480... on my new Core i7. ;D

Just wait until my 8 core Xeon Nehalem shows up ;-).

Regards,

Jo
You mean after you bring Mac performance up to parity with Windows? ;)

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: jo on July 09, 2009, 05:26:32 AM
Hi Oshyan,

Quote from: Oshyan on July 09, 2009, 03:09:27 AM
You mean after you bring Mac performance up to parity with Windows? ;)

The sampler and I will get to know each other well :-). I bet I already know why it's slower though, but we'll see, we'll see...

Regards,

Jo
Title: Re: 4.7 trillion triangles rendered
Post by: Mandrake on July 09, 2009, 06:54:20 AM
Quote from: Oshyan on July 08, 2009, 11:53:15 PM
on my new Core i7. ;D

- Oshyan

Bark at the moon.. ;) I've been holding off and squirreling it away for the win 7 release
Maybe Jo will have TG2-64 by then poke, hint, plug,...
Title: Re: 4.7 trillion triangles rendered
Post by: Oshyan on July 09, 2009, 10:37:08 PM
A lot of retailers are giving upgrade to Win7 deals if you buy a Vista machine now...

- Oshyan
Title: Re: 4.7 trillion triangles rendered
Post by: Mandrake on July 10, 2009, 12:36:50 PM
Well, I haven't loaded a single Vista machine yet, no reason to start now ;)