Jump to content
Sign in to follow this  
xxanimusxx

Visual effects to distinguish between objects

Recommended Posts

Hi there fellow scripters,

I'm editing a mission which will have lots and lots of quests to accomplish and some of them contain a mission to find a specific AI or Player in a crowd and eliminate it.

To be able to find the "object" (I'd rather refer to the AI/Player as an object to make things easier to understand) in question, the Player can activate some sort of optical enhancement which will color all unrelated objects in a dark shade and highlight the target - that's the theory so far.

The effects should look pretty similar to activating the TWS scope of a rifle, shading everything dark/bright except of bodies. So there must be a way to (at least) apply a post process effect to achieve the thermal sight which is already implemented into the game.

What I want is to selectively shade a target and not all bodies in another color - like the Eagle View in Assassins Creed (yeah, I know, it's a far-fetched example, but explains a lot).

The workflow would look like the following:

a) shade everything in the screen with a dark color

b) select objects X and highlight them using a bright color

So are there ways to use PP-Effects or smiliar techniques to apply these effects for selected objects?

Share this post


Link to post
Share on other sites

I am pretty sure there is no way to use PP efects to do this as this will apply the effect to the whole screen, not just select objects. But, you may be able to use setObjectTexture to re-texture the objects as needed. I have never done this but if you search it there are a lot of threads. You would probably want to try the procedural textures (R,G,B,A) method so you do not have to create new textures. In the Biki article, see the note at the botton from Lou Montana for an explanation on the proceudural texture method.

Share this post


Link to post
Share on other sites

Thanks for the hint, im gonna look into that.

But how is the thermal sight of some snipers implemented?

I thought almost everything in arma is done by scripts, if so, there must be a location where that script is, isnt it?

Or is the TWS scope implemented using the weapon model and doing some magic alongside the model data?

// edit:

I tried to use setObjectTexture and the example in the bottom of the BIKI article but after executing the command nothing happens in particular O_O

I mean are there any conditions to meet or why doesnt it do anything despite me trying to change the texture of several objects? :<

Edited by XxAnimusxX

Share this post


Link to post
Share on other sites

I believe thermals are handled by a combination of a special thermal imaging texture map on the object itself which can only be seen when using weapons optics which have thermal imaging capability in its config.

Share this post


Link to post
Share on other sites

Two suggestions. Neither of which really meets the sort of stylized approach you wanted, but it doesn't seem like you'll get what you want there.

1. Attach one of the 'helper' objects to him. One of the little red orbs above his head or an arrow pointing at him. Probably more blatant than you wanted.

2. This might seem weird, but here's a particle effect that would subtly highlight a unit:

_pos = position unitName;
BIS_FX_feathers = "#particlesource" createVehicleLocal _pos;  
BIS_FX_feathers setParticleCircle [0.0, [0, 0, 0]];
BIS_FX_feathers setParticleParams [  "\Ca\Data\cl_feathers2.p3d",  "",  "SpaceObject",  1,  4,  [0,0,0],  [0,0,0],  0,  1.275*1.001,  1,  0,  [0,1,1,1,1,0],  [[1,1,1,0],[1,1,1,0.5],[1,1,1,0]],  [1000],  1,  0.1,  "",  "",  unitName ];
BIS_FX_feathers setParticleRandom [0, [1, 1, 1], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];
BIS_FX_feathers setDropInterval 0.02;

This will create a trail of the little floating 'feather' particles that will follow the unit. You could play with the values to make the trail bigger, the particles fewer, etc.

Also, if the mission takes place at night you could always attach an actual light source to him.

Share this post


Link to post
Share on other sites

Thanks Loyalguard, now I have at least some pointers which should lead me into the right direction.

As far as I understand, there must be a hiddenselection-Array in the configuration of the specific object for setObjectTexture to work.

Because no matter what object I try to execute this command on, it doesn't change anything. This really begins to bug me alot, how the f*** is the thermal mapping working on every player/body even if they don't have hiddenselections ? Im really confused right now, because after searching the cfgVehicles to find any object which has the hiddenselection-Array, none popped out.

Can someone provide an example mission or script fragment which shows the usage of setObjectTexture using Procedural Textures on an existend object?

// edit

@2nd Ranger

Yeah thats another approach you showed there, I already anticipated this method and it will be my fallback plan if everything else won't work.

Thanks for the particle effects, it really looks interesting xD

Edited by XxAnimusxX

Share this post


Link to post
Share on other sites

Like you, I have just browsed through CfgVehicles and did find there are lot of objects without hidden selections. Can you give us an example of one of the objects you want to use?

The particle method may be a good route. I believe several scripters/modders used a similar method to simulate thermals in ArmA1.

The reason why thermals work without hidden selections is it uses a completely different method. I do not know exactly how the engine does it, but it is probably something like this:

The object has a special thermal imaging texture map. It has nothing to do with hidden selections. If a player uses optics that have thermals enabled in its config, when you look at the object through the thermal optics you see the thermal imaging texture map instead of the nomal texture(s).

Share this post


Link to post
Share on other sites
I believe thermals are handled by a combination of a special thermal imaging texture map on the object itself which can only be seen when using weapons optics which have thermal imaging capability in its config.

That's right. It handles all kinds of different heating scenarios. As far as creating the map, it's fairly hard to control and requires a lot of messing around.

I'm also not sure about what classes of objects it will work with. Maybe you can set how much a building or a rock is heated by the sun per pixel, but I wouldn't really guess that that is the case.

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
Sign in to follow this  

×