Trending Games | ArcheAge | World of Warcraft | Destiny | Guild Wars 2

  Network:  FPSguru RTSguru
Login:  Password:   Remember?  
Show Quick Gamelist Jump to Random Game
Members:2,860,303 Users Online:0
Games:742  Posts:6,246,657
Ameridat
MMORPG | Genre:Fantasy | Status:Cancelled  (est.rel Q2 2013)  | Pub:XAP Games
PVP:Yes | Distribution:Download | Retail Price:n/a | Pay Type:Free | Monthly Fee:n/a
System Req: PC | Out of date info? Let us know!

Wizards and Champions Forum » General Discussion » WAC terrain relief mapping engine work

10 posts found
  ZombieKen

Novice Member

Joined: 3/30/10
Posts: 4410

Zombie - Dead but still moving.

 
OP  5/09/12 1:53:51 PM#1

After experimenting with other versions of Torque, I've come to the conclusion that I'm better served by staying with 1.7.1 which with my mods has the best performance given an MMORPG application.

 

Recent work has centered on getting the terrain system converted to full relief mapping (a technique for advanced lighting using vertex and pixel shaders).  This is very close to complete, enough that I can share a screenshot.

 

Overhead shot of a zone (6km x 6km)

 

I'll post more including a character view scenic once I have the details worked out.

MSOTSG with PPE : Massively Single-player Online Task-driven Storyline Game with Purchasable Performance Enhancements *grin*

  ZombieKen

Novice Member

Joined: 3/30/10
Posts: 4410

Zombie - Dead but still moving.

 
OP  5/10/12 7:40:21 PM#2

Early alpha scenic with the engine mods.

 

 

I'm not getting a very strong effect from the relief mapping and the terrain texturing is much softer than what I'd prefer.  Both of these can be tweaked up, but it will eat more VRAM.

 

I'm using HDR lighting which gives the bright sunlight feel that I'm looking for.  I'd like to use bloom also, but it conflicts with FSAA for some reason.  I get blotchy patterns on screen with both on.  Also need to track down code to enable transparency AA inside of D3D.  I can force it on with the video card, but the engine doesn't have any sort of controls for it.  Probably have to write it myself.

 

I think I hit an engine limit on using foliage grass (x-grass).  I keep adding more to the scene, but I can't get the grass density up.  It acts like it will render up to a certain amount and then refuse to do any more.  That'll be fun to find and fix.  Maybe I'll get lucky.

MSOTSG with PPE : Massively Single-player Online Task-driven Storyline Game with Purchasable Performance Enhancements *grin*

  Pratt2112

Elite Member

Joined: 2/12/12
Posts: 1181

5/10/12 7:47:24 PM#3
Originally posted by ActionMMORPG

After experimenting with other versions of Torque, I've come to the conclusion that I'm better served by staying with 1.7.1 which with my mods has the best performance given an MMORPG application.

 

Recent work has centered on getting the terrain system converted to full relief mapping (a technique for advanced lighting using vertex and pixel shaders).  This is very close to complete, enough that I can share a screenshot.

 

Overhead shot of a zone (6km x 6km)

 

I'll post more including a character view scenic once I have the details worked out.

Interesting.  Looks nice!

You're using TGEA, correct? It looks, from that screen, that you have 6 terrain blocks in there? Is that a custom mod you added, 'cause I only recall TGEA being able to handle up to 2x2 terrain blocks via the MegaTerrain system (which is also really buggy around the edges, as I recall thanks to the "hack-job" they did of implementing it).

Also, my understanding of relief mapping is that it works on the height-element of the mesh. It looks like you have some pretty well-placed texturing there, though. Are you using Torque's parametric texturing for that?

 

"Devs need to stop trying to make MMOs for people who don't like MMOs" - thevampirelematt/Reddit

  ZombieKen

Novice Member

Joined: 3/30/10
Posts: 4410

Zombie - Dead but still moving.

 
OP  5/10/12 8:18:22 PM#4

Megaterrain is 2x2 stock, that's correct.  The code itself can be modified to NxN as long as the length/width match and the N is a power of 2.  The largest I've tested is 4x4 for a total of 16 terrain objects in a single zone.  That works out to 8km x 8km with an 8 meter block size.

 

Seams are a huge problem in stock megaterrain.  Normals, lightmap, and procedural terrain painting are all borked producing some nasty artifacts.  I think I have all these worked out but it hasn't been tested fully.

 

It took some modifications to the procedural terrain painter to get it working with megaterrains.  There are 7 bands that can be used for slope driven terrain painting (what I use) but the stock code doesn't produce uniform results because it self-adjusts based on the steepest slope in a given terrain.  I replaced the auto adjuster with a constant calibration.  In a 4x4 setup, each terrain gets painted individually and they fit together almost perfectly in the main mission file.

 

The relief shader I'm using replaces the stock multi-layer terrain renderer used for legacy terrains.  I repurposed the 8 bit detail texture into 32 bits.  RGB holds a normal map, A holds a height map.  Terrain batcher calculates normals per vertex, and the whole mess gets passed to the shader for diffuse, light, shadow, specularity and relief in a single pass.

 

I have the same working for interior models.  See back wall in pic below.

 

 

To see terrain in test mode, here's a video of a flat terrain modulated with a test pattern in the shader.  Keep in mind that's a flat surface and what looks like 3D is just shader fx.

 

My goal is to bring the engine up to somewhere between Oblivion and AOC standards.  We'll see how that works out 

