Jump to content
Sign in to follow this  
da12thMonkey

'Tritium illumination' for Arrowhead

Recommended Posts

I've been developing a number of weapons for ArmA 2 that have tritium powered optics whereby the crosshairs/reticle/aimpoint glows red at night, but in the daylight the aiming device is completely black.

I've been applying the following .rvmat to achieve this:

ambient[] = {0, 0, 0, 1};
diffuse[] = {0, 0, 0, 1};
forcedDiffuse[] = {0, 0, 0, 1};
emmisive[] = {1, 1, 1, 1};
specular[] = {0, 0, 0, 0};
specularPower = 1;
PixelShaderID = "Normal";
VertexShaderID = "Basic";

Basically it removes any colour present in the textures upon the surface it is applied, by virtue of having no specular or diffuse, but shows the colours at night by emission.

This has worked wonderfully for ArmA 2, as shown in these bulldozer pics:

trit.jpg

The model is a triangular prism with a red material - #(argb,8,8,3)color(0.972549,0.0627451,0.0117647,1.0,CO), applied as a texture and the above .rvmat material used to supress this colour in the day.

However, in Arrowhead the suppression of the base texture colours isn't working; so the optics glow red whether it's day or night.

Is anybody aware of an alternate method of producing optics that only glow at night, that I can use for Arrowhead?

Share this post


Link to post
Share on other sites

Bumpity bump bump...

I'm working on a pack of reticle textures for OA, and at the moment the project isn't really advancing thanks to the problem described above.

Did you ever find a solution Monkey, or does anyone else have pro-tips on how to proceed?

Share this post


Link to post
Share on other sites
Did you ever find a solution Monkey, or does anyone else have pro-tips on how to proceed?

Afraid not; I've largely of been out of addon making for the past few months due to real life commitments, so never really looked into it any further since releasing the UKF weapons pack.

I did mention it to one of BI's devs regarding the SUSAT in BAF, and he said he'd mention it to the blokes who handle patching and stuff. No idea if he ever got around to it as they were in the midst of finalising the DLC back then and no doubt had more important stuff on his mind.

Might be worth flagging the issue on the CIT if it's not already there (the CIT's still running right? - I'm massively out of the loop)

Share this post


Link to post
Share on other sites
Sample mission and addon posted at CIT.

Good job mate.

The initial report based on my post didn't really put enough emphasis on the fact that it worked in ArmA 2 but not OA/CO (i.e it was a detrimental step). Your examples and repro steps seems to have got it proper recognition as a rendering bug and not a feature request.

Hopefully something can be done about it.

Share this post


Link to post
Share on other sites
Is it possible to make the Tritium white/green 'ish?

Yes, you just had to paint the bits that you want to glow on the reticle in any colour you like in the .paa. The .rvmat example I used to use just turns any colour present in the reticle to black during daylight.

If I'd have applied #(argb,8,8,3)color(0.137255,0.913725,0.701961,1.0,CO) to the prism model demonstrated in the pictures instead of #(argb,8,8,3)color(0.972549,0.0627451,0.0117647,1. 0,CO), it would be turquoisey-green instead of red in the right-half of the image, yet still black on the left.

IIRC I have also coloured the night-time emission using the RGB values for this property in the .rvmat, as Max Power explained; but found colouring the reticle texture itself much easier.

Not that it's any bloody use unless BIS fix the optic rvmat rendering in OA...

I take it you want to do something like this:

buldozer201101241344171.jpg

Edited by da12thMonkey

Share this post


Link to post
Share on other sites

Not really sure whether this is known or not, but this method seems fixed by BIS and works for me in OA now. Tried this yesterday and had a nicely glowing reticle at night and a black one at daytime.

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  

×