Author Topic: Danglymesh Tiles  (Read 555 times)

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Danglymesh Tiles
« on: June 30, 2012, 01:59:48 pm »


                 Another theoretical question, though in this case I know part of the answer already.

  Is it possible to make a complete danglymesh tileset?

 I know you can apply it to an individual tile, but the issue is whether or not it's possible to do in a way where you don't get tile edge seams showing as it moves.
 Admittedly, other than tundra, muskeg, and some types of swampland (Or that stomach mini tileset) there aren't many surfaces it would be appropriate for, but it would be a useful effect if it could be pulled off on a larger scale.

  Mostly I'm just trying to find out what the limits are for certain parts of the aurora engine, and the ability to have even temporary deformation of the ground via certain spells would help push those limits.

  Anyways, here's a very short clip of a bit of beach converted to danglymesh via notepad, the constraints taken from a flag placeable, so it moves far more than it needs to.  It made it easier to show it, though.
               
               

               
            

Legacy_Jez_fr

  • Sr. Member
  • ****
  • Posts: 460
  • Karma: +0/-0
Danglymesh Tiles
« Reply #1 on: June 30, 2012, 02:17:44 pm »


               Funny. I wait to see the Jelly plane of Doom now with wandering bouncing marshmallows and "the Prisonner's Rover 'B)'
               
               

               
            

Legacy_3RavensMore

  • Hero Member
  • *****
  • Posts: 1153
  • Karma: +0/-0
Danglymesh Tiles
« Reply #2 on: June 30, 2012, 03:14:31 pm »


               Wrestling!  Oh...what?  Sorry, wrong forum.
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Danglymesh Tiles
« Reply #3 on: June 30, 2012, 04:20:17 pm »


               Couldn't you accomplish this by treating the ground texture as if it were water?
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Danglymesh Tiles
« Reply #4 on: June 30, 2012, 04:20:57 pm »


               That is really interesting. Lots of problems since other elements do not move with the mesh, but still interesting.
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Danglymesh Tiles
« Reply #5 on: June 30, 2012, 04:44:32 pm »


               

Failed.Bard wrote...
I know you can apply it to an individual tile, but the issue is whether or not it's possible to do in a way where you don't get tile edge seams showing as it moves.

Nice clip.  One way you could cheat on this would be to use a blank tileset (i.e. no geometry) and then use a much larger than normal dangly placeable plane set to static.  Static's going to keep it loaded and the model cache manager will leave it alone when you walk out of range.  So I think a 10x10 tile version of something lke that would work.  I'm not sure if there's any way to prevent tearing at the seams if it's done traditionally.

You don't need to have a blank tileset, of course.  The placeable could be above whatever the real ground was but things like grass might poke through.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Danglymesh Tiles
« Reply #6 on: June 30, 2012, 04:50:59 pm »


               

Pstemarie wrote...

Couldn't you accomplish this by treating the ground texture as if it were water?


  A quick test just now suggests not.  Water doesn't seem to react to spells the way danglymesh objects do.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Danglymesh Tiles
« Reply #7 on: June 30, 2012, 04:54:30 pm »


               

OldTimeRadio wrote...

Failed.Bard wrote...
I know you can apply it to an individual tile, but the issue is whether or not it's possible to do in a way where you don't get tile edge seams showing as it moves.

Nice clip.  One way you could cheat on this would be to use a blank tileset (i.e. no geometry) and then use a much larger than normal dangly placeable plane set to static.  Static's going to keep it loaded and the model cache manager will leave it alone when you walk out of range.  So I think a 10x10 tile version of something lke that would work.  I'm not sure if there's any way to prevent tearing at the seams if it's done traditionally.

You don't need to have a blank tileset, of course.  The placeable could be above whatever the real ground was but things like grass might poke through.


  An area in the middle of a large tile grouping maybe?  Something like a submerged muddy floor in the middle of an arena group might allow for the edges to be hidden by walls.

  Tile walls are also something that might be interesting to try it on, there are a few tilesets with membraneous walls in them that could use a little jiggle if it's workable.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Danglymesh Tiles
« Reply #8 on: June 30, 2012, 06:01:01 pm »


               Dangly mesh is expensive.  It really eats up processing most especially on area loads.  As far as edge breaks, you could try something with a flat plane where only the inner sections moved and the outer edges remained static, that would stop the tearing effect.  

