Jump to content
johnnyboy

How to create blood stains on ground, bullet hit blood fx, and burning shard fx

Recommended Posts

I love these new Arma 3 effects:

- Bullet hit blood effects with meat chunks flying

- Blood stains on ground

- Burning pieces of metal flying and burning on ground after vehicle explosion

- Blood effects underwater

I need to create these on demand for cut-scenes and scripts. Anyone know the Drop commands needed for these? Where should I look for the particle or billboard object names?

  • Like 1

Share this post


Link to post
Share on other sites

There is a new command for A3, setParticleClass, that can be used to manipluate some of the new effects. I have not used it yet, but it appears to simplify a lot of the work. If you search for serParticleClass, there are a couple of threads. That being said, you could probably still use drop and particle sources to manipulate as well. All of the new particle parameters and the particle models can be found in CfgCloudlets by dePbo'ing data_f or via the Six Config Browser or the Community Modding Bible.

Edit:

I also believe DMarkwick uses the underwater bleeding effect in JTD Flies for ArmA3, so you may want to check that out as well.

Share this post


Link to post
Share on other sites

for your 1st and 3rd point, you need to use particles arrays and create a particle source on an invisible object that you put where you want via a script.

how to use particle arrays: https://community.bistudio.com/wiki/ParticleArray

It takes a while to figure out how it works on your own, so read it really carefully (specially the part about how to select which particle you want to emit!).

The path for arma3 particles (you need to change it in the code example in the wiki) is: \A3\data_f\ParticleEffects\Universal\Universal.

I don't know how to make blood stains on the ground and would be interested to know the answer too.

Share this post


Link to post
Share on other sites

Bump.

Does anyone know how to create a bloodstain on the ground?

For a mission I am working on I need a trail of blood for player to follow.

Thanks in advance!

Share this post


Link to post
Share on other sites

Bumping again. Anyone know how to create a pool of blood on the ground?

Share this post


Link to post
Share on other sites

An upended User Texture is the way to go! :) Plus, it allows you the freedom to create the exact effect you wish to convey.

Share this post


Link to post
Share on other sites

Kydoimos: Please explain "upended User Texture"...I do not understand. An example code snippet would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hiya - I mean the User Texture object - and by upended I mean using the setVectorDirAndUp command to get the positioning right :) I'll dig code out for you soon if you still need it!

Share this post


Link to post
Share on other sites

Hi guys, in case you still need a code snippet - this one worked for me:

bloodstainonground setVectorDirAndUp [[0,0,-1],[0,1,0]];

But now the whole story:

You need a .png file with transparent background and the blood on it.

Then you convert it into .paa and put it in your mission folder. Let's say it has the name blood.paa and you have put it in the folder pictures in your mission folder.

Then, in the editor, create a User Texture (Side: Empty; Class: Helpers; Unit: User texture (1m)).

Name it bloodstainonground and put in the init: this enableSimulation false; this setObjectTexture [0, "pictures\blood.paa"];

Now, in the mission's init (or somewhere else - I think even in the init of the User Texture works) you put the code above.

This should do it. If necessary, you will have to change the height of the User Texture. But change it BEFORE you use the code above.

Share this post


Link to post
Share on other sites

Regarding the above stuff here, I've got several blood splatter .png files with a transparent background but when I specify that folder and run ImageToPaa from the Arma 3 tools it says ready, I click on convert, popup about convert all of them blah blah, the progress bar files up then the status says "Ready" but nothing else happens. What am I missing? Do I close the ImageToPaa now and use something with FileBank?

Also after I run the conversion when I open the folder with the blood files in it and click properties they still show up as .png so am I doing this whole thing wrong? Any help would be appreciated!

Taken from: http://forums.bistudio.com/showthread.php?179337-Pictures-containing-partial-transparency-amp-kept-same-visual-dimensions-for-any-res

Thanks a lot, very helpful. BTW this:

