Author Topic: RE: Interesting Idea for Seasonal Tilesets  (Read 850 times)

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #15 on: September 24, 2015, 05:31:14 pm »


               

@Verilazic - NWN does do occlusion culling based on the camera's viewing frustum and object occlusion.  However, my experience suggests that the object occlusion algorithm sometimes errs on the safe side by including material behind or under two objects (let's say, two flat grass tiles) because of a seam between them which is not noticeable to the human eye but which is "visible" to the computer.  Also, I believe a bounding box which extends into visible space may trigger inclusion.  A pet theory of mine, but something I have not looked into much, is this is one of the culprits behind why Castle Exterior, Rural can be so laggy when you have the sea cliffs going.


 


@Pstemarie - (Edit: See proof of concept here, requires animesh) Instead of multiplying the geometry, multiply the texture.  If you have four individual textures, combine them into a 2x2 image.  UV Mapping will have to be scaled down so the UV mapping matches up with the texture in the upper left hand quadrant.  For each of the additional animation sequences, simply shift the UV's to the to a different spot on the texture.  Tellingly, there already exist tools in Velstools to perform this shifting.  As Zwerkules pointed out, textured objects which need to "disappear" can have their texture replaced with pure alpha.  (Edit: Though shadows would still remain if it's shadow-casting geometry)  I believe Render can even be animated to turn on or off in the Aurora Trimesh Modifier, but I might be wrong.  


 


Other than location, position and scale of a mesh, settings on modifiers can be animated, too.  In animation mode, those settings will get red brackets next to them.  There are a very large number settings that can be animated like this.  And, of course, UV coordinates.


 


@Zwerkules - My guess is that you could probably add a crazy number of triggers before it would slow down an area.  Because a lot of things boil down just being triggers in the engine.  However, there's probably better shapes than others and I assume either a circle or a square is going to cause the least amount of calculations.



               
               

               
            

Legacy_boodah83

  • Full Member
  • ***
  • Posts: 247
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #16 on: September 24, 2015, 07:01:43 pm »


               


Hence, Boodah's idea of a generic sound is better. Then again with the winter terrain you could always aim for something in early winter, when the grass still crunches under your feet. Even in a fantasy setting, not too many adventurers - or monsters - are going to be moving around in the deep snows of mid winter.




 


Yeoldefog's Idea '<img'>


 


Hm, personally still very much like the visuals of deeply snow covered areas and it's not only useful for winter but also for far up north settings. Many an adventure to be had and monsters to slay in these climates as well.


 


This method of doing seasonal changes would be most useful for PW's, I think, but there are other ways to achieve this (like this). For SP modules, I'd prefer to just have two separate versions of a given tileset (summer/winter) tbh.


 


However, I still think it's a pretty awesome idea and could be used in ways like PhoD suggested (intact/ruined buildings, bridges, walls, etc.- in these cases with the walkmesh of the intact version and spawned-in invisible walkmesh blocker placeables for the ruined ones).


 


@MerricksDad: Hm, I'll have to try messing with the FootstepSounds.2da some time in the future then; would be pretty neat if that would work and could be also useful in combination with ground texture placeables (sand, snow, etc.) or tilemagic.


 


@OTR: That sounds pretty neat as well, might be also a good way for doing day/night windows, for example...



               
               

               
            

Legacy_Borden Haelven

  • Hero Member
  • *****
  • Posts: 681
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #17 on: September 24, 2015, 07:39:50 pm »


               

The forge my Steam machinery hak uses below Z:0 geometry on one of the anim loops so it definitely works. It is also script changable. '<img'>



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #18 on: September 24, 2015, 08:21:45 pm »


               


The forge my Steam machinery hak uses below Z:0 geometry on one of the anim loops so it definitely works. It is also script changable. '<img'>




 


Yes - you're forge is where I got the idea for the Q Brazier and the later forge placeable I did.


 


It's so great to see so many minds churning away on this - I'm certain that, given time, the Community can, as PHoD would say, "hit this problem with a brick" and solve it. There is a lot of talent here and it's just awesome to see everyone come together in a discussion in this manner.


               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #19 on: September 24, 2015, 08:28:16 pm »


               