You MUST match the verts on the outer edges exactly to get this to work.  IE, if one tile has a vert at 500,0,0 the tile(s) that might connect to it must also have a vert at the exact same position (or opposite as in 0,500,0.  Any verts inside that border could be set to move and they would according to the individual weights of the verts.

About the closest you could see something like this is the water planes on the Castle Rural set from 1.69 with the beach edged tiles.  Although I think they are using animesh and not using auroraflex.  (Auroraflex is danglymesh).

Just remember that Auroraflex/Danglymesh is at least twice as expensive as a static object.  Per vert.  The engine has to check each vert for it's weight, then apply environment affects to it, vert by vert.

It CAN be done, just keep your area size small.  I think 10x10 would likely cause issues, but it may actually work up to that size.

CTP applied dangly mesh to various objects within tiles, the more objects, the greater the lag in a given area.  We kept the total number small and the size of the objects small, to help alleviate some of that load.  We wanted better graphics, verses movement.

NWN Aurora engine was NOT written for threading, oh, you can set the number of processors etc, but the engine doesn't really use them, and in some cases will crash if set to higher than a single processor anyway.  it is really dated by today's standards.  it is also why Bioware moved on to other engines, to rewrite Aurora would not be worth the effort and expense.

Anyway, Small area sizes, proper attention to border verts positioning, and less weight on the next vert inside the border, IE giving more weight as you move to the center, it should work.  On larger areas, multiple tiles across, if the weighting is done properly (again making sure the outside verts do NOT move) you won't notice that the actual border doesn't move.
               
               

               


                     Modifié par Bannor Bloodfist, 30 juin 2012 - 05:01 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Danglymesh Tiles
« Reply #9 on: July 01, 2012, 02:54:53 am »


               

Bannor Bloodfist wrote...

Dangly mesh is expensive.  It really eats up processing most especially on area loads.  As far as edge breaks, you could try something with a flat plane where only the inner sections moved and the outer edges remained static, that would stop the tearing effect.  

You MUST match the verts on the outer edges exactly to get this to work.  IE, if one tile has a vert at 500,0,0 the tile(s) that might connect to it must also have a vert at the exact same position (or opposite as in 0,500,0.  Any verts inside that border could be set to move and they would according to the individual weights of the verts.

...

Anyway, Small area sizes, proper attention to border verts positioning, and less weight on the next vert inside the border, IE giving more weight as you move to the center, it should work.  On larger areas, multiple tiles across, if the weighting is done properly (again making sure the outside verts do NOT move) you won't notice that the actual border doesn't move.


  Thank you, Bannor.  These parts were a considerable help in understanding how it worked.  Leaving the outside verts at 0, and weighting inwards, did the trick for maintaining edge seams.

  The tropical set I'd been trying it on isn't really the most appropriate for that sort of use, but it happened to be the one I had open when I had the urge to try it out.

  The clip for the second test is here.  The seam between grass and sand is maintained even with both planes moving independently of each other.  The glass tile beside also moves, though due to wide vert spacing you can tell where the edge is based on the part that's not moving between them.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Danglymesh Tiles
« Reply #10 on: July 01, 2012, 07:49:01 pm »


               Yeppers.  That is a VERY common problem with multiple merged/additions to tilesets.

Folks tend to take shortcuts, and remove or never add proper divisions along the borders/edges of tiles.  That is one of the major "bugs" that CTP has always attempted to "fix" in any tileset we worked on.  Verifying that every single tile is divided correctly and that all the border/edge verts match positions correctly.  If they are NOT exactly matched, as in exact numbers, you get sparkles, and gaps between objects that should not show a gap.

Each time you edit and re-save a tile, NWMax can and usually does, round the verts. (It is actually the import that does this I think).

OldMansBeard created the CM3 program for us to help with things like that.  It will edit/adjust the vert positions on tile edges to negate rounding errors, but it has a limit on how far it will move those verts.  (That number is adjustable though, to a certain extent).

CM3 is great, it can take a long time to process if the tileset is very large, but it is well worth the effort.

Start it up, let it run, check the logs for errors that it could NOT fix, (likely there will be some) and you should then be able to fix whatever is left over fairly easily.  The logs will be LONG, and the number of "repairs" will be a huge number... don't let that bother you.  Just do a search for "error" or "bug" and concentrate on the specific tile name mentioned to fix it manually.

However, I don't think it will actually divide the actual ground plane for you, I think you will have to do that manually.  It WILL re-tile/re-uvwmap the textures for you according to the settings you choose, but I don't think it actually modifies to actual divisions of the object itself.  I just can't remember on that.

Edit:  Forgot to mention that you MUST set the texture name that is set to danglymesh to be animated.  In your particular case, I would only do that for the specific tiles that are danglymesh enabled.  IE, only process those few tiles, NOT the entire set.  CM3 will automatically adjust that object to be animated and parented to the anim node.  However, since it can only recognize by texture name, it would do the same for every tile in the set, just make sure that your working directory for the dangly mesh tiles only has dangly mesh tiles in it and you should be fine.
               
               

               


                     Modifié par Bannor Bloodfist, 01 juillet 2012 - 06:53 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Danglymesh Tiles
« Reply #11 on: July 02, 2012, 12:20:46 am »


               I was just doing it manually using notepad, which is simple enough for flat planes and such.
 It's nice to know there's a program that can automatically adjust/fix tiles though, if I ever do try it on a larger scale (or if any actual tile makers didn't know about it).

 Thanks for the link and further explanation.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Danglymesh Tiles
« Reply #12 on: July 07, 2012, 12:52:02 pm »


                 Since this tile work is connected to the bone temple placeable/tile group I'm trying to make, I reskinned a few of the sandy tropical tiles and converted some more of them to danglymesh, to have a complete ground covering of them with.
  Here's clip three, showing the effect of it over a wider scale.

 Once I get to the point I have to start making my own tiles I'll add a bit of unevenness to the overall surface of the them.  I'm not fond of totally flat surfaces.