Blood on hit enemy

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
katze555
Posts: 28
Joined: Tue Mar 23, 2010 7:13 pm

Blood on hit enemy

Post by katze555 »

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
Last edited by katze555 on Thu Feb 24, 2011 7:43 am, edited 1 time in total.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

you have thought of the way to achieve the effect you want why don't you try?
katze555
Posts: 28
Joined: Tue Mar 23, 2010 7:13 pm

Post by katze555 »

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
Last edited by katze555 on Thu Feb 24, 2011 7:43 am, edited 1 time in total.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

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.
bonsalty
Posts: 120
Joined: Thu Dec 10, 2009 1:30 pm
Location: Budapest,Hungary

Post by bonsalty »

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
Post Reply