Whew, okay, here is a live proof of concept for my suggestion about just animating the UV coordinates:
downloadbuttonh.png

 
SmGhWxH.gif

 
Instructions: Module goes into module directory, hak into hak directory.  Open in toolset, click on the tile with the tree and right click.  Should get three animation boxes to tick:

(default) - Green leaves

Animation Loop 1 - Yellow leaves

Animation Loop 2 - Maroon leaves

Animation Loop 3 - No leaves (pure alpha a la Zwerkules' comment)

 
Note: Once the animation boxes are ticked, you have to close the dialog for the scene to update.

 
Quick observations and notes: Seems to work just fine, with the comment I made about alpha textures not affecting shadows being the only bit worth underscoring.  Required the creation of an "a" dummy node and the linking of the four foliage meshes to that.  Required the creation of animloops but don't forget to precede them with a tiledefault animation which is everything in its natural state, without any animloops running.  UVW XForm modifier's U and V offset were used to re-position the mapping with Auto Key turned on in Max (results in a red timeline) while Key Filters were set to only track Modifiers.  Each animation only has two keys, one at the start and one at the end and both are the same.  I also selected each of the four meshes and applied a single UVW XForm modifier which made things much easier during animation.  When done, I right-clicked on the modifier and made it unique, then moved each of those modifiers (on each mesh) under the Aurora Trimesh modifiers manually, just because.  Frame length for each animation was 10, starting with 0-9 and AniMesh sample length was 3 for each animation on each mesh.  These last two things were entirely arbitrary decisions on my part and can probably be tuned much better.  I also did not compile it, but the model would probably benefit from compilation and I would first attempt it with the leaked internal Bioware model compiler before trying anything else.

 

 '<img'>



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #20 on: September 24, 2015, 09:14:10 pm »


               

AMAZING!!!  '<img'>


 


And what leaked Bioware compiler?



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #21 on: September 24, 2015, 09:55:20 pm »


               


And what leaked Bioware compiler?




One place to get it is this Kit I put together, in the "MDL-Compiler Bioware" folder.  Found it tucked away on a Russian website some years ago and all the files in it are as I found them.  Works just like the Bioware DDS compiler, with in and out folders.  Sometimes I have to fall back on the DLA compiler, because it seems to have certain esoteric bugs related to characters fixed, but I always hit the Bioware one first.  BTW, the CleanModels in that kit is not current version but DLA compiler is fine.


               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #22 on: September 25, 2015, 01:01:04 am »


               

That demo looks great but I do have a question though. Don't you have to be careful with pure alpha textures? Isn't there a possible problem with punch-through? While I'm on the subject of punch-through is there a way to turn it off using txi files?


 


TR



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #23 on: September 25, 2015, 01:30:46 am »


               

I don't understand the context in which you're asking the question, Tarot.  The only difference between my texture and the default Bioware texture is mine didn't include a TXI setting the alphamean to 0.595.  Both the default and mine are 32-bit.



               
               

               
            

Legacy_Frith5

  • Hero Member
  • *****
  • Posts: 595
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #24 on: September 25, 2015, 02:46:27 am »


               

Cool stuff here, folks! Lovin' it.


I recall in NWN2 there was a useful method for creating 'deep snow' areas, where the snow lay over the terrain, matching the shape, and characters were knee deep or more in the stuff. I always liked that!

​​



               
               

               
            

Legacy_PLUSH HYENA of DOOM

  • Hero Member
  • *****
  • Posts: 995
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #25 on: September 25, 2015, 03:36:54 am »


               

OK, I know this wouldn't be of use for a full on "Shift the whole planet through seasonal variations" Tileset with all the fixtures and fittings, but...


 


I'm currently thinking of a sort of triple approach, partly because of all the additional geometry maybe causing lag in a single big Tileset - and partly just a "how little work can I make this" angle...


If I have two Tilesets - let's call them "Normal" and "Apocalypsomized", the latter being being a reworked version of the first where everything's been pushed in with a catastrophically immense Eldritch Brick, both of which are fairly big anyway (being Hyenaomized versions of the TNO set with assorted additions from Q and of my own rubbish making), then putting them both into one set is possibly asking for trouble. And it's an awful lot of work to complete and find it's not really doing the job.


So, perhaps the answer, at least in my ridiculous genocidal desire to annihilate every last thing there is, is to create a third version with just the tiles - and ONLY the tiles - needed for the actual Area in which the actual change takes place. Preceding Areas use the "Normal" and subsequent Areas use the "Apocalypsomized" Tilesets. This keeps the extra geometry to a minimum and they can share walkmeshes since the big heaps of rubble for fallen towers, etc, can be script spawned as needed as Placeables at carefully positioned waypoints.


 


As I say, this won't help for a seasonally shifting game world - which would be awesome - but it might be the way to go for a sudden, total change of the world around a player, on screen, properly, not cheating...


And not adding anything else to Tilesets already bordering upon the bloated.



               
               

               
            

Legacy_YeoldeFog

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #26 on: September 25, 2015, 09:34:13 am »


               

This is wizardry!!!  '<img'>



               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #27 on: September 27, 2015, 10:11:29 pm »


               


One place to get it is this Kit I put together, in the "MDL-Compiler Bioware" folder.  Found it tucked away on a Russian website some years ago and all the files in it are as I found them.  Works just like the Bioware DDS compiler, with in and out folders.  Sometimes I have to fall back on the DLA compiler, because it seems to have certain esoteric bugs related to characters fixed, but I always hit the Bioware one first.  BTW, the CleanModels in that kit is not current version but DLA compiler is fine.




 


Does the Bioware compiler handle "selfillumcolourkey" correctly? The compiler I have breaks all animations with self-illumination. I always use it for placeables but never for tiles because of this.


 




That demo looks great but I do have a question though. Don't you have to be careful with pure alpha textures? Isn't there a possible problem with punch-through? While I'm on the subject of punch-through is there a way to turn it off using txi files?


 


TR




Why would there be a problem with punch-through if the texture is 100% transparent? There's nothing to "punch through".


You can turn punch-through on or off in txi files. I never turn it on though because even though it fixes the blueish edges it changes the alpha. You don't get any semi-transparencies any more, everything is either completely transparent or not transparent at all and for textures that should have semi-transparent parts this looks even worse than the blue edge.


               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #28 on: September 27, 2015, 10:53:32 pm »


               

Thanks for the explanation Zwerkules. My experience of punch through is limited to the simple things I make. I have never seen the blue edges you mention. My experience is that you can place a single placeable that contains alpha on top of a placeable that has no alpha with no problems. The problem arises when you try to place two or more alpha containing placeables on top of each other where all detail is lost in those placeables and any non-alpha placeables in the pile, exposing the tile beneath.


 


If you wish to continue explaining to dense ol' me about this, can you either pm me or start a new thread as I don't want to hijack this one. Thanks.


 


TR



               
               

               
            

Legacy_kamal_

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
RE: Interesting Idea for Seasonal Tilesets
« Reply #29 on: September 28, 2015, 05:54:51 pm »


               

Cool stuff here, folks! Lovin' it.

I recall in NWN2 there was a useful method for creating 'deep snow' areas, where the snow lay over the terrain, matching the shape, and characters were knee deep or more in the stuff. I always liked that!

​​



If it helps in nwn1, I know how this is done in nwn2 as I've done it. It's not a trick that can be done dynamically. What you do in nwn2 is create a copy of your area, and in this copy you set the ground to whatever height you'd like (lets say one meter below where it was for the "deep snow" example, or you could raise it to walk on air. Then you bake the copy area so the walkmesh is generated. You take the original and copied areas and use a tool to break the area into it's constituant parts (content, objects, and most importantly the walkmesh). Then you use the tool to replace the walkmesh of area one with the walkmesh of area two and wrap the files back up into a cohesive area file. And viola, you are using a walkmesh from a second area in your first area.


What it looks like is being done here I'm not sure can be done in nwn2 as I dont believe the tiles have the anims to loop through. You could swap out vfx or even models, but you cant affect trees via any script and as far as I know the terrain textures can't be changed either.