Author Topic: Old question, but I cannot find the answer in the omnibus with the processor time I have left...  (Read 483 times)

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0


               

I know somebody knows this. Here is the old question, which I also need an answer to:


 


I am trying to get the values used to get the same movement as the default grass in rural area's.

what is the period, tightness and displacement?

i have tried to locate the default grassbut with no success.



               
               

               
            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0


               

When you mean the grass.mdl that is somewhere in models1 or models2 folder from the main.data!



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0


               

not finding it by that name or location. I can't see it easily in any other location either. Maybe I will check rolo's file bank and search for it that way.



               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0


               


I know somebody knows this. Here is the old question, which I also need an answer to:


 


I am trying to get the values used to get the same movement as the default grass in rural area's.

what is the period, tightness and displacement?

i have tried to locate the default grassbut with no success.




It is either A:) Hardcoded or


B:) 0,0  


 


Although you CAN find a reference to "grass.txi" and "oldgrassinfo.txi", both found in the textures01.bif, where the OldGrassInfo.txt has real numbers filled in for it and uses 2 AND 3 columns of data whereas the grass,txi only mentions downsamplemax 0, downsamplemin 0 as the to bits of data affected.


 


The OLDGRASSINFO.TXI has 2 floats followed by 3 floats in each row.  As to what they actually do or mean, I have never found any information, nor attempted to add/modify that data via the grass.txi file to see what happens.


 


The GRASS.TXI only has a single float in each row, as downsample min/max. 


 


Thus it appears as if grass.txi and grassinfo.txt are used in two different fashions, and likely not directly related.  Especially since the grassino file is preceded by "oldgrassinfo" etc.  Something changed during game development in the base engine so some files exist in basically an archive format and are no longer used.


 


 


the [GRASS] section on each tileset controls whether or not grass motion is enabled, and it's density per square and max height, the rest is just color data for that grass.  Soooo GRASS is a multi-modified object with no direct .MDL used, so it is game engine controlled.


 


Personally, I believe it is a default, hard-coded bit of the exe and not something that was adjusted via the various txi files in the actual, as released, game. 


 


Note that CTP did during various testings, attempt to create a NEW grass.mdl, but since we had nothing to base it on,. we ended up with nothing showing up or a complete black mess and at least one other result that I can't remember other that to say that it did NOT give us what we expected.  It also adversely affected all instances of grass in game depending on hak load order or whether we attempted via override.  Basically just a mess so we gave up on that pretty quickly.


 


Since grass.txi only has down-sample min/max, there really is not much you can  do with that, as it truly only affects total resolution issues pertaining to the base grass.tga or .dds that you provide.  That texture, doesn't apply an image to a specific mdl defined so creating a NEW grass.tga didn't truly help much.  It allowed us to change basic color etc, but did not seem to follow a pattern we could truly use.  IE a grass stem with a tuft at the top etc,


               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0


               

Thanks a ton for that info. I'll have to just try to clone it then, or get ahold of a tileset where somebody has already done a great job of doing just that. I'm trying to get the same values they used for grass so I can make my alternate grass types in an area wave at the same time and with the same flexibility as other grasses without having to spend hours tinkering with it to make it happen.



               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0


               

If you are able to get any NEW grass.mdl to appear in game with that same title, then I would love to see it.  As far as place-able type objects, there are txt files you can edit/change for each, and don't forget that grass also has a 'hidden' grassrim object.  That one particularly requires a specific texture to be applied, but the actual in game "grass" object has no model file that can be found.  Again, you can adjust it's DENSITY and HEIGHT via the "[grass]" section in an individual tile-set but that does not directly affect what MODEL grows in game.  Only it's relative density and height.  Playing with those numbers can have a HUGE affect in game, to the point of making any grass type tile un-walkable due to the engine heat required to display such a dense field of tall grass.


 


Anyway, I would love to see any results you gain from your attempts with this.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0


               

I'm basically just after the flex values. I don't want to replace the grass, I want to copy it and apply it with itself in different tones and shapes, or fully replace the tileset grass option with on-tile grass objects. Just the numbers is what I am after, because I want my grass placeables to move exactly like the grass does vs wind and wind-like emitters, especially when placed in a region with tileset-made grass.


 


I know some people have done on-tile grass objects, and I wonder if anybody knows off the top of their head, do those grass objects already have exactly what I am looking for? I have a lot on my plate, and that is obviously my own doing, but any help is greatly appreciated, so I don't have to run around like a chicken with my head cut off trying to look for simple stuff like this.



               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0


               

I Truly understand what you are wishing to do, but you can't as those numbers were never exposed to us.  They are hard-code engine controlled features.  Meaning, the engine has a SINGLE grass object that is places according to the density as defined by the .set file, but the actual mdl that you would expect to be able to edit, does not physically exist.  Just as in Skyrim and other games, some 'trees, bushes, grasses" etc, are hard coded either by the game engine itself OR by a plugin for that Engine.  IE, you can purchase a speedtree plugin for 3ds max, that allows you to define new trees according to a mathematical formula... Aurora / IE Bioware, never exposed that grass object to us.  It is not a physical file that we can edit.  Bioware takes a texture file, sorta like how a txi modifies things, but more like the files used for reflection? I mean the environment files that is.  That texture is then applied to the internal objects that are mathematically generated ON THE FLY by the engine, and then grown by the engine as game time progresses.


 


Place-ables are handled differently, but the true 'grass' that is grown by the engine is colored by the individual tile-sets and settings in the tool-set for the environment of the given area.


 


Edit:  By the way, the engine only grows grass as defined by the wok face type.  It places blades of grass according to the density level defined in the .set, grows them to the maximum height according to the time stamps of the given area, and places those blades into the individual triangles defined by the wok mesh face type of grass.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0


               

No I don't think you do understand what I am trying to do. All I want is to get flex values for a danglymesh which directly match that in the built-in grass. I know you can make wind affect all the component meshes on a tile, so all I need is the approximate danglymesh values which would have appeared in the grass code had it been an external model.


 


As I stated above, the goal is to make grass available on non-grass-ed walkmesh which matches in flexibility to the internal grass builder, or to provide multiple grass types in a single region.


 


Just the approximate values is all I am really after. I assume somebody has already done this kind of hunting, or trial and error, as I know tilesets with hand made grass clumps.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0


               

ok, so after hours of testing, I came up with a close approximation, which is still a bit more rigid than I am going for. Here are the details.


 


In your model, you need these values, or approximate


 


  tightness 8.5

  period 23.5

  displacement 500.0


 


In your danglymesh constraints section, set your non-moving parts to 0.0, and your grass tops to 254.9


 


This is as close as I am going to get tonight, but I think if I tweek the displacement value +/- 50 I can get it right on. I also ran into issues setting tightness above 10, or period above 24. The closer I get to those numbers the more error occurs and the grass begins to shake violently. I don't know what the actual math inside is doing, but that would help a lot if somebody did know. I've tried both values in 25, 32 and 50, and they all shake, or jam entirely after a bout of shaking, and then become unflexible forever after. Not sure what is in there, but I have to guess an extremely minute value, or a divide by 0 is happening in the math. Just a guess.


 


I've also got good results, although a bit more rigid, with 9/24/2 and 200. Somehow the displacement value and constraints do the majority of the work.


 


The constraint seems to be a maximum value, with both 0 and 255 being full stop, then allowing movement from 254.9 to 0.1 with 0.1 being the free-est to move. Managing a very high displacement with a very small constraint free-ness seems to do what I wanted, and then maximizing the tightness and period makes them flow more realistically. I wonder what constraint 254.99 and displacement 1000 would do?



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0


               

I noticed a new like on this last post, so I want to update: about a month ago I went back and started playing with it again. I did a complete run-down of ALL positive numbers, and now I need to do the negative numbers, since I read in the omnibus that negative numbers DO work. I cannot find the exact range of movement offered by the engine on tileset grass, and this is because the range seems to be created with consecutive positive movements, stacking up to a total offset. Visible mesh-based danglymesh cannot accomplish that effect with positive numbers. It is impossible. You can get a grass which moves equally in distance, but you cannot get a grass which moves equally in time, or rebounds equally in time. Even when you think you have, it will not move the same when you walk past it, and will instead start jiggling uncontrollably, or completely crash the math on that object, and it will never work again until you reset the model.


 


In conclusion, the walkmesh-based grass, which is internally driven, grants the grass overlapping values which remain over a duration, which cannot be duplicated by any combination of positive danglymesh values, either within the incorrect range presented for use in the NwMax danglymesh helper, or in actual ranges you can play with in the MDL file. To duplicate the movement, another value must be specified, for which we have no input. We only have maximum distance, resistance to movement, and delay, in addition to scaled use of those numbers specified on the vertex being moved. A variable must be present to define how long previous movement is kept, and we don't have that.


 


Negative values may solve this yet, but I don't foresee that happening.