MSOTSG with PPE : Massively Single-player Online Task-driven Storyline Game with Purchasable Performance Enhancements *grin*

  Pratt2112

Elite Member

Joined: 2/12/12
Posts: 1181

5/10/12 9:09:53 PM#5
Originally posted by ActionMMORPG

Megaterrain is 2x2 stock, that's correct.  The code itself can be modified to NxN as long as the length/width match and the N is a power of 2.  The largest I've tested is 4x4 for a total of 16 terrain objects in a single zone.  That works out to 8km x 8km with an 8 meter block size.

 

Seams are a huge problem in stock megaterrain.  Normals, lightmap, and procedural terrain painting are all borked producing some nasty artifacts.  I think I have all these worked out but it hasn't been tested fully.

 

It took some modifications to the procedural terrain painter to get it working with megaterrains.  There are 7 bands that can be used for slope driven terrain painting (what I use) but the stock code doesn't produce uniform results because it self-adjusts based on the steepest slope in a given terrain.  I replaced the auto adjuster with a constant calibration.  In a 4x4 setup, each terrain gets painted individually and they fit together almost perfectly in the main mission file.

 

The relief shader I'm using replaces the stock multi-layer terrain renderer used for legacy terrains.  I repurposed the 8 bit detail texture into 32 bits.  RGB holds a normal map, A holds a height map.  Terrain batcher calculates normals per vertex, and the whole mess gets passed to the shader for diffuse, light, shadow, specularity and relief in a single pass.

 

I have the same working for interior models.  See back wall in pic below.

 

 

To see terrain in test mode, here's a video of a flat terrain modulated with a test pattern in the shader.  Keep in mind that's a flat surface and what looks like 3D is just shader fx.

 

My goal is to bring the engine up to somewhere between Oblivion and AOC standards.  We'll see how that works out 

Nice! The mapping looks very smooth in the video, no jaggedness, etc.

Ahh if only I knew how to do that kind of stuff, my life would be so much easier lol.  Every time I try working with TGEA I get stuck on some glitch or issue with the engine (such as the left-over terrain tiling code that screws up the edges of megaterrains) and end up dropping it in frustration. So, it's great that you have the knowledge to do what you are to make it work and actually improve on it.

As for the Oblivion and AoC standards.. Hey go for it. I mean, at the end of the day, you strip away the pixel-shaders and special effects, and those games wouldn't look nearly as good as they do. They'd look like slightly improved versions of older-gen games. I think it's very do-able.

 

"Devs need to stop trying to make MMOs for people who don't like MMOs" - thevampirelematt/Reddit

  ZombieKen

Novice Member

Joined: 3/30/10
Posts: 4410

Zombie - Dead but still moving.

 
OP  5/11/12 4:31:01 AM#6

Gradually getting the starting zone tested.  Tweaked up the terrain relief map and texture density.  It uses more VRAM than I'd care to use for scenery, but it holds up better with the camera close to the ground.  Not so blurry.

 

MSOTSG with PPE : Massively Single-player Online Task-driven Storyline Game with Purchasable Performance Enhancements *grin*

  ZombieKen

Novice Member

Joined: 3/30/10
Posts: 4410

Zombie - Dead but still moving.

 
OP  5/30/12 4:27:27 AM#7

reworked lighting and shadow handling for outdoor scenics.

link to image

 

MSOTSG with PPE : Massively Single-player Online Task-driven Storyline Game with Purchasable Performance Enhancements *grin*

  Ichmen

Apprentice Member

Joined: 4/15/06
Posts: 1234

hatred enriches.life is a prison, death a release.

5/30/12 4:34:36 AM#8

hmmm not bad, when you say you are drawing alot of Vram for it.. how much are you implying?? with hardware today its rare for people not to have a "surplus" of vram  more so with game companies making the "dead zone" areas that are void of anything but a coloured backdrop.

it looks nice though. kinda reminds me of the ground from the ArmA2 videos iv watched

CPU: Intel Core i7 CPU 860 2.8GHz
Evga GeForce 670 FTW
Evga P55 SLI

<

  ZombieKen

Novice Member

Joined: 3/30/10
Posts: 4410

Zombie - Dead but still moving.

 
OP  5/30/12 6:25:14 AM#9
Originally posted by Ichmen

hmmm not bad, when you say you are drawing alot of Vram for it.. how much are you implying??

 

In the last screenshot it's using about 128 megs of VRAM for the terrain texture system.  That's down from around 250 in earlier tests.  The plan is to make this configurable as a control panel setting.  I could probably get it to a range of 32 to 128.

 

I use an old laptop with a Celeron 1.5ghz 1 gig RAM and 128 megs of VRAM for testing minimum system requirements.  Nobody expects anything to look great on a machine that old.  All it has to do is run. :-)

MSOTSG with PPE : Massively Single-player Online Task-driven Storyline Game with Purchasable Performance Enhancements *grin*

  Loktofeit

Elite Member

Joined: 1/13/10
Posts: 12315

Currently playing EVE, SMITE, Project Gorgon, and Combat Arms

5/30/12 6:51:24 AM#10
Originally posted by XAPGames

reworked lighting and shadow handling for outdoor scenics.

link to image

You've come a long way with this project, XAP. Nice work!

"And wikipedia is as accurate as Britannica. Wikipedia is very reliable. You would be hard pressed to find a more reliable source for these kinds of things." -fivoroth