L3DT users' community
Large 3D terrain generator

Curved Terrains

It doesn't hurt to ask...

Curved Terrains

Postby tillot » Thu Oct 19, 2006 3:28 pm

I'd like support for curved terrains like in Terragen and MojoWorld.
tillot
Member
 
Posts: 15
Joined: Thu Oct 19, 2006 3:24 pm

Postby Aaron » Fri Oct 20, 2006 11:57 am

Hi Tillot,

Thanks for the suggestion. I think I can bash together a plugin for this in relatively short order.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Aaron » Sat Oct 21, 2006 10:09 am

Hi Tillot,

The latest dev-build of L3DT on the downloads page (v2.4.2.4, 21st of Oct) has an experimental plugin that will bend the terrain onto a sphere. The menu option is 'Extensions->atSphericalDistortion->Distort heightfield'.

The only input is the sphere radius, measured in metres. The default value is the radius of Earth (6400000m). I would not recommend you use values smaller in magnitude than about 4x the largest side-length of your map, as heightfields tend to look a bit silly when tilted too far. You can however use negative values to create an inner-sphere effect, or to un-do a distortion.

How I recommend you use this plugin is:

1) Generate your heightfield, water map, and attributes map.
2) Apply the distortion.
3) Generate your terrain normals, light map and texture.

The plugin doesn't distort the water map yet, so if you're rendering in L3DTVi2 the water map will be above the land where it shouldn't be. Similarly, if your're using the water-effects option in the light mapping wizard, there will be the same problem. The next version of the plugin will add an option to bend the water map also.

Oh, one last thing. Before distorting a mosaic heightfield, you have to use the 'View->Mosaic sample->Close sample' menu option. I'll fix this up in a subsequent release.

Anyway, please let me know what you think.

Best regards,
Aaron.

PS: If any developers are interested, the source-code for this filter plugin is available over here:

http://www.bundysoft.com/docs/doku.php?id=zeolite:downloads:examples

PPS: I'll post some screenshots when my computer finishes unpacking the Solaris 10 install CDs, which at this rate could be sometime next year ;)
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby DeathTwister » Sat Oct 21, 2006 3:39 pm

WOW Aaron,

Just downloaded last build, you mean there is a way to bent the terrain so we could see a spherical world from inside the sphere? Like a Spaceship world that is all terrain generated? OMG what a lever that could be for a video game, that would put all the atmosphere in the middle of the ball world. Humm, now that gets my MoJo thinking real hard. OK I go try it, so let me get this strait if I make a terrain go:

The default value is the radius of Earth (6400000m).
so that would mean I use a minus radius of Earth (-6400000m). to get a world I can use from inside? and be able to see across to the other side? if that true OMG that is so hot, and I going to go see later if I can do just that WOW.

Or did I just do another stupid artist, "not understand programmer language" again? I Hope not because I think that is so hot hot hot......if we really can now.

DT :twisted:
User avatar
DeathTwister
Dearly missed
 
Posts: 562
Joined: Thu Dec 15, 2005 12:30 pm
Location: Klamath, CA.

Postby BigYak » Sat Oct 21, 2006 7:08 pm

aaron wrote:PS: If any developers are interested, the source-code for this filter plugin is available over here:

http://www.bundysoft.com/docs/doku.php? ... s:examples


Nice!
BigYak
New member
 
Posts: 9
Joined: Mon Oct 09, 2006 3:27 pm

Postby Aaron » Sun Oct 22, 2006 2:00 pm

Hi DeathTwister,

Sorry, it's not so fancy that you could do a whole sphere, inside or out. At best you could do a hemisphere, but the artefacts around the equator - where the heightfield would be vertical - would be terrible. Heightfields aren't really intended for spheres (ditto for caves, which we've previously discussed for much the same reasons.)

Anyhoo, the promised screenshots are in the wiki over here.

Cheerio,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby DeathTwister » Sun Oct 22, 2006 3:09 pm

ROTFL,

Dang got 2 excited for nothing, Oops Oh well was a thought. I do have a idea for a inner world like some people used to think that the earth was inside out before they thought it was flat, or is that the other way around /chuckles.....
Yes, caves would be cool if we could make them, but alas not to be this week anyway, hahaha, OK thanks for the info Aaron.

How goes the new viewer you working on? long way to go? put some posts up when you get something to show us if you would, I would love to see what you create in the near future for us hard cores.

DT :twisted:
User avatar
DeathTwister
Dearly missed
 
Posts: 562
Joined: Thu Dec 15, 2005 12:30 pm
Location: Klamath, CA.

Postby Aaron » Sun Oct 22, 2006 3:20 pm

DeathTwister wrote: How goes the new viewer you working on? long way to go? put some posts up when you get something to show us if you would, I would love to see what you create in the near future for us hard cores.


I haven't started on it yet. I've been doing the plugin system.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby tillot » Wed Oct 25, 2006 2:56 am

Thanks Aaron, this is exactly what I was looking for.

I also played around with modifying the plugin a bit here.
Someday, I might even look at the how to make a better plugin UI or a better wiki page. ;)

DeathTwister, it might be possible to generate 'pieces' of a sphere, like 6 pieces, convert them to poly-meshes, cut out the relevant pieces, and then stitch them together in some poly-editing software. Not as easy as mojoworld, but possible.
tillot
Member
 
Posts: 15
Joined: Thu Oct 19, 2006 3:24 pm

Postby Aaron » Fri Nov 03, 2006 11:01 am

Hi Tillot,

Excellent work. Regarding the plugin UI, you can edit all the arguments in one go by invoking var_EditUI on the argument list. This will result in the following UI:

Image

It ain't beautiful, but it is pretty easy. Here is the modified source.

I'm happy for there two be two versions of the plugin floating around, but if you prefer we can roll our two versions together into the one plugin, merge wiki pages, remove the 'at' prefix, and update the copyright notice on the about box to indicate shared authorship. Does this sound like a good idea?

Oh, one last thing. Where you say:

Tillot wrote:Although L3DT currently doesn’t allow removing the surrounding terrain edges, other tools hopefully someday will.


I should mention that the export selected area option allows you to chop off the edges. There's no easy way for a plugin to do that at the moment, but I'll add the required features sometime soon (and maybe write a new export area plugin.)

Cheerio,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby tillot » Fri Nov 03, 2006 1:23 pm

Sure Aaron, go ahead and merge them and delete my wiki page(it lacks good formatting anyway). It will be great when you allow only exporting a selected area.

Also, is there a way to export polys, or do we need to add a plug-in for that?

With an export to poly option, it would be a simple matter of mapping the heightfield to displace the surface of a polygon sphere, allowing L3DT to effectively create 'spherical worlds'.

-------------------
On a side note, I've been waiting to purchase the Pro version until it's on the GG website, as I like how they will keep the download link up indefinately, plus those cool additions they promised...Any ideas how long till it's sold there?
Last edited by tillot on Fri Nov 03, 2006 2:27 pm, edited 1 time in total.
tillot
Member
 
Posts: 15
Joined: Thu Oct 19, 2006 3:24 pm

Postby Aaron » Wed Nov 15, 2006 7:10 am

Hi Tillot,

I've updated the plugin code and I will release the changes with the next version of L3DT and the API. I've added menu options for the basic (no clipping) and extended (clipping) versions, 'modernised' the code using the new C++ wrapper classes (coming soon), dropped the 'at' prefix, and added you to the credits in the about box. I'll merge wiki pages once I release the update.

tillot wrote:It will be great when you allow only exporting a selected area.


Hmm...I can do this now, but I might let that wait whist I upgrade some other plugins (not the least of which, the ExportArea plugin.)

tillot wrote:Also, is there a way to export polys, or do we need to add a plug-in for that?


There's a plugin that exports to DirectX mesh files, but it's pretty crappy insofar as it only does text mode, so the files are huge.

tillot wrote:With an export to poly option, it would be a simple matter of mapping the heightfield to displace the surface of a polygon sphere, allowing L3DT to effectively create 'spherical worlds'.


Surely it's not that straightforward? Wouldn't there still be an issue with pole-bunching? An awesome idea though.

tillot wrote:On a side note, I've been waiting to purchase the Pro version until it's on the GG website, as I like how they will keep the download link up indefinately, plus those cool additions they promised...Any ideas how long till it's sold there?


I'll let you know when I know myself. I think things are a bit busy over in Oregon. BTW: The download link here is permanent, just not widely published.

Cheerio,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby tillot » Thu Nov 16, 2006 9:49 am

...and added you to the credits in the about box...

Thanks.
There's a plugin that exports to DirectX mesh files, but it's pretty crappy insofar as it only does text mode, so the files are huge.

Sounds like L3DT needs a better poly exporter. LWO, 3DS, OBJ would all be good contenders.

Wouldn't there still be an issue with pole-bunching?

Yes, there would be pole bunching. To minimize it's effect, you could place a 'map to sphere' option in the landscape generation algorithms that would wrap the merian edges and increase the size of the features the closer they approached the poles until the bottom and top edges of the map come to a single point.

I'd have to look at the source for the feature generation to know if this was easy to do or not. Ultimately, I believe you'd have to make the latitudinal feature size equal to
(Flat FeatureSize)*(Radius of Sphere)/sqrt((Radius of Sphere)^2 - (distance from equator)^2)

I could also see some artifacts from floating point round off error with very large maps that may benefit from 64 and/or 128 bit arithmetic. I don't know how big the maps would have to be to experience this though, and it may be way beyond what most people are currently doing, especially if they have to generate and save a texture map for it.

I'll let you know when I know myself. I think things are a bit busy over in Oregon.

Okay. I hate to spread around the download links, so I'll wait until I absolutely need the large scale L3DT maps, and hopefully they'll have it by then. Right now the free version is enough for my testing and tinkering.
tillot
Member
 
Posts: 15
Joined: Thu Oct 19, 2006 3:24 pm


Return to Feature requests

Who is online

Users browsing this forum: No registered users and 5 guests

cron