Animated flags, lance pennants and their attributes

Users who are viewing this thread

How are these animated?

I looked up these models with OpenBRF and saw that pennon_shader was the common link between lance pennants and flags, what does the "Requires: 8192" mean?

I searched the text files as I thought it might be a script of some kind required to enable the animations and only found these entries in scripts.txt:

script_155 -1
46 23 2 1224979098644774912 1 2133 2 1224979098644774913 0 4 0 1073741855 2 1224979098644774912 8192 1073741855 2 1224979098644774912 1048576 1073741855 2 1224979098644774912 524288 1073741855 2 1224979098644774912 16384 31 2 1224979098644774912 2097152 1 2 153 144115188075856273 2114 2 1224979098644774913 72057594037927936 5 0 1073741855 2 1224979098644774912 4096 31 2 1224979098644774912 1024 1 2 153 144115188075856273 2114 2 1224979098644774913 72057594037927936 1 2 153 0 2114 2 1224979098644774913 72057594037927936 5 0 31 2 1224979098644774912 2048 1 2 154 144115188075856768 2114 2 1224979098644774913 72057594037927936 1 2 154 144115188075856769 2114 2 1224979098644774913 72057594037927936 5 0 31 2 1224979098644774912 65536 1 2 153 0 2114 2 1224979098644774913 72057594037927936 5 0 31 2 1224979098644774912 8388608 1 2 153 0 2114 2 1224979098644774913 72057594037927936 5 0 31 2 1224979098644774912 32768 1 2 153 144115188075856273 2114 2 1224979098644774913 72057594037927936 3 0 4 0 1073741855 2 1224979098644774912 8192 31 2 1224979098644774912 1048576 4 0 2273 0 2133 2 1224979098644774912 524288 3 0 3 0 603 1 1224979098644774912 604 1 1224979098644774913

It could be a geometric or mermory thing though, I suppose.

Also, how does one get both the flag to be unequipped when selecting another weapon (would help with units with lances, as it's logistically impossible to pocket them) and have it appear as though planted in the ground?

Like this(found here: http://forums.taleworlds.com/index.php/topic,248810.0.html):
917F954B07910A02AABC03CAE6B3278093EF6ECB
 
Flags are animated using a vertex shader.
I supposed that it depends on the UV coordinates or something like that.

Just use that shader with your model and it'll start waving heroically.
 
Omega_007 said:
Thanks.

UV co-ordinates?

Yeah, texture coordinates of the meshes. Where every part of the 3D polygons get mapped into the 2D image.
That's how textures appear on models, they are unwrapped in 3D editors like Blender, 3ds Max, Maya or Wings3D.

Pretty much like traditional papercraft.


The shader just tells your graphics card to wave, for example, the parts of the model that uses only the bottom part of the texture.
Open their textures, you'll see.
 
I really have nothing to worry about with the 8192 value?

Thanks again, but how is it made to stand erect as in the screeny?

I notice there's a shader entitled "pennon_shader_vertical" in mm_shaders.brf (in addition to pennon_shader, which was the one of initial interest), it doesn't seem to be any different property-wise but might it not have something to do with a standing, waving banner?

Also, how can one "drop" it by switching weapons, as seems to be done for colour bearers in NW?
 
difirent kinds of shaders are used to allow it to flutter towards a specific direction acording to the texture UV map. Since some flags are UV mapped vertically and some horizontally I just made two variants for the shaders.

To make flags stand up we use the ti_on_item_dropped and so on mission template triggers, and then change the position of the object dropped 90 dregrees.
 
Thanks very much.

Is ti_on_item_dropped also the one that "drops" the banner in the event of a weapon change?

I apologise for this particular nagging doubt...
 
... but it forces us to force users to have NW installed, which, as discussed in a topic before, would probably not limit our mods' players, but still some modders might prefer not to force anything else but Warband.
Yeah, forces aren't good in great quantities.
 
Vincenzo said:
Unequip_item trigger, remove item from agent spawn on ground.  :wink:

I've seen the one in which water ruins the powder, ingenious.

"remove item from agent spawn on ground" can be found where?

I've tried searching through mission_templates and scripts.
 
Well you remove the item from the agent before it's dropped by the engine, usually on a ti_on_agent_killed_or_wounded trigger (since I'm not sure if ti_on_item_dropped fires for the 2 wielded items upon death). When you switch away from the flag, ti_on_item_unwielded should fire.
 
Back
Top Bottom