Jump to content


Photo

Water


  • Please log in to reply
9 replies to this topic

#1 Jeroen

Jeroen
  • Members
  • 236 posts
  • Location:Noord-Brabant
  • Projects:Commandos BEL är bara smörja.

Posted 06 September 2018 - 05:35 PM

Someone (you H?) at some time posted this:

 

It suggests there are four different water bmps. Probably not. Or one bmp shown in different ways. If the game loads only one watery bmp then how is this vid done?

I've made my own version which I can show if anybody wants.



#2 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 610 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 06 September 2018 - 08:11 PM

I used this image for the demonstration:

Attached File  MAR0DST_NEW.BMP   65.05KB   139 downloads

 

Now I'm curious, please show us your version! :D



#3 Jeroen

Jeroen
  • Members
  • 236 posts
  • Location:Noord-Brabant
  • Projects:Commandos BEL är bara smörja.

Posted 06 September 2018 - 08:53 PM

I'm very happy there's only one bmp. This is useful as I can see I exaggerate the movement.

 

OK attaching a zipped exe works. I compiled this myself so I'm pretty sure there's no virus in there.

 

Download the bmp from H's post and rename it wtr.bmp. Or try your own bmp, same size, higher colour depth is possible.

Attached Files


Edited by Jeroen, 06 September 2018 - 10:28 PM.


#4 Maurice1976

Maurice1976
  • Members
  • 85 posts

Posted 07 September 2018 - 08:27 AM

Isn't it so that the game can mirror and flip graphics? I realise it's been a while since I've looked at it, but I do recall closely examining the water in the first mission and seeing that they are using different rotations of that same water graphic. What they also do, by the way, is overlay them on top of one another, so you don't see repetitive patterns when zooming out.



#5 Jeroen

Jeroen
  • Members
  • 236 posts
  • Location:Noord-Brabant
  • Projects:Commandos BEL är bara smörja.

Posted 07 September 2018 - 02:25 PM

The bitmap seems to be flipped along the diagonal line top-left-to-bottom-right. But why? Does the water bmp have a mask file? I can't find it in the Fase0003 (The Great Escape) files. MAR0DST.BMP is there.

Multi-layer sounds interesting, with different movements, both layers must have some transparency to see the diver.

 

edit: OK, for multi-layered water it makes sense to change the appearance of one (or more) layer. Also the math for layers can differ.

 

edit: No I don't think there are multiple layers. Look here from 3:20 onwards, I don't see it.

 

https://www.youtube....h?v=OHTlTSh3qCU Do you?

 

edit some more: attached is a version with a png that has mar0dst.bmp combined with the gray masking bmp inside to make MAR0DST192.png. Two pngs are drawn with overlap.

Attached Files


Edited by Jeroen, 07 September 2018 - 06:07 PM.


#6 Maurice1976

Maurice1976
  • Members
  • 85 posts

Posted 07 September 2018 - 06:26 PM

I just checked some of the .VOL files to see about the mirroring and all, but I actually couldn't find any at first glance.

 

But with respect to the overlaying of those tiles, this is an excerpt of one of those .VOL files:

 

    TILE        1894,1553,  79, 318,1903, 519, 0,"MAR0DST.BMP","   "
    TILE        1973,1594,  79, 339,1981, 560, 0,"MAR0DST.BMP","   "
    TILE        2052,1639,  79, 328,2060, 603, 0,"MAR0DST.BMP","   "
    TILE        2131,1690,  79, 313,2138, 653, 0,"MAR0DST.BMP","   "
    TILE        2210,1738,  79, 306,2216, 702, 0,"MAR0DST.BMP","   "
    TILE        2289,1782,  79, 310,2295, 746, 0,"MAR0DST.BMP","   "

 

Since the tile is 256x256 pixels, these coordinates are not bordering eachother, but actually partially overlapping one another. This gives a semi-random feel and look to the water, especially since the color variations are also subtle - and moreover, the function that governs motion applies to them all and causes all of them to move, bob and wave, making it even harder to see where they overlap. However, by this overlapping you will not see a global pattern at regular intervals in the water; the human eye is somewhat sensitive to such patterns, hence this overlapping disrupts that effect.

 

If you look very closely when in a mission, you can identify various tiles ... but during normal, regular gameplay you won't notice it, mostly because the water is just backdrop, not the center of your focus and attention.



#7 Jeroen

Jeroen
  • Members
  • 236 posts
  • Location:Noord-Brabant
  • Projects:Commandos BEL är bara smörja.

Posted 07 September 2018 - 10:26 PM

Also there is no movement (deformed MAR0DST.BMP) near the shores, the shore is drawn after water.

 

edit: NVM.. I found PANT.. and ORIL.. etc. bmps


Edited by Jeroen, 08 September 2018 - 08:00 AM.


#8 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 610 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 08 September 2018 - 03:32 PM

I don't think that they used any overlapping in BEL.

When you zoom out, you can easily spot the repeating pattern.

Screenshot (188).png

 

Some time ago, I played around in javascript to create a similar water effect. Works best in Firefox. But it requires lots of CPU power.

Attached File  animated_water.zip   698.25KB   122 downloads



#9 Jeroen

Jeroen
  • Members
  • 236 posts
  • Location:Noord-Brabant
  • Projects:Commandos BEL är bara smörja.

Posted 08 September 2018 - 07:12 PM

That's a great looking animation. I chose not to calc. sine in real time but use pre-calc arrays.

float uitslag_a[256];
for(i=0; i<256; i++)
{
  uitslag_a[i] = 12 * sin(twoPi * i/256);
  uitslag_b[i] = 8 * sin(twoPi * i/256);
}

I can make few others with different amplitudes and/or different trillingstijd / Schwingungsdauer but it is a static way of doing things. Very light on the cpu though.

Only horiz. and vert. movements are OK in my program. I need to work on diagonals.



#10 Jeroen

Jeroen
  • Members
  • 236 posts
  • Location:Noord-Brabant
  • Projects:Commandos BEL är bara smörja.

Posted 12 September 2018 - 07:21 PM

That took me a little while but now it can do directions, speeds etc. Ready to be used in "Comandos.exe", I don't call it that for nothing.

Attached Files






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users