Curved Terrains
13 posts
• Page 1 of 1
Curved TerrainsI'd like support for curved terrains like in Terragen and MojoWorld.
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
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: 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 Quantum Psychics is the future of man!
ATOMIX Productions http://atomixgroup.com http://theatomizer.com http://atomixworldmarket.com http://indiemusicsociety.org http://texturesource.org
Nice!
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.
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 Quantum Psychics is the future of man!
ATOMIX Productions http://atomixgroup.com http://theatomizer.com http://atomixworldmarket.com http://indiemusicsociety.org http://texturesource.org
I haven't started on it yet. I've been doing the plugin system.
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.
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: 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:
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.
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.
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.
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.)
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.
Surely it's not that straightforward? Wouldn't there still be an issue with pole-bunching? An awesome idea though.
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.
Thanks.
Sounds like L3DT needs a better poly exporter. LWO, 3DS, OBJ would all be good contenders.
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.
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.
13 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 27 guests |