Blood

Blitz3D Forums/Blitz3D Programming/Blood

WildStorm(Posted 2005) [#1]
Hi,
first of all, this text was made in cooperation with google ;)
I was searching for a good method to create nice looking blood on the ground (like here:
) and created a mesh witch i aligned to the ground. But the main problem is, that this code works with linepick, so it wasn't able to work with complex meshs (I hope you understand:) . The mesh must also have a very high polygonnumber to work exactly and this costs a lot of speed.
The next idea i had, was to create a texture, draw it on the map and copy the blood in this texture. But how can i calculate where the blood texture must be aligned to the texture (I mind (?) to copy the blood texture via copyrect in the texturbuffer of the texture for the level).
Is it possible?
Have you maybe an example?
Thx a lot for helping me :)


KuRiX(Posted 2005) [#2]
I think you should use sprites and blitz3d polygon collision. So you have the entity assigned a collision of slide collision, then take the normal of the collision (when collided) to set the orientation of the blood sprite.

This is a easy way, not 100% accurate, but good enough in most of the cases...


WildStorm(Posted 2005) [#3]
hm, but when the wall gos like this: _|
and the blood should be there: ^


KuRiX(Posted 2005) [#4]
|
______|
/\
|

If you mean in the corner, no problem, it will be a really
difficult case, and will take horizontal or vertical only...


JoshK(Posted 2005) [#5]
One of the betas of 'Metal' had gallons of blood filling the room any time you shot a guy.


Shambler(Posted 2005) [#6]
You should be able to modify this to work...

http://www.blitzbasic.com/codearcs/codearcs.php?code=1000


Jeroen(Posted 2005) [#7]
Perhaps you can linepick multiple areas of the place where the blood is splattered, and if one of those areas is in 'the air' (e.g in a corner of a wall) you replace the blood texture with a really small splatter thingie, to cover up the problem a bit. It will look more random too.


Kuron(Posted 2005) [#8]
halo (Posted 2005-02-09 11:45:12)
Better than anything you have ever done in your life, bitch.
Any moderator actually going to start moderating this nonsense? I do not know why Halo, of all people, does not get held accountable for the repeated violations of the forum rules.


NewtSoup(Posted 2005) [#9]
cheat - choose the closest planar surface to where the blood splat fell and stick the sprite to that.. so if it falls where it would be on a corner some part of it will be on the floor and some will be on the floor. the center of the sprite will 99.999 percent of the time be closer to one or the other. if you really really do end up with a perfect halfway split just make your algorithm always choose the wall and use a runny drippy sprite and then stick another on the floor for a few spots directly below it (or a pool if you want to go ott :D )


Storm8191(Posted 2005) [#10]
What about doing a sort of particle effect with the blood? Have it spray from a given location, in partially random directions and speeds, and give each of the particles a collision state, with stop collision. When the particle stops, put a blood splatter there (probably most easily done with a sprite), even if it's on a moving object. It might even be effective for slow-mo combat as well.

Just an idea I had. Not sure how effective it'd really be.


Jeremy Alessi(Posted 2005) [#11]
Create an invisible bouncing ball that lasts for a certain period of time. Place blood spatters on all the places it collides with. With a wall floor for example it can bounce off either and make blood appear in a corner.


WildStorm(Posted 2005) [#12]
@jeremy
Jea, thats a nice idea.
@shambler
I tested the code, but there are anti-textures (also known as antishadows) and the effekt doesn't look really nice, cause of the low polycount.
@Storm8191
Also a nice idea. But I think the particle count would be very high after some kills.
@Luke Skyscraper
Sorry, but I don't understand this part: some part of it will be on the floor and some will be on the floo


NewtSoup(Posted 2005) [#13]
basically what I meant was ignore corners completely and put the splat on either the wall or the floor, rather than trying to model splash on 2 or more perpendicular surfaces.


WildStorm(Posted 2005) [#14]
Ah ok.
Yes, this is the 'best' solution I think ^^
Using particles and applying them on the ground costs a lot of performance, because there must be a lot of particles to give the whole a nice look.
Thanks for your help. In the german forum nobody cares the topic (or gave stupid answers).


Jeremy Alessi(Posted 2005) [#15]
In that Max Payne shot I only see the need for 4 particles ... how much blood do you really need.


nawi(Posted 2005) [#16]
Screenshot of your game looks very good


Picklesworth(Posted 2005) [#17]
Just as long as you don't overdo it like some games, it should be okay.
Could you continue along the linepick somehow (I dont' know how to do this or if its possible) used for the bullet fired to get the direction that the blood splats, and then have a fuzzy angle to make it less perfect?


Jeremy Alessi(Posted 2005) [#18]
Of whose game?


WildStorm(Posted 2005) [#19]
@Jeremy Alessi
Oh, sorry, I misunderstood your post :)


flying willy(Posted 2005) [#20]
www.redflame.net/files/fpstest.zip