Graphics effects

BlitzMax Forums/BlitzMax Programming/Graphics effects

Czar Flavius(Posted 2010) [#1]
I was wondering if anyone knows how to get a kind of graphics effect I'm looking for. In the game it just uses the bland grass image tiled, but I've touched the screenshot up a bit to give a concept image. Notice the different shades of grass and the black marks under the turret. Are there any ways to dynamically "paint" this kind of effect on the ground in my game? Or do I need to create a variety of pre-worked tiles and choose from that selection?

http://www.shattered-design.com/download/file.php?id=99


Dreamora(Posted 2010) [#2]
dynamically paint no, but you could draw images with alpha ( clouds ) ontop of the grass to achieve that for example.


Czar Flavius(Posted 2010) [#3]
Could you explain that further please? I'm new to alpha channels and things.


shinkiro1(Posted 2010) [#4]
Use a 2D bitmap program such as Photoshop, Gimp or whatever you use and paint your image on a transparent layer (with no bg color). When you are finished painting reduce the visibility of the layer. Export the image as a *.png (save the alphachannel if there is an option).

In BMax before drawing the image use:
SetBlend SHADEBLEND

or
SetBlend LIGHTBLEND

A mixture of both might give interesting results ;D
Also experiment with the intensity (SetAlpha 0..1)

I haven't tested this but i guess it should give you the desired effect.


siread(Posted 2010) [#5]
I use lightblend to achieve different styles on my football pitch...




This is my grass textures which I tile normally...


Then after SetBlend(LIGHTBLEND) and SetAlpha(0.1) I tile the desired "mow" style...



Czar Flavius(Posted 2010) [#6]
Thanks that seems perfect! :D


Oddball(Posted 2010) [#7]
Also,
SetBlend MOD2XBLEND
would be useful for this. Unfortunately I've been unable to persuade the powers that be to add it.