Home   Help Search Login Register  

Author Topic: Thermal Vision in a Camera  (Read 937 times)

0 Members and 1 Guest are viewing this topic.

Offline Bashkire

  • Members
  • *
Thermal Vision in a Camera
« on: 21 Nov 2010, 21:50:16 »
Well, my question is simple with a, I suspect, rather hard answer:

I'm creating a video where a sniper zooms in with his thermal scope to survey a compound. What I'd like to do is create this scene. Now I THINK I have the start of the answer. I can go first person for my sniper and it displays the aiming reticule, but it isn't zoomed in and the thermal overlay isn't displayed. I'll post the script here but can someone either explain how, or write my code for me, to display this zoomed in thermal sniper scope?


Code: [Select]
titlecut ["",BLACK IN",5]
_camera = "camera" camcreate [0,0,0]
_camera cameraEffect ["internal","back"]



#observation
;=== 18:44:14
_camera camPrepareTarget [88398.89,-48778.31,-169.77]
_camera camPreparePos [5295.02,6718.12,1.28]
_camera camPrepareFOV 0.700
_camera camCommitPrepared 0
@camCommitted _camera



;=== 18:42:13
_camera camPrepareTarget [69236.15,-70133.16,-3349.08]
_camera camPreparePos [5267.92,6663.28,0.20]
_camera camPrepareFOV 0.241
_camera camCommitPrepared 15
@camCommitted _camera

~2

unit switchCamera "gunner"

~5

player cameraeffect ["terminate","back"]
camdestroy _camera
end1 = true
exit;


I have been trying to play about with some post process effects but I don't know where to find them and I've only used the one I can find on this site. The code in that I've posted below. Doesn't work though.
Code: [Select]
titlecut ["",BLACK IN",5]
_camera = "camera" camcreate [0,0,0]
_camera cameraEffect ["internal","back"]



#observation
;=== 18:44:14
_camera camPrepareTarget [88398.89,-48778.31,-169.77]
_camera camPreparePos [5295.02,6718.12,1.28]
_camera camPrepareFOV 0.700
_camera camCommitPrepared 0
@camCommitted _camera



;=== 18:42:13
_camera camPrepareTarget [69236.15,-70133.16,-3349.08]
_camera camPreparePos [5267.92,6663.28,0.20]
_camera camPrepareFOV 0.241
_camera camCommitPrepared 15
@camCommitted _camera

~2

_ppColor = ppEffectCreate ["ColorCorrections", 1999];
_ppColor ppEffectEnable true;
_ppColor ppEffectAdjust [1, 1, 0, [1, 1, 1, 0], [1, 1, 1,

0.0], [1, 1, 1, 1.0]];
_ppColor ppEffectCommit 0;
_ppBlur = ppEffectCreate ["dynamicBlur", 505];
_ppBlur ppEffectEnable true;  
_ppBlur ppEffectAdjust [.5];
_ppBlur ppEffectCommit 0;
_ppInversion = ppEffectCreate ["colorInversion", 2555];
_ppInversion ppEffectEnable true;
_ppInversion ppEffectAdjust [1,1,1];
_ppInversion ppEffectCommit 0;
_ppGrain = ppEffectCreate ["filmGrain", 2005];
_ppGrain ppEffectEnable true;
_ppGrain ppEffectAdjust [0.02, 1, 1, 0, 1];
_ppGrain ppEffectCommit 0;
unit switchCamera "gunner"

~5

player cameraeffect ["terminate","back"]
camdestroy _camera
end1 = true
exit;

Also, the camera doesn't end after it goes into first person (after that 5 seccond delay I've put in). Can someone tell me why?

Thanks all, and sorry for the long post. I tried to put it in spoiler tags but they don't seem to work on this forum.

Thanks again,
Bashkire

EDIT:
Nope, don't worry done it. to enable thermal vision you've got to use:
Code: [Select]
true setCamUseTi 0
« Last Edit: 22 Nov 2010, 16:13:57 by Bashkire »