Just solved by using to paa-ize the image "ImageToPAA" component of Arma 3 Tools instead of TexView2. However, unlike TexView2, that new tool accepts only 2^x,2^y dimensions, ignores the rest. And, a side note for Arma devs, I had real difficulties to locate Arma 3 tools launch option (first time tried them). Was forced to google the answer, where should I go in the Steam. Bah. Only because I read about them somewhere on these forums, I was awared about their existence, so I knew, so I may try to find such thing. Why it is so hidden feature?

EDIT: problem with partial transparent pictures was solved same way - by using Arma 3 Tools to paa-ize instead of TexView2.

I'm assuming this is with the dimensions of the .png files but how would I check/change them?

Sidenote: I realize this post was created in May but the last response was still in August so I hope this isn't too much of a bump...

8/28/14: Okay disregard the above I figured it out. One last problem I'm having though, how to you get the texture to be flat like it is on the ground rather than vertical?

Edited by Dieinthedark
New question

Share this post


Link to post
Share on other sites
8/28/14: Okay disregard the above I figured it out. One last problem I'm having though, how to you get the texture to be flat like it is on the ground rather than vertical?

bloodstainonground setVectorDirAndUp [[0,0,-1],[0,1,0]];

Share this post


Link to post
Share on other sites

Thanks alot guys, I appreciate it. (Better to give thanks late, rather than never!).

BTW, any of you guys want to upload your bloodstain .paas for the community to use?

  • Like 1

Share this post


Link to post
Share on other sites

When i try to put a blood stain texture on the floor it comes out all grey and even when i put the same texture on a sign it comes out grey. Anyone have any idea why this maybe?

Edit: Ok I got it working by making sure my image was of the power of 2 and dropping it on to imagetoPAA.exe. Now it shows up in colour :cool:

If anybody else wants a working blood splat .ppa image - here is the first one I have made Tinyupload Link

2014_10_19_00001.jpg

Edited by Anthonyfromtheuk

Share this post


Link to post
Share on other sites

Sorry to resurrect this older thread but I am doing a similar mission where the players are tracking a wounded unit.

 

I'm using "UserTexture1m_F" and applying a blood drip texture to it. Using setVectorDirAndUp I can get the normally vertical object to sit on flat ground just fine and the blood drips at a random interval as the unit attempts to evade the players. The problem is when the escaping unit heads down/up a slope. I've been unable to get the texture to sit flat on sloped ground. I've tried multiple methods with no luck and am looking for some help.

 

Does anyone have any ideas or script examples showing how to get  "UserTexture1m_F" to sit flat, even on various slopes?

 

 

This is just example of the base code that works fine for flat ground:

_blood = createVehicle ["UserTexture1m_F",[getPosATL player select 0,getPosATL player select 1,(getPosATL player select 2) + 0.01],[],0,"CAN_COLLIDE"];
_blood setObjectTexture [0,"blood.paa"];
_blood setVectorDirAndUp [[0,0,-1],[0,1,0]];

If the user texture object were just flat like "Land_Photos_V1_F" it would be very easy.

  • Like 1

Share this post


Link to post
Share on other sites

Hey Sarge, try creating a "Land_Photos_V1_F" object first, which will orient itself to the ground correctly (as you implied).  Then setpos it to 1M below the ground.  Then attach your "UserTexture1m_F" object to the photos object placing it 1M avove the object.  The attached object should keep the orientation of the attachedTo object.

 

Or spawn a "Land_Photos_V1_F" first (if it orients correctly), capture its VectorUP values in a variable, delete it, then setVectorUP your "UserTexture1m_F"  using the variable.

 

Might work...:)

 

Do you mind posting your blood.paa image here so I (and others) can use it?

Share this post


Link to post
Share on other sites

johnnyboy thanks for the response but unfortunately the same result. The attachTo just attaches the texture to the photo in its normal orientation which as we know is perpendicular to the photo. Same thing goes for capturing the vector of the photo and then applying it. The vector of the photo sitting flat is the same as the texture sitting upright. The math is here somewhere just need someone smarter than me to point it out. :)
 
As for the texture I'm using, its just a texture I downloaded from an old Duke Nuke'em forum and photoshopped it a bit before converting it to .paa format. You can grab it here.

 

