Tileset Dynamic Grass Question
#1
Posté 18 août 2012 - 03:30
#2
Posté 18 août 2012 - 04:23
Modifié par Borden Haelven, 18 août 2012 - 04:23 .
#3
Posté 18 août 2012 - 04:39
#4
Posté 18 août 2012 - 04:42
You could try to add a line 31:
31 Marsh 1 1 1 WT Grass 0 fx_step_splash
(and add your own effect instead of fx_step_splash if you like).
Then change the material id of some faces in a tiles walkmesh to 31 and see if it works.
#5
Posté 18 août 2012 - 04:54
#6
Posté 18 août 2012 - 05:51
#7
Posté 18 août 2012 - 05:58
#8
Posté 18 août 2012 - 06:18
#9
Posté 18 août 2012 - 06:30
The location was once a tiny village on the coast that was protected from the ocean by a natural breakwater. However, when the breakwater gave way the village was flooded with water. Now all that remain are a few partially sunken buildings and a moldering chapel ruin.
#10
Posté 18 août 2012 - 07:43
#11
Posté 18 août 2012 - 07:56
Anyway, I'll post some screens once I get more features done....
Modifié par Pstemarie, 18 août 2012 - 07:59 .
#12
Posté 18 août 2012 - 08:12
#13
Posté 18 août 2012 - 08:15
#14
Posté 18 août 2012 - 08:30
#15
Posté 18 août 2012 - 11:39
Pstemarie wrote...
I was wondering if there was a way to get grass to render on more than one material. I'm working on a swamp tileset (using Mirkwood as a base) for my module and want grass growing in the bog terrain, not just on the default marsh terrain. Is this possible?
It appears to be.
Two methods:
1. A placeable with WOK which is set static and placed using adjust location at the center of a tile in the toolset.
3. Doping the model with additional face data. See here
In the video below, the first area I enter into has had grass applied using the placeable w/WOK and the second area uses "Double WOKing":

These are just the WOKs for TTR01_G02_01.mdl, with the grass WOK lifted up a bit to clarify what I'm talking about. Normally, both the water portion of the main WOK and the grass WOK would occupy the same space.

Both techniques appear to work but there could always be quirks or problems which makes further testing necessary.
Modifié par OldTimeRadio, 19 août 2012 - 02:53 .
#16
Posté 18 août 2012 - 11:51
#17
Posté 18 août 2012 - 11:56
Two (normal) seperate WOK meshes in the same tile model, exported as one WOK file. The WOK file will contain information about two separate aabb nodes, in this case with the grass mesh coming first.s e n wrote...
OTR: two separate wok meshes or a wok mesh that has double faces when required?
Nothing fancy or odd about the meshes themselves.
Edit: Causes some kind of bizarre crashing problem with the toolset. Removed link to file.
Modifié par OldTimeRadio, 19 août 2012 - 02:55 .
#18
Posté 19 août 2012 - 12:22
#19
Posté 19 août 2012 - 12:28
You're right, I'm seeing that too. I wasn't having the problem earlier so let me see if I can reconstruct where it's going wobbly.Pstemarie wrote...
Cool concept OTR, but it crashes the toolset whenever I try to save. I would suspect its because on some of the tiles the geometry coverage with the second wok is 100%
#20
Posté 19 août 2012 - 01:26
#21
Posté 19 août 2012 - 02:44
However, I do think I might have nailed it: I hope, anyway. Again, since it's "all about the faces", I went into the ASCII model, into the aabb node and found the water faces (which end in 6), copied them, pasted them at the end of the list of faces, changed the 6 at the end to 3 and then counted how many new lines I'd added. Then I went back up to the "faces" count and incremented it by that many. In this case, I added 14 new lines (these are copies of the water faces), and so my "faces 90" became "faces 104". No AABB weirdness involved. No duplicating AABB with this method. This only affects the faces, which is the cue NWN is using to determine what needs to be drawn. If anything, this is just doping the model with extra face data. I tried compiling it externally and the external compiler doesn't seem to have a problem with it.
Download it here and give it a spin.
Modifié par OldTimeRadio, 19 août 2012 - 02:54 .
#22
Posté 19 août 2012 - 01:12
#23
Posté 19 août 2012 - 02:57
I got it: it is easy enough: you clone the faces you want with both grass and water, you slightly offset ( I say 5 cm) the shared XY verts of the cloned faces, you flip the grass faces, and then you add the wok modifier and apply water where needed, and grass to the flipped ones. this way you get the grass to render (even with flipped faces, that doesnt interfere with the movement so you dont get movement weirdness, the grass will always render in vertical position with growing bottom->top) and you get splotches and water sound as you move.
#24
Posté 19 août 2012 - 03:31
#25
Posté 19 août 2012 - 03:32
How does that look when you have renderaabb on? Will it compile with an external compiler?
Unless someone comes up with a problem with the method, I'm still sweet on just changing the faces.
Here's why:
-Modeling the grass through walkmesh affects the verts, faces, tverts and aabb.
-Simply adding extra faces to the face list only affects the faces and nothing more, but achieves the same effect. Seems pretty benign in comparison.
Still, it's cool to see how many different ways we can approach the same problem!
Now, it doesn't look like anyone's downloaded the sample file I posted in the previous message so I'm not sure how much interest there is in a solution to this particular problem anyway. But I think beyond attempting to address Pstemarie's question, these approaches also probably have applications outside of that narrow spectrum- and it'll be interesting to see what those wind up being.
Modifié par OldTimeRadio, 19 août 2012 - 03:34 .





Retour en haut







