Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

MMORPG.com will be down for maintenance beginning at midnight EST on Wednesday, August 31. Downtime is expected to last only a couple of hours.

WAC terrain relief mapping engine work

KenFisherKenFisher Northwest, INPosts: 5,035Member Uncommon

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.

 

image

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

 

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


Ken Fisher - Semi retired old fart Network Administrator, now working in Network Security.  I don't Forum PVP.  If you feel I've attacked you, it was probably by accident.  When I don't understand, I ask.  Such is not intended as criticism.

Comments

  • KenFisherKenFisher Northwest, INPosts: 5,035Member Uncommon

    Early alpha scenic with the engine mods.

     

    image

     

    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.


    Ken Fisher - Semi retired old fart Network Administrator, now working in Network Security.  I don't Forum PVP.  If you feel I've attacked you, it was probably by accident.  When I don't understand, I ask.  Such is not intended as criticism.
  • Pratt2112Pratt2112 Posts: 1,636Member Uncommon

    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.
     
    image
    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?

     

  • KenFisherKenFisher Northwest, INPosts: 5,035Member Uncommon

    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.

     

    image

     

    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  image


    Ken Fisher - Semi retired old fart Network Administrator, now working in Network Security.  I don't Forum PVP.  If you feel I've attacked you, it was probably by accident.  When I don't understand, I ask.  Such is not intended as criticism.
  • Pratt2112Pratt2112 Posts: 1,636Member Uncommon

    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.
     
    image
     
    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  image

    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.

     

  • KenFisherKenFisher Northwest, INPosts: 5,035Member Uncommon

    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.

     

    image


    Ken Fisher - Semi retired old fart Network Administrator, now working in Network Security.  I don't Forum PVP.  If you feel I've attacked you, it was probably by accident.  When I don't understand, I ask.  Such is not intended as criticism.
  • KenFisherKenFisher Northwest, INPosts: 5,035Member Uncommon

    reworked lighting and shadow handling for outdoor scenics.

    link to image

     


    Ken Fisher - Semi retired old fart Network Administrator, now working in Network Security.  I don't Forum PVP.  If you feel I've attacked you, it was probably by accident.  When I don't understand, I ask.  Such is not intended as criticism.
  • IchmenIchmen Winnipeg, MBPosts: 1,228Member Uncommon

    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

    <image

  • KenFisherKenFisher Northwest, INPosts: 5,035Member Uncommon
    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. :-)


    Ken Fisher - Semi retired old fart Network Administrator, now working in Network Security.  I don't Forum PVP.  If you feel I've attacked you, it was probably by accident.  When I don't understand, I ask.  Such is not intended as criticism.
  • LoktofeitLoktofeit Stone Mountain, GAPosts: 14,247Member Rare
    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!

    There isn't a "right" or "wrong" way to play, if you want to use a screwdriver to put nails into wood, have at it, simply don't complain when the guy next to you with the hammer is doing it much better and easier. - Allein
    "Graphics are often supplied by Engines that (some) MMORPG's are built in" - Spuffyre

Sign In or Register to comment.