Here is how it looks when flat (flattened by manipulating with rotation widget in 3den editor):

blood-flat.jpg

 

 

And when its placed or created in default orientration:

blood-default.jpg

 

 

Anyone have any other suggestions?

Share this post


Link to post
Share on other sites

If you are on DEV you can use createSimpleObject command:

_smallSplash = createSimpleObject ["a3\characters_f\data\slop_00.p3d", getPosWorld player]; 
_smallSplash setDir random 360; 
_smallSplash setVectorUp surfaceNormal getPosWorld _smallSplash;

Small splash needs to be surface aligned, but large splash doesn't:

_largeSplash = createSimpleObject ["a3\characters_f\blood_splash.p3d", getPosWorld player]; 
_largeSplash setDir random 360;

QplfjTV.jpg

 

The command creates permanent blood splashes, you will have to find a way how to handle deletion yourself. 

  • Like 3

Share this post


Link to post
Share on other sites

So.. you'd like to orientate an objects (UserTexture1m_F) forward face with the surface of the terrain.

Have you tried setVectorDir?

As in kk's example get the surface normal or perpendicular vector of the terrain with _surfaceUp = (surfaceNormal (getPosWorld _object)); and set it as the forward vector of your object _object setVectorDir _surfaceUp; It makes it a little more complicated to randomise the rotation of the object but not impossible. You would have to randomise a vector instead, in the x and z planes. You could even do it all together in one command with setVectorDirAndUp. Kk has a great blog post regarding that command. ;-)

Share this post


Link to post
Share on other sites

damgerousdiz_ thanks so much for the try but I'm still getting vertical textures employing your method, I think the best course of action right now is to wait for createSimpleObject, that killzone_kid suggests, to hit the release build as it seems a very straightforward way to get done what I'm trying to do. Thanks to all.

Share this post


Link to post
Share on other sites

No worries like I said it was just theory. :-D next time I'm in game I'll try and find a way round while you wait.

  • Like 1

Share this post


Link to post
Share on other sites

It would be possible using UserTexture1m objects. From what I can see you need to setVectorUp to a random vector perpendicular to surfaceNormal (ie, a vector on the plane of the ground surface), and setVectorDir to the opposite vector to surfaceNormal. Unfortunately I can't recall the vector tricks needed to produce the correct vectorUp - I will have a go after work.

Share this post


Link to post
Share on other sites

Great stuff.  Thanks Sarge for the blood.paa.  And thanks KK for the upcoming solution!

Share this post


Link to post
Share on other sites

Ok, code below works with UserTexture objects in current stable build. For performance, I assume the createSimpleObject command will be preferred to createVehicle when it becomes available.

It works well when when the player is on natural ground, will need further code to handle case of player in vehicles, water, buildings, etc.

_blood = createVehicle ["UserTexture1m_F", [getPosATL player select 0, getPosATL player select 1, (getPosATL player select 2) + 0.01], [], 0, "CAN_COLLIDE"];
_blood setObjectTexture [0,"blood.paa"];
_blood setVectorDirAndUp [(surfaceNormal position _blood) vectorMultiply -1, (surfaceNormal position _blood) call fnc_randomPerpVector];

where fnc_randomPerpVector is:

fnc_randomPerpVector = compile
"
 _x1 = _this select 0;
 _y1 = _this select 1;
 _z1 = _this select 2;
 
 if (_z1 == 0) then {_z1 = selectRandom [-0.00000001, 0.00000001];};
 
 _x2 = 1 - (random 2);
 _y2 = 1 - (random 2);
 _z2 = (-(_x1 * _x2) - (_y1  * _y2)) / _z1;
 
 vectorNormalized [_x2, _y2, _z2]
";
  • Like 2

Share this post


Link to post
Share on other sites

Thank you ceeeb! I've tested and it works perfectly. I knew someone could solve this with math and good code. This will make a great placeholder until such a time as the createSimpleObject command goes stable build. Wish I could buy you a beer mate, but the best I can offer is to give your credit in the mission briefing. ;)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×