i want to write something to have blood on enemy skin when i hit it with a weapon (could be used for thinks like bulletholes, too).
the idea i thought of is to get the texture of the enemy, modify it and reattach it to the enemy or maybe use the different texture layers for this?
would something like this be possible??
________
HERBAL STORE
Blood on hit enemy
Blood on hit enemy
Last edited by katze555 on Thu Feb 24, 2011 7:43 am, edited 1 time in total.
you have thought of the way to achieve the effect you want why don't you try?
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
because i dont know how to do it. i do not even know if this is possible with irrlicht or maybe doesnt make sense
________
Angelina Jolie
________
Angelina Jolie
Last edited by katze555 on Thu Feb 24, 2011 7:43 am, edited 1 time in total.
One easy way that I am thinking about is to have two textures, one "normal", other "bloody". Than based on nearest vertex "been hit", set that vertex alpha and use EMT_SOLID_2_LAYER material or shader to show "bloody" texture at it.
This might not work well (look bad) with meshes composed with vertices too far away from -or too close to each other. But for usual humanoid meshes should work fine.
Another simple way would be to write shader which will add red colour around marked vertices (based on their alpha or other way designated).
If you need something more precise (for individual bullet holes for example) I have no idea. For static meshes you would use decal scene nodes normally. Search for "decals" to see more.
This might not work well (look bad) with meshes composed with vertices too far away from -or too close to each other. But for usual humanoid meshes should work fine.
Another simple way would be to write shader which will add red colour around marked vertices (based on their alpha or other way designated).
If you need something more precise (for individual bullet holes for example) I have no idea. For static meshes you would use decal scene nodes normally. Search for "decals" to see more.
I think they use transparent polygons in games when dealing with walls. Its faster putting polygons plane parallel then holding 100 different textures in memory. Im not a game programmer nor Sherlock Holmes, but this is the right way. In the games you can also see that bullets disappear after time. So bullets must be objects/polygons which have to be limited in number, thats why they disappear. So forget the textures.
Tomi