Planetside Software Forums

General => Terragen Discussion => Topic started by: scott8933 on August 16, 2009, 05:08:48 PM

Title: procedural city engine, used as population
Post by: scott8933 on August 16, 2009, 05:08:48 PM
This is an ongoing project at Blender - and the results have been quite promising.

http://blenderartists.org/forum/showthread.php?t=140415

Completely lacking in any programming skills whatsoever, I'm curious - could the same principles be applied to Terragen as a population? Seems like it could work, since as far as the computer is concerned, grass or trees may as well be buildings.

Could add a whole new dimension to TG2 for doing matte paintings and the like.
Title: Re: procedural city engine, used as population
Post by: Mr_Lamppost on August 16, 2009, 08:30:31 PM
The basic answer is NO!

There are a host of posts both here and at Terragen.org (The forum formally known as Ashundar), bemoaning the lack of direct control over Terragen 2 populations.  I don't know enough about Blender scripting to be able to tell if it will ever be possible. 

Not knocking Blender, it's brilliant! impenetrable but brilliant.  Once you get past the interface the polygon modeller knocks spots off Max.   8)

Oh and thanks for the pointer to another forum that will suck my free time away.  ;D
Title: Re: procedural city engine, used as population
Post by: Volker Harun on August 17, 2009, 03:28:56 AM
Another point is, that terragen has not a primitive like the cube. So you will always have to use imported objects.
As soon as the SDK will show, how to influence terragen with plugins, it may be able to read the coordinates of the populator, or to influence them. This would be the time to contact me ,-)
Title: Re: procedural city engine, used as population
Post by: FrankB on August 17, 2009, 04:53:40 AM
Can you help yourself with a point-grid mask? So that would be a grid (easy with functions) where each square is actually just the size of a small point. If your mask color is very high (like significantly above white), wouldn't the populator place "one cube per dot", effectively making you a road with houses?
I agree though that it would be a rather complicated setup...

Frank
Title: Re: procedural city engine, used as population
Post by: goldfarb on August 17, 2009, 12:19:58 PM
that Blender link seems interesting...
but Houdini can really rock this:
http://forums.odforce.net/index.php?/topic/3156-procedural-city/
it's a long thread but there are some very cool bits in there...
also:
http://cmivfx.com/SideFX_Houdini_Training/H_cities/default.aspx

access to the population points would solve most of the issues with populations...
Title: Re: procedural city engine, used as population
Post by: Henry Blewer on August 17, 2009, 12:49:29 PM
I took a look at the fluid examples they have for Blender. I have done about fifteen so far. Here I go again... The tutorial seems to cover points that have been well covered in tutorials elsewhere, for free. The good part of this tutorial on fluid simulation, is that it appears to be complete, and it's up to date. It looks like it covers all aspects incorporated into the new fluid simulation solver.
The organic modeling tutorial looks interesting. It covers things I have not tried, so I do not know how complete it may be.
At $50.00 a piece, I don't want to spend the money. Someone with deeper pockets would probably learn some techniques.
Title: Re: procedural city engine, used as population
Post by: scott8933 on August 17, 2009, 02:19:47 PM
Quote from: Volker Harun on August 17, 2009, 03:28:56 AM
Another point is, that terragen has not a primitive like the cube. So you will always have to use imported objects.
As soon as the SDK will show, how to influence terragen with plugins, it may be able to read the coordinates of the populator, or to influence them. This would be the time to contact me ,-)

There was a tutorial a while back that showed how to generate a pyramid in TG just using functions. I actually modified it to make one of those cement drainage rivers they have that crisscross Los Angeles. Worked nicely - but the complexity of the Blender solution made me figure that translating all the necessary ingredients may be "technically" doable, but probably quite impractical.

Just figured I'd throw the Blender link out there to see if it would inspire anyone. I've heard using Blender as comparable to using a CNC machine to do your modeling. Given the 2.4 interface, I'd have to agree. Though the 2.5 generation seems to improve things quite a bit - at least from my very brief experience with it.
Title: Re: procedural city engine, used as population
Post by: Volker Harun on August 17, 2009, 02:54:03 PM
Indeed, you can use functions to create cubes. At the moment you cannot displace any faces that has a slope of 90°. Thus it would be necessary to create primitives with a slope less 90° angles ... with functions.
The distribution of the city's buildings is another task ... solvable ... but first the buidlings as a primary task.

Using the mentioned 'A function only landscape' tutorial should be the way.
Title: Re: procedural city engine, used as population
Post by: FrankB on August 17, 2009, 02:56:37 PM
Quote from: Volker Harun on August 17, 2009, 02:54:03 PM
Indeed, you can use functions to create cubes. At the moment you cannot displace any faces that has a slope of 90°. Thus it would be necessary to create primitives with a slope less 90° angles ... with functions.
The distribution of the city's buildings is another task ... solvable ... but first the buidlings as a primary task.

Using the mentioned 'A function only landscape' tutorial should be the way.

Are you sure you can't displace 90 degree walls? I would think it's just a matter of adding a compute normal with a suitable patch size *before* you apply these wall displacements...
Title: Re: procedural city engine, used as population
Post by: Hetzen on August 17, 2009, 03:00:58 PM
I've not had much success with 90o stuff, even with rediculously small patch sizes in CN or CT.
Title: Re: procedural city engine, used as population
Post by: FrankB on August 17, 2009, 03:14:12 PM
you are right, i see this now.
Title: Re: procedural city engine, used as population
Post by: goldfarb on August 17, 2009, 04:11:48 PM
Quote from: FrankB on August 17, 2009, 04:53:40 AM
Can you help yourself with a point-grid mask? So that would be a grid (easy with functions) where each square is actually just the size of a small point. If your mask color is very high (like significantly above white), wouldn't the populator place "one cube per dot", effectively making you a road with houses?
I agree though that it would be a rather complicated setup...

Frank

yeah, complicated setup
and you run into the same problem currently with populations - inability to do variations...
Title: Re: procedural city engine, used as population
Post by: FrankB on August 17, 2009, 04:15:46 PM
random variations in the grid positions are easy. Because the grid is color, you can use a warp shader to distort the grid. I've done this before. Look at the rows in the midground: http://www.nwdanet.com/images/phocagallery/frank-gallery/fields.jpg
The distortion is very mild intentionally here.
But you may have thought about something else...

Frank
Title: Re: procedural city engine, used as population
Post by: N810 on August 17, 2009, 04:23:35 PM
Silly question....
couldn't you just displace striaght up with flat piece of terrain for a building ?
Title: Re: procedural city engine, used as population
Post by: goldfarb on August 17, 2009, 04:44:50 PM
Quote from: FrankB on August 17, 2009, 04:15:46 PM
random variations in the grid positions are easy. Because the grid is color, you can use a warp shader to distort the grid. I've done this before. Look at the rows in the midground: http://www.nwdanet.com/images/phocagallery/frank-gallery/fields.jpg
The distortion is very mild intentionally here.
But you may have thought about something else...

Frank

:) sorry...I meant variations in the buildings
Title: Re: procedural city engine, used as population
Post by: Volker Harun on August 17, 2009, 04:52:28 PM
@n810 - of course possible ... in the above mentioned thread you see pictures but, with lateral displacements (windows and so on), so this functionality will not work.
This is the main reason for stopping the work on this: http://forums.planetside.co.uk/index.php?topic=5670.msg58739#msg58739
Title: Re: procedural city engine, used as population
Post by: Henry Blewer on August 17, 2009, 09:03:15 PM
The rock object might work. If it was given six sides?
Title: Re: procedural city engine, used as population
Post by: Volker Harun on August 18, 2009, 03:54:42 AM
The rock object tries to build itself up by using triangles ... else a good idea.
Title: Re: procedural city engine, used as population
Post by: N810 on August 18, 2009, 09:25:30 AM
Quote from: Volker Harun on August 17, 2009, 04:52:28 PM
@n810 - of course possible ... in the above mentioned thread you see pictures but, with lateral displacements (windows and so on), so this functionality will not work.
This is the main reason for stopping the work on this: http://forums.planetside.co.uk/index.php?topic=5670.msg58739#msg58739

Ahhhh Sory I missed this thread  the first go around.
It looked like you where making some real progress.
Could you use a couple of stationary careras to project windows
on the sides of the buildings, (cameras horizontal and perpendictular to each outher).
Title: Re: procedural city engine, used as population
Post by: Volker Harun on August 20, 2009, 04:23:42 PM
I have not tried it, as I am not a modeller.
Else we run into the same problem again ... placing objects ... many objects in an ordered population.

I had a look at the scene files again ... combined with some new knowledge, it might be possible to displace the buildings with less than 90°.
Give me some time for this, but.

Volker
Title: Re: procedural city engine, used as population
Post by: Volker Harun on August 20, 2009, 07:03:20 PM
Okay ... I think I have it ... it is a slow calculation, so I guess that I will not be able to show 'rounded' city scapes within the next 12 hours.

Volker  ;D ;D ;D
Title: Re: procedural city engine, used as population
Post by: Volker Harun on August 21, 2009, 03:55:22 AM
I have a break on this for a few days ... it will still need some refining: I do not like the bottom of the buildings, they are too uniform, they render too slow.

Being back after another running project.

Volker
Title: Re: procedural city engine, used as population
Post by: Volker Harun on August 21, 2009, 10:04:36 AM
Brian Johnson would sing: 'Can't stand still'

Another go ... the above used functions turned to the basics ... just the grid ... for a start.

22 Minutes on 2 Cores with Qu. 1 ... AA 8 ... fast enough concerning the involved reflective surfaces and displacements.

,-) Volker
Title: Re: procedural city engine, used as population
Post by: N810 on August 21, 2009, 10:51:53 AM
Wow that's just awesome Volker  :o
Title: Re: procedural city engine, used as population
Post by: Seth on August 21, 2009, 12:20:20 PM
oh lovely sphere ^^
Title: Re: procedural city engine, used as population
Post by: littlecannon on August 21, 2009, 12:39:11 PM
nice balls... ;D