TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 1 of 2 12 LastLast
Results 1 to 25 of 31

Thread: Possible water tutorial

  1. #1
    Member
    Registered: Oct 2002
    Location: UK

    Possible water tutorial

    This is all the stuff I've learned about water recently. I might submit this to Dromed Central's tutorials but first, please comment, clarify, question, or correct in case I've missed something or done something stupid and I'll alter it before submitting...


    This assumes you know Dromed basics, how to create brushes, etc. Remember to portalize after creating air, solid, water, flood brushes, etc. It does not include anything about drips, drops, particles, fountains, or other special effects etc but just ordinary water.

    To add water, create a water brush anywhere. You can create any shape of water right in the middle of air or solid but assuming you want, eg, a swimming pool with the water slightly below the level of the top of the pool then create an air brush in the 'ground' then add the water brush.

    An easy way is to clone the air brush using the Insert key then change that new cloned brush from air to water. You will probably also want to to lower the water below the level of the 'ground' by resizing and moving it down. Makes sure it still fits snug though (use snap) else you get odd shimmers and gaps at the edges.

    If you intend the player to be able to dive into the water then drag a room brush round the whole thing else sound will not be heard underwater (think this also does need the airbrush). Don't bother for shallow water, kitchen sinks, etc.

    An alternative to the water brush is the flood brush. Whereas the water brush will carve out whatever shape you make it through both air and solid, the flood brush will only form a shape in air and not solid. So, a water cube brush half way into the ground will display as a hole in the ground full of water which exends up like a jelly into the air. But a flood cube brush half way into the ground will display only the upper part showing above ground - it will not penetrate the ground. So...

    This can be used eg, to fill irregular air shapes in the ground without carving out unwanted parts. For example, create a dodecahedron air brush half embedded in the ground. This creates a depression suitable for a pond. If you clone it and change the clone to water (or flood) then you will have the water sticking up out of the ground in the fulll dodechedron shape. Instead, create a cube FLOOD brush slightly below ground level surrounding the air shape. Portalize and you will see there is water in the bottom of the pond. If you now change the flood brush to water and portalize you will see it carves out the whole cube underground and does not merely fill the air brush pond shape naturally.

    There are other types too...

    Evaporate - Dunno - it must have evaporated!

    Solid->water - This convert any solid within its shape to water so a solid->water brush half immersed in the ground would create a pool of water with the top of the water exactly at ground level.

    Solid->air - Carves air out of solid but leaves water alone. So such a shape carved down through a pond into the bed of the pond would leave the water the same but create an air pocket in the bed of the pond.

    air->solid - Shows as solid but only in air. So half immersed in water would only be solid above water but not below which would remain water. Looks like a solid floating on the water.

    water->solid - Shows as solid but only in water. So half immersed in water would only be solid BELOW water but not above which would remain air. Looks like an island level with the top of the water.

    blockable - Dunno!



    Now you need to create and drag a FLOW brush round the water brush much like you add a room brush round an air brush. Just as with a room brush, make sure it is just slightly larger than the water brush all round.

    Take a lot of care checking for overlaps of flow brushes, etc. else you can get eg, coplanar errors. I recommend you optimize afterwards to make sure.

    Now the various settings...


    Menu: Editors > Mission Parameters > Water Colors...

    1. Sets the UNDERwater color and degree of translucence (ie, how clear or muddy when you dive in) the water will be for any flow group with that index (0 to 3). The default index for any new flow group is 0 but can be changed in the flow group properties (see below)

    The UNDERwater colors are shown as eg, Color N Red Color N Green Color N Blue ...where N is the index number. Range is 0 to 255. Examples: 255 0 0 is bright red; 255 255 0 is bright yellow; 255 255 255 is bright white; 0 0 0 is black; 0 0 150 is medium blue and so on. Experiment.

    The thickness or transparency of the UNDERwater view is set with the alpha setting in the range 0 to 1. Default is 0.35 which is slightly cloudy; .7 is very murky; 1 or above is totally opaque; and 0 is totally clear. So Red, Green, Blue, Alpha of 100 0 100 90 would be very thick magenta (pinkish purple) while 80 80 80 50 would be murky grey.

    2. In addition, the alpha for index 0 also sets the thickness of the water as seen from ABOVE the water IF the surface texture allows for viewing INTO the water (ie, is not totally opaque). I don't know if that is a fault or what but the alpha in the other index groups has no effect on the surface that I could determine. This unfortunately means you might dive into a muddy pool and find it very clear underneath or vice versa! An exception seems to be the default water texture 'gr' which always looked semi-translucent from above to me even if the alpha was set to thick and was thick when you dived in.

    A thick alpha, eg, 1, can create a nice blue Disney ocean.



    Flow Group Edit area:
    This is shown at the bottom centre of Dromed when you highlight the flow group. You can have different flow groups numbered 1 to (16 plus?) each with different appearance settings for your water.

    Change the group number in the box at the top of the group edit area as needed.

    You use the same group for numerous water brushes if they are to look the same, eg, all green and flowing north south; another group for several static blue pools you might have elsewhere. So you don't necessarily need a separate group for every body of water in your mission unless they vary in appearance.

    I found you only needed to use 'Update in World' if you changed the group NUMBER but not if you change any settings elsewhere.



    EDIT GROUP:
    This has a particularly vicious anti-mouse relationship which means you'll probably get jerky mouse movement in and around it. In particular, it doesn't like OPTICAL mice! Mine would completely crash Windows requiring a reboot 99 times out of 100 just by clicking on the 'Edit Group' option! If you get this problem you might consider plugging in a ball mouse temporarily when you need to use this. I still got the crash occasionally even with a ball mouse so I recommend you save EVERYTHING in Windows you need to before touching these until you get confident it won't crash.


    ANCHOR x, y, z : These do two things...

    1. They allow you to align the water texture much like you align a brush texture. 99 times out of a 100 you can ignore this because the water is just shimmering and flowing and it doesn't matter how it aligns. Use it for aligning stagnant crusty looking surfaces or special graphic effects.

    2. They allow you to set the centre for rotation (see below).



    ANGLE (0 - 360) : Sets the angle of direction of the water texture. Same comments apply as in Anchor 1 above.



    x,y z change/sec : sets the current flow rate...
    x + for south, - for north
    y + for east, - for west
    z + for up, - for down

    I think Garrett can barely manage 2 so 2 would mean you couldn't swim against the current but just about hold your position (without a speed potion). This flow also affects objects that are floating or in the process of sinking in the water, eg, a barrel or crate will move with the current flow.



    ANGLE CHANGE/SEC - Sets the surface texture rotation around the coordinates defined in the anchor settings.

    1 (slow) to 179(fast) is ANTI-clockwise and...
    180(fast) to 359(slow) is clockwise.

    A gently rotating current in a closed pool or kitchen sink might look more effective than a directional flow. To set this, just copy the X, Y, Z of the flow brush from the bottom left corner of Dromed into the anchor settings to get the centre. You can always tweak it off centre if you want.

    NOTE: This rotation does NOT affect the current flow but only the surface appearance. A crate thrown into a whirlpool will just float it one place!

    NOTE: If you use rotation and current flow rate together you will get odd results - probably not what you expect. The texture will move in the set direction and rotate round a new coordinate. You might get some nice swirly effects but a true working whirlpool looks hopeless.

    I've made one for my FM but had to settle for a fast surface rotation and DOWNward current which pulls down anything that falls in so nothing floats on the surface to look silly. It's a pity; initially I had one water brush, four flow groups in a 2 by 2 square to simulate a rotating current, and a surface rotation around the centre of the water brush. An inverted cone airbrush made it look great and when you fall in its like being at sea in a storm with Garrett thrown around and round, sometimes breaking surface, sometimes pulled under. If you want an ocean effect then this is the way to go! But as a whirlpool on its own the the surface looked wrong from above as it did not look like a rotation because the current flow demolished the rotation appearance.

    axis (0=x, 1=y, 2=z) - Water surface texture is only displayed on two opposing surfaces of the water brush. If you have water in a tank and can see it from the side then the surface you see is fragmented pixels of the surface. This is because the default axis is set to z (up and down). You can change this to x (north south) or y(east west). If you tilt a water brush, eg, at 45 degrees, then you will get a stretched version of the surface texture depending on the angle.


    TEXTURE NAME - The name of the surface texture. As provided, you can use...

    gr - translucent green shimmering water
    bl - translucent blue/green shimmering water
    vm - translucent vermillion (reddish) shimmering water
    L3 - opaque static lava
    L4 - opaque bubbling lava

    (see below for how to add your own)



    USED? - Dunno! Could not find any difference whether checked or unchecked.




    PROPERTIES:

    Add > Renderer > water flow color index
    Select index 'group' 0 to 3 (default=0) as used in...
    Editors > Mission Parameters > Water Colors (see above).

    Add > Renderer > water texture color : R, G, B, Alpha
    No effect that I can see

    I could find no other effect with any other Renderer settings I fiddled with. I noticed 'Has Ref's is set by default to FALSE. I changed it but could see no difference. Still, I left it alone set at FALSE just to be safe.



    ADDING YOUR OWN WATER TEXTURES:

    You can add your own water textures but all water textures share a single palette of 256 colors.

    Water textures are pcx image files being rectangles with sides of 16, 32, 64, 128, or 256 pixels. The must be 256 color, fixed palette format. They should be added to a folder...

    Thief\fam\waterhw

    The filenames should be in the form (any case)...

    Still surfaces:
    nameIN.pcx (The surface viewed from above)
    nameOUT.pcx (The surface viewed from underwater)

    Animated surfaces (eg, shimmering, bubbling) are made from multiple files, one for each frame...

    nameIN,pcx, nameIN_1.pcx, nameIN_2.pcx
    nameOUT.pcx, nameOUT_1.pcx, nameOUT_2.pcx

    'name' can be any length (though I've not tried filenames longer than 8 chars) not just 2 characters as in those provided but maybe it saves a few bytes in the mission to keep them short?

    The palette is stored in a full.pcx. If you don't create one then the default is used. This is stored in the zip file \RES\FAM.CRF along with the default water texture files, eg, grIN_1.pcx, etc. These can be extracted with eg, WinZip and modified and put in Thief\fam\waterhw. The Thief program looks here first and will use any it finds before the defaults.

    The full.pcx can just be any of your frame files, eg, nameIN.pcx copied and renamed to full.pcx. It is recomended you reduce its size to 16 by 16 to save space. The full palette does not need to be USED in the image; it only needs to be the palette available for its use (visible in any paint software).

    Except for special effects, etc. all frames should use the same palette.

    If you want to also use the default water textures or lava in your FM as well as new ones of your own then you must load the palette from the provided full.pcx in FAM.CRF (see your paint software which should have an option to save/load a palette)

    Having even a single pixel of Palette Number 0 (zero) in your texture will render ALL other colors to be opaque; otherwise they are rendered translucent according to the alpha setting (see above). This can be used to great effect, eg, cracked ice flows, scummy water, etc. But note that Palette 0 itself is rendered transparent (depending on alpha setting) so a single sheet of white ice with a dot every 256 pixels looks odd. Lose the zero dots in the cracks etc.

    For a pure sheet of opaque color (assuming the universal alpha is semi-transparent) then you might use L3 and maybe L4. These seem to be handled differently and rendered opaque anyway. So if you don't need static lava, two single pure white image files named L3in.pcx and L3out.pcx should do the trick. Could be used for ice or milk?

    I don't think there is any way to set the frame rate except by increasing/decreasing the number of frames (eg, duplicate frames to slow down)

    I noticed that if I simply extract the 'bl' files and drop them in the Thief\fam\waterhw folder then the shimmer looks slower. Why? Or am I imagining it?

    Normal solid and air brush textures can be animated in a similar way (just put the frames and full.pcx in Thief\Fam\Name and add the texture to Dromed). But Palette zero only shows as transparent in the Dromed View window or with light bright in-game. If you really want transparency then try a water texture instead. I'm experimenting with a fluttering flag. Problem is that there is only one palette so you are drastically reduced to using the default or partially modified full.pcx or maybe not using water in-game and creating a completely new full.pcx palette.

    Finally, I, and others, have sometimes found that the default blue water 'doesn't work' and the water looks green. Sometimes I thought I had the answer. I've tried different things and got more confused. It might be, as someone suggested, that setting the index group number in the flow brush properties, might get it to work. Possibly also needs reportalizing or something. I found nothing absolutely conclusive or definitive. If anyone can figure it out then let us all know.

  2. #2
    Member
    Registered: Apr 2001
    Location: Lost in the BSP...
    Oh, for shame!

    No one responded, and poor Jabberwocky is looking for just such a thing as this.

    So, I paired you two up in this thread:
    http://www.ttlg.com/forums/showthrea...058#post879058

    (You two should talk amongst yourselves...)

  3. #3
    Member
    Registered: Feb 2003
    Location: Stalking the Tumtum tree
    naughty bad evil unkind not-nice and thanks.

    Learn from my mistakes, use or suffer the wrath of Hit Deity!

  4. #4
    Member
    Registered: Apr 2001
    Location: Lost in the BSP...
    No!! No, no, no,

    No wrath, no suffering, only nice taffers. Nice taffers with coneys for Hit Deity. He will shows thems the ways......

  5. #5
    Member
    Registered: Jun 2003
    Location: Düsseldorf, Germany
    Heh, this is why I always save interesting threads. My "answers" directory is 6MB already.

  6. #6
    Member
    Registered: Oct 2003
    Location: central california
    Dear Fidcal,
    This is AWESOME, I wish the general Dromed Tuts had incluced HALF the stuff you did in here, thanks SO MUCH!!!
    Rachael

  7. #7
    Member
    Registered: Dec 2000
    Location: Finland

    More about water

    Ranstall Water and Lava -tutorial

    This is a very helpfull tutorial about water and particle effects for beginners.

  8. #8
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Bohn Museum
    Thorin's Water tutorial is also very good.


    [edit]
    Whoa! They're the same tut! I don't know who's the original author now...
    [/edit]

  9. #9
    I am.

    And not happy someone else tries to steal my doings.

    *waves a big pointy stick around*

  10. #10
    Member
    Registered: Jan 2003
    Location: New York, NY
    Originally posted by Ieldra
    Heh, this is why I always save interesting threads. My "answers" directory is 6MB already.
    Really, mine's only about 500KB...

    ...and it's called CompleteTut!

    Spike14

  11. #11
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Bohn Museum
    Originally posted by Dashjianta
    I am.
    Wish I'd known, I assumed it was Thorin's and credited him with the idea for watervators which I used extensively in my RGB FM for Contest 4. I'll fix the readme and get it to Jason ASAP. My apologies. And I mean no offense to you, either, Thorin - the assumption was my fault, and I should have confirmed that you were the author before giving you credit publicly.

    Alex, nice to see you around! People were expressing just recently in the FM Forum that they wish you'd finish Carnival, and I feel the same way.

  12. #12
    Member
    Registered: Oct 2002
    Location: UK
    Originally posted by rachael1
    Dear Fidcal,
    This is AWESOME, I wish the general Dromed Tuts had incluced HALF the stuff you did in here, thanks SO MUCH!!!
    Rachael
    I'm pleased this has helped and thanks for letting me know!

  13. #13
    Alex, nice to see you around! People were expressing just recently in the FM Forum that they wish you'd finish Carnival, and I feel the same way. [/B]
    I wouldn't know how - seriously. I've forgotten so much about Drom I'd prolly struggle to build a simple room. (ok, not quite that much)

    The stick waving was in jest, btw, in case that went down the wrong way.

  14. #14
    Member
    Registered: Jan 2003
    Location: New York, NY
    Originally posted by Dashjianta
    I wouldn't know how - seriously. I've forgotten so much about Drom I'd prolly struggle to build a simple room. (ok, not quite that much)

    The stick waving was in jest, btw, in case that went down the wrong way.
    Ah! CompleteTut's for you...then?

    Just wait...five more minutes and I'll have version 1.4 up and running!

    Spike14

  15. #15
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Bohn Museum
    @Dash: If you were to communicate to me your ideas for finishing it off and gave me your permission, I could attempt to complete it as you had envisioned... with your blessing, of course. It's always seemed about 90% complete to me already, just needs a little polishing and to finish up the ending. PM or email me if you're interested.

  16. #16
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements

    NECRO

    Quote Originally Posted by Fidcal View Post
    ADDING YOUR OWN WATER TEXTURES:

    You can add your own water textures but all water textures share a single palette of 256 colors.

    Water textures are pcx image files being rectangles with sides of 16, 32, 64, 128, or 256 pixels. The must be 256 color, fixed palette format. They should be added to a folder...

    Thief\fam\waterhw

    The filenames should be in the form (any case)...

    Still surfaces:
    nameIN.pcx (The surface viewed from above)
    nameOUT.pcx (The surface viewed from underwater)

    Animated surfaces (eg, shimmering, bubbling) are made from multiple files, one for each frame...

    nameIN,pcx, nameIN_1.pcx, nameIN_2.pcx
    nameOUT.pcx, nameOUT_1.pcx, nameOUT_2.pcx

    'name' can be any length (though I've not tried filenames longer than 8 chars) not just 2 characters as in those provided but maybe it saves a few bytes in the mission to keep them short?

    The palette is stored in a full.pcx. If you don't create one then the default is used. This is stored in the zip file \RES\FAM.CRF along with the default water texture files, eg, grIN_1.pcx, etc. These can be extracted with eg, WinZip and modified and put in Thief\fam\waterhw. The Thief program looks here first and will use any it finds before the defaults.

    The full.pcx can just be any of your frame files, eg, nameIN.pcx copied and renamed to full.pcx. It is recomended you reduce its size to 16 by 16 to save space. The full palette does not need to be USED in the image; it only needs to be the palette available for its use (visible in any paint software).

    Except for special effects, etc. all frames should use the same palette.

    If you want to also use the default water textures or lava in your FM as well as new ones of your own then you must load the palette from the provided full.pcx in FAM.CRF (see your paint software which should have an option to save/load a palette)

    Having even a single pixel of Palette Number 0 (zero) in your texture will render ALL other colors to be opaque; otherwise they are rendered translucent according to the alpha setting (see above). This can be used to great effect, eg, cracked ice flows, scummy water, etc. But note that Palette 0 itself is rendered transparent (depending on alpha setting) so a single sheet of white ice with a dot every 256 pixels looks odd. Lose the zero dots in the cracks etc.

    For a pure sheet of opaque color (assuming the universal alpha is semi-transparent) then you might use L3 and maybe L4. These seem to be handled differently and rendered opaque anyway. So if you don't need static lava, two single pure white image files named L3in.pcx and L3out.pcx should do the trick. Could be used for ice or milk?
    I have a need for semi-opaque liquids in a variety of colors to place in vats. But the waterhw palette tends towards blue, green, and red/orange only.
    This sounds like a good case for using Bright to make a new single palette to include purples, yellows, browns, etc. (And how were you supposed to have a white? There is no white in the common palette ... ???)

  17. #17
    d. 30.4.16 Always remembered
    Registered: Apr 2002
    Location: in our hearts
    If you only need vats, and if the player don't has to swim into them, it doesn't have to be "real water", you can have an object that simulates water.
    Check Shadowspawn's "Raising water demo"., maybe you'll find it interesting.

  18. #18
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Players may want to wade in them ... maybe some health points lost ... maybe some goodies found ...

  19. #19
    d. 30.4.16 Always remembered
    Registered: Apr 2002
    Location: in our hearts
    Ah, I see..... Nevermind.

  20. #20
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Well ... I made a new FULL.gif to go along with my new textures in fam\waterhw, but it seems to keep using the old palette: i.e. they come up all weird colors ... the original water textures are OK ... but I converted all of them to gif using the new palette too, and saved them in fam\waterhw, so if they are OK why aren't the new ones OK? ... should I have used pcx for everything? I thought it didn't matter ...

  21. #21
    Member
    Registered: May 2008
    Location: St.Petersburg, Russia
    Quote Originally Posted by Lady Rowena View Post
    Check Shadowspawn's "Raising water demo"., maybe you'll find it interesting.
    Error 404. Where else can it be found? I didn't find it at the Keep.

  22. #22
    Member
    Registered: Jan 2000
    Location: Taylors, SC
    I gotta fix that site - move it and fix it actually.

    Anyway, go here;

    http://www.angelfire.com/games4/shadowspawn/

    Then click on the upper left icon (the sword and hammer). It then brings you to the right place. Apparently, angelfire is blocking any access except to the home page - then you can navigate.
    Shadowspawn's Thief Pages
    Darkness is always faster than light. No matter how fast light travels, it always finds the dark waiting for it.

  23. #23
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Quote Originally Posted by LarryG View Post
    Well ... I made a new FULL.gif to go along with my new textures in fam\waterhw, but it seems to keep using the old palette: i.e. they come up all weird colors ... the original water textures are OK ... but I converted all of them to gif using the new palette too, and saved them in fam\waterhw, so if they are OK why aren't the new ones OK? ... should I have used pcx for everything? I thought it didn't matter ...
    Just to let y'all know, changing the GIFs to PCX fixed the water colors. So I guess that only PCX format works for water. In any event, I now have nice golden and purple fluids as well as the normal blue, green, and vermillion.

    ... now if I can just figure out how to make them semi-opaque when I want them to be and not when not ...

  24. #24
    Member
    Registered: Jul 2009
    Location: South Dakota, USA
    Quote Originally Posted by LarryG View Post
    In any event, I now have nice golden... fluids...

    ... now if I can just figure out how to make them semi-opaque when I want them to be and not when not ...
    I do so hope that you intend to use that for molten gold and not some kind of sewer thing.

  25. #25
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Chemical vats.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •