Author Topic: Seeing Tileset Grass in the Toolset  (Read 594 times)

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« on: July 03, 2012, 03:27:02 am »


               I need to understand how grass works. I am specifically interested in understanding how it was implemented in Lord Rosenkranz's immersive swamp.  Check out this swamp image he put together if you haven't seen what I am talking about.

He's got some very tall grass and reeds in that tileset, but I can't see where it crops up in the toolset.

Why do I care? Short anwser: I have OCD.

Longer answer: in Arnheim I have terrain effects which I define both by triggers and area. One of the terrain types I have defined is thick vegetation. this terrain can provide concealment, increase the potency of entangle and vine mine upon characters in the vegetation, and it can slow movement. Fliers ignore it. Druids can slip through it without much worry. Creature size can change how the affects are applied etc.... And it makes dynamic sounds when something is moving it through it, unless it is stealthy enough, incorporeal etc.... I like how this adds immersion to the game and enables terrain to provide more tactical oppurtunities.

BUT... if the vegetation is grass, I have a very hard time knowing where to define the vegetation zone. Typically grass is of neglegible height. But not in this tileset. So.....

How can I make it visible or otherwise identify where it is while in the toolset?

I do use a "development HAK" - meaning a set of resources that make building easier but is removed when the module is released for play - so if there were a way to provide a visible texture to the zone with grass emitters this could work, as I'd just stick the resources in my development hak. Dunno what other options I might have available to me. I don't necessarily want to extract the tiles and change them to make the zone of grass visible... but if I had to and someone explained how this could be done.... I'd do it. '<img'>

Lastly... it would be interesting to tie the terrain effects to the type of ground of the tile. I mean how the footstep type changes on certain kinds of ground. If I could access this via scripting, I wouldn't necessarily have to define vegetation zones in the toolset, but would be able to simple switch terrain effects on for certain footstep types. (I'd love to do this for water...) But anyway.... please let me know your thoughts on how to approach this problem.
               
               

               
            

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #1 on: July 03, 2012, 03:53:07 am »


               Normally tileset regions have various flags for  "zones" like grass, the type of footsteps heard, if you kick up dust, etc...

Sounds like he did something different? *Curious*

Could it be your toolset is not showing transparencies?

(mine doesnt, eveything is shiney instead, even tho renders fine ingame)

Perhaps try replacing the textures with something radicaly different, to check...

'Posted
               
               

               


                     Modifié par Carcerian, 03 juillet 2012 - 03:02 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #2 on: July 03, 2012, 04:02:52 am »


               He probably didn't do anything unusual. My problem is ignorance about how tilesets are put together.

Typically grass doesn't show up in the toolset. And by grass I mean the 2dimensional billboards that emanate from the ground when you are playing and have tileset grass turned on. These billboards are not turned on when you are in the toolset AFAIK.

So rather than just change textures at random, I need some help finding what I need to.
               
               

               
            

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #3 on: July 03, 2012, 04:23:17 am »


               I'm not expert on tilesets, but the way i understand it is they are planes that have a "grass" variable flag.

I recall of a "tall grass" mod as well (something i tried in a serpent isle mod ages ago) that mght be a place to start your reverse engineering '<img'>
               
               

               


                     Modifié par Carcerian, 03 juillet 2012 - 03:34 .
                     
                  


            

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #4 on: July 03, 2012, 04:26:24 am »


               For a start, you could try looking at Grasslands and NR_Grasslands as examples of "grass mods"
               
               

               


                     Modifié par Carcerian, 03 juillet 2012 - 03:40 .
                     
                  


            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #5 on: July 03, 2012, 05:15:09 am »


               Hrm...AFAIK, no way to get grass in the toolset.  You can always use the "renderaabb 1" console command in-game, which reveals surface materials for the walkmesh by coloring the walkmesh's polygons differently.  Light green is walkmesh set to grass and will "grow" grass. 

'Posted

Grass height and texture, density, etc. are controlled from a tileset's .SET file.  So, maybe you could just override the settings for grass in that tileset (a .SET file is pretty small) and change the grass to your liking?
               
               

               


                     Modifié par OldTimeRadio, 03 juillet 2012 - 04:25 .
                     
                  


            

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #6 on: July 03, 2012, 05:23:09 am »


               TY ORT '<img'> (wasnt sure if any tileset experts were online or not tonight)

*Can finally finish last of Moathouse area in Temple of Elemental Evil*

(Blatant Good-Old-Games Plug)
               
               

               


                     Modifié par Carcerian, 03 juillet 2012 - 04:39 .
                     
                  


            

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #7 on: July 03, 2012, 05:35:22 am »


               *Grins* For some reason your ID always reminds me of Mayor Adam West: "Do I sound like I'm on old time radio?"

'Posted

(Nobody messes with ADAM WE!!)

*Off to play old Troika games for inspiration*
               
               

               


                     Modifié par Carcerian, 03 juillet 2012 - 04:38 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #8 on: July 03, 2012, 03:02:32 pm »


               Thanks, OTR. That gave me a useful lead.

So it appears that where grass shows up is defined by the .wok (walkmesh), and the surface type of a particular polygon/triangle. I'd have to get the grass triangles of the .wok to render in the toolset.

Does anyone know of a way to automate this? If I ripped out all of the tilesets .wok, stuck them in a folder, ensured they were in ASCII format, then ran a find and replace function with the right bit of code. Would that work?

I suspect not, or at least that it would be very difficult to understand how to retexture the .wok in this way. I suspect I'd have to texture those triangles by hand in a modeller.

Any other way to do that? I want to see all the triangles that sprout grass while in the toolset.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #9 on: July 03, 2012, 03:50:28 pm »


               Based on what Virusman had said, NWNX reads that information off the wok as well.  If you're using that, you could just add the surface material check into the spell, and bypass triggers completely, at least for that part of it.
 I suppose you could likely check that every HB and update it as a variable on the PC as well.

 It's not the solution you're looking for, but it is a way of handling it in game.
               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #10 on: July 03, 2012, 04:16:19 pm »


               

henesua wrote...

Thanks, OTR. That gave me a useful lead.

So it appears that where grass shows up is defined by the .wok (walkmesh), and the surface type of a particular polygon/triangle. I'd have to get the grass triangles of the .wok to render in the toolset.


NWNExplorer doesn't render the walkmesh multi material if you turn the walkmesh into a trimesh. If there is mainly grass on that tile, you get a grass texture rendered all over the tile. I guess that might happen in the toolset, too, or the texture will be white.
It would be a lot of work to copy the walkmeshes of all those tiles and turn them into a trimesh and then remove all those trimeshes again after you're done. So even if this would work, it would probably be too much work.

I don't know if you can run a mod you're working on in the toolset in the game at the same time. If that is possible, you could run the game in window mode and use the renderaabb console command to better see where the grass is and paint your triggers in roughly the same place in the toolset.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #11 on: July 03, 2012, 05:58:23 pm »


               Thanks, F.B. I feared that it was an NWNX only hook as I am not running NWNX because I don't have an Intel machine to serve from, only for building. Which means that I'll stick with triggers to do this. Its a pain to build, but more efficient at run time.  -- This is one of the reasons why I like Unity as a game dev tool. You can modify the "toolset" to automate these kinds of tasks. But that is not relevant here. '<img'> Unless Virus Man manages to open up that possibility for us. I should post a request and see what he says.

Zwerkules, yes something along those lines is what I might have to do. I'd have to take all of the wok meshes and then extract out all of the polygons with a grass surface and then texture them brightly. Then throw the whole thing in my "development hak" so that I can see what I am doing while building.

Although another option would be to get a switch in the toolset that acts like the "renderaabb 1" console command.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #12 on: August 25, 2012, 07:33:51 am »


               Ok, little late to this thread, so please accept apologies for whatever miss=understandings I may have or cause.

1) <snipped as erroneous, sorry>

2) You guys are all talking about directly editing the .wok file. This ONLY works in a server environment. For local, single player stuff, the engine completely ignores the .wok file and directly uses the wok data from the .mdl file instead. Also remember that any edits to the seperate .wok file are NOT saved or read by any of the importer(s) for 3ds.gmas, they completely ignore the .wok file and generate the data ONLY from the wok data stored directly in the .mdl file.

This was all done by request from the PW groups way back around 1.3 or so patch for nwn. Prior to that point, the wok data was ignored by the server, and read directly from the .mdl file. This allowed players to modify their own local copy of the individual tiles in an area by editing the main .mdl file and wok data, thus allowing them to bypass locked doors, blocked pathways etc... after that patch, the .wok file become very important to PW admins, and the game itself (only in a server environment). Thus preventing players from actually modifying a given .are in a server environment using their override folder etc... keeping the PW safer from hacking.

<snipped as erroneous, sorry>. I know there is a console command to display woks in game, but it makes displaying the .are file take longer, and also makes the scene very ugly to look at. Funtional per se' but horrible to actually see.

It would seem to me that displaying the actual texture applied to growin grass would be problematic in several ways... One, grass grows taller according to how long the PLAYER is in the game during any specific play through. It tends to re-start from shorter grass when the player has not played that particular mod in a while.... I am not possitive what controls this, and it has appeared to me to be somewhat erratic.

Using an "builders resource" override hak might make it easier, but would require the tileset author OR the PW owner to create tiles with specific NEW textures applied to whatever they wanted to highlight, and that would disappear from the players point of view if their copy of the override hak was empty or normal. Useful from a builoders point of view, but difficult/time consuming to create a duplicating but different override hak for the builder to use. There are several instances of tilesets that use this feature thoiugh, and they should make it fairly plain / simple to duplicate for any specific tileset, just a very time consuming option, and one that has to be carefully built.

Anyway, all of the above can be accomplished WITHOUT using NWNX etc, which might make it easier to use for folksw that are are not using intel type processors or windows OS.

Edited:  Edited to remove some off the wall, leaked out of a brain on drugs, type of statements.
               
               

               


                     Modifié par Bannor Bloodfist, 27 septembre 2012 - 12:00 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #13 on: August 25, 2012, 08:31:04 am »


               wow.. that ini setting is defintely something I need for the toolset. As soon as anyone figures out what it is, I would appreciate it. Thanks.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Seeing Tileset Grass in the Toolset
« Reply #14 on: September 26, 2012, 05:23:52 am »


               *bump* anyone know what the ini setting is to turn on WOK display in the toolset?