Textures with DirectDraw
Hi!
I was wondering if it is possible to do this with DirectDraw:
I want to make a grass texture for the game we (me and some friends) are planning. Then on top of this, I want to render a "path" texture wich is actually any other texture. (Could be dirt or anything...) To get the "pathlooking" texture I want to fade the "path" texture in vertical direction, thus making it look like a path.
Like this:
_________________________________________________________
|
| grass texture
| __________________
| | _______ |
| |fade | | | grass texture
| | |dirt- | |
| | | t |fade|
| | | e | |
| grass texture | | x | |
| |fade | t | |
| | | u | |
| | | r |fade|
| | | e | |
thx
Sorry, it all messed up. Here comes a new picture
Hi!
I was wondering if it is possible to do this with DirectDraw:
I want to make a grass texture for the game we (me and some friends) are planning. Then on top of this, I want to render a "path" texture wich is actually any other texture. (Could be dirt or anything...) To get the "pathlooking" texture I want to fade the "path" texture in vertical direction, thus making it look like a path.
Like this:
_________________________________________________________
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|xx grass texture xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIIIIIIIIIIIIIIIIIIIII xxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx fade CCCCCCCCCCCC IIII xxxx grass texture
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC IIII xxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC fade xxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII dirt-texture IIII xxxxxxxxxxxxxxxxx
|x grass texture xx IIIII CCCCCCCCCCCC IIII xxxxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx fade CCCCCCCCCCCC IIII xxxxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC IIII xxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC fade xxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC IIII xxxxxxxxxxxxxxx
thx
Hi!
I was wondering if it is possible to do this with DirectDraw:
I want to make a grass texture for the game we (me and some friends) are planning. Then on top of this, I want to render a "path" texture wich is actually any other texture. (Could be dirt or anything...) To get the "pathlooking" texture I want to fade the "path" texture in vertical direction, thus making it look like a path.
Like this:
_________________________________________________________
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|xx grass texture xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIIIIIIIIIIIIIIIIIIIII xxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx fade CCCCCCCCCCCC IIII xxxx grass texture
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC IIII xxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC fade xxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII dirt-texture IIII xxxxxxxxxxxxxxxxx
|x grass texture xx IIIII CCCCCCCCCCCC IIII xxxxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx fade CCCCCCCCCCCC IIII xxxxxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC IIII xxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC fade xxxxxxxxxxxxxxx
|xxxxxxxxxxxxxxxxxx IIIII CCCCCCCCCCCC IIII xxxxxxxxxxxxxxx
thx
I don''t think so. I think it has the API functions for doing it, but it was never supported. You really need to either blend it yourself in software, or use a 3D API such as Direct3D or OpenGL. You might want to look for some sort of library that gives you 2D functionality over a 3D API for you.
[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]
[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]
Just use bitmaps and blit to your grass texture and use color keying to make the edges smooth. If your "path" will have to be blitted on to multiple kinds of textures...then you need to do your own blending - unless you want to have bitmaps for all possible textures being blitted over.
"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.
"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.
Check this out, it might be what you are lookin for.
http://www.gamedev.net/reference/articles/article934.asp
http://www.gamedev.net/reference/articles/article934.asp
Hell yeh man!
Thats even better than what I was thinking of
Thx guys
Special thx to Mr Bakbugawk
Thats even better than what I was thinking of
Thx guys
Special thx to Mr Bakbugawk
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement