[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Battlefield Modding Tutorials BFMODS • View topic - nightvision sniperscopes

Battlefield Modding Tutorials BFMODS

Battlefield Modding Tutorials
It is currently Sun Apr 28, 2024 8:03 pm

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: nightvision sniperscopes
PostPosted: Thu Nov 02, 2006 11:27 pm 
Offline

Joined: Wed Nov 01, 2006 6:33 pm
Posts: 19


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 11:57 pm 
Offline

Joined: Mon Oct 09, 2006 12:51 pm
Posts: 782


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Fri Nov 03, 2006 10:07 pm 
Offline

Joined: Mon Nov 15, 2004 12:00 am
Posts: 696
Location: Germany, US Depot


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Nov 04, 2006 12:53 am 
Offline

Joined: Wed Nov 01, 2006 6:33 pm
Posts: 19


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Nov 04, 2006 2:02 am 
Offline

Joined: Mon Oct 09, 2006 12:51 pm
Posts: 782


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Nov 04, 2006 11:03 am 
Offline

Joined: Mon Nov 15, 2004 12:00 am
Posts: 696
Location: Germany, US Depot
lookie here ...

this is part of the apache gunner code out of AH64 objects.con , look at the lines i highlighted

rem *** AH64M230Control ***
ObjectTemplate.create PlayerControlObject AH64M230Control
ObjectTemplate.setNetworkableInfo AH64_body_info
ObjectTemplate.aiTemplate AH64Cannon
rem ---------------------------------
ObjectTemplate.addTemplate AH64M230Base
ObjectTemplate.setPosition 0/-0.95/-0.096
ObjectTemplate.addTemplate AH64Entry
ObjectTemplate.setPosition 0/0/1.5
ObjectTemplate.addTemplate AH64GunnerSeat
ObjectTemplate.setPosition 0/-.275/.140
ObjectTemplate.addTemplate AH64NoseMount
ObjectTemplate.setPosition 0/-0.025/1.653
rem ObjectTemplate.vehicleFov 0.4
ObjectTemplate.vehicleFov 0.6
rem ---------------------------------
ObjectTemplate.setSoldierExitLocation -3/0.05/1 0/0/0
ObjectTemplate.GUIIndex 54
ObjectTemplate.setVehicleIcon "Vehicle/Icon_AH64.tga"
ObjectTemplate.setVehicleIconPos 62/108
ObjectTemplate.setNumberOfWeaponIcons 1
ObjectTemplate.setPrimaryAmmoIcon "Ammo/Icon_vulcan.tga"
ObjectTemplate.setPrimaryAmmoBar ABAmmoBar
ObjectTemplate.setCrossHairType CHTIcon
ObjectTemplate.setVehicleCategory VCLand
ObjectTemplate.setVehicleType VTFighter
ObjectTemplate.setToolTipType VTFighter


rem *** AH64M230Base ***
ObjectTemplate.create RotationalBundle AH64M230Base
ObjectTemplate.setNetworkableInfo AH64_body_info
ObjectTemplate.setGeometry AH64_M230_Mount
rem -----------------------------------
ObjectTemplate.addTemplate AH64M230Rotation
ObjectTemplate.setPosition 0/0/-0.1425
rem -----------------------------------
ObjectTemplate.setMinRotation -90/0/0
ObjectTemplate.setMaxRotation 90/0/0
ObjectTemplate.setMaxSpeed 90/0/0
ObjectTemplate.setAcceleration 5000/0/0
ObjectTemplate.setInputToYaw c_PIMouseLookX

rem *** AH64M230Rotation ***
ObjectTemplate.create RotationalBundle AH64M230Rotation
ObjectTemplate.setNetworkableInfo AH64_body_info
rem -----------------------------------
rem ObjectTemplate.addTemplate AH64GunnerCamera
rem ObjectTemplate.setPosition 0/-0.110/-0.300
ObjectTemplate.addTemplate M230Cannon
rem -----------------------------------
ObjectTemplate.setMinRotation 0/-7/0
ObjectTemplate.setMaxRotation 0/45/0
ObjectTemplate.setMaxSpeed 0/90/0
ObjectTemplate.setAcceleration 0/5000/0
ObjectTemplate.setInputToPitch c_PIMouseLookY

rem *** AH64NoseMount ***
ObjectTemplate.create RotationalBundle AH64NoseMount
ObjectTemplate.setNetworkableInfo AH64_body_info
ObjectTemplate.setGeometry AH64_Nose_Mount
rem -----------------------------------
ObjectTemplate.addTemplate AH64NoseSensors
ObjectTemplate.setPosition 0/-0.43/0
rem -----------------------------------
ObjectTemplate.setMinRotation -90/0/0
ObjectTemplate.setMaxRotation 90/0/0
ObjectTemplate.setMaxSpeed 90/0/0
ObjectTemplate.setAcceleration 5000/0/0
ObjectTemplate.setInputToYaw c_PIMouseLookX

rem *** AH64NoseSensors ***
ObjectTemplate.create RotationalBundle AH64NoseSensors
ObjectTemplate.setNetworkableInfo AH64_body_info
ObjectTemplate.setGeometry AH64_Nose_Sensors
rem -----------------------------------
ObjectTemplate.addTemplate AH64GunnerCamera
ObjectTemplate.setPosition 0/0/0.2
rem Added gunsight
ObjectTemplate.addTemplate AC-130_Howitzer_Cockpit
rem ObjectTemplate.setPosition 0/0/0.75
ObjectTemplate.setPosition 0/0/0.65
rem -----------------------------------
ObjectTemplate.setMinRotation 0/-7/0
ObjectTemplate.setMaxRotation 0/45/0
ObjectTemplate.setMaxSpeed 0/90/0
ObjectTemplate.setAcceleration 0/5000/0
ObjectTemplate.setInputToPitch c_PIMouseLookY

and blah ...

now this is the ac 130 cockpit code out of AC-130 objects.con

Rem ** AC-130_Howitzer_COckpit
ObjectTemplate.create LodObject AC-130_Howitzer_Cockpit
rem -------------------------------------
ObjectTemplate.addTemplate AC-130_Sight_Internal
ObjectTemplate.addTemplate AC-130_Sight_External
rem -------------------------------------
ObjectTemplate.lodSelector AC-130_Sight_Selector
rem *** AC-130_Sight_External***
ObjectTemplate.create SimpleObject AC-130_Sight_External
LodSelectorTemplate.create DistanceSelector AC-130_Sight_Selector
LodSelectorTemplate.addLodDistance 1
rem *** AC-130_Sight_Internal***
ObjectTemplate.create SimpleObject AC-130_Sight_Internal
ObjectTemplate.geometry AC-130_Sight

and blah ...

now look at the ac-130 geometries.con

rem ******************************************
rem - DesertCombat
rem - Version .39a
rem - July 16th
rem - Revision 1
rem ******************************************
rem 1-11-04
rem LOD distances revised - SW

renderer.beginGlobalCluster AC-130

GeometryTemplate.create StandardMesh AC-130_fus_M1
GeometryTemplate.file \DesertCombat\AC-130\AC-130_fus
GeometryTemplate.scale 1.25
GeometryTemplate.hasDynamicShadow 1
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 30
GeometryTemplate.setLodDistance 2 50
GeometryTemplate.setLodDistance 3 100


GeometryTemplate.create StandardMesh AC-130_Cockpit
GeometryTemplate.file \DesertCombat\AC-130\AC130_Cockpit
GeometryTemplate.hasDynamicShadow 1
GeometryTemplate.setLodDistance 0 0


GeometryTemplate.create StandardMesh AC-130_Sight
GeometryTemplate.file \DesertCombat\AC-130\AC-130_Sight
GeometryTemplate.scale .085


and blah ...

if u now check the AC-130_Sight.rs file located in the standardmesh/desertcombat/ac-130 folder u will see this

subshader "AC-130_Sight_Material0" "StandardMesh/Default"
{
lighting true;
materialDiffuse 1 1 1;
lightingSpecular false;
Transparent true;
twosided true;
depthWrite false;
texture "texture/DesertCombat/AC-130/AC-130_Sight";
}
subshader "AC-130_Sight_Material1" "StandardMesh/Default"
{
lighting true;
materialDiffuse 1 1 1;
lightingSpecular false;
twosided true;
texture "texture/DesertCombat/AC-130/AC-130_Sight";
}

there is the path to the texture file

so to just ad the sight as is to the scope simply "clamp" it in front of the scope camera, like they did in the apache gunner seat.

when u look at the apaches and walk around the nose in 3rd person view u will see that screen show up seperately a little in front of the apaches nose sensors.

however, a better but more complex way of doing it would be to create a smaller screen geometry in gmax or 3dsmax , e.g. downscale the ac-130_sight and position it with the scope and create a texture .dds file with attributes so the textures on the soldiers are highlighted when looking through it.

thats it for now ...


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Nov 04, 2006 11:27 am 
Offline

Joined: Wed Aug 09, 2006 12:43 pm
Posts: 41
The map Spurning_Fate-1945.rfa from the Forgotten Hope map pack 6
has nightvision scopes for the Panthers, Hanomags and the special 'Vampir'
versions of the StG44 if you want more examples of how to do it.


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Nov 04, 2006 2:07 pm 
Offline

Joined: Mon Oct 09, 2006 12:51 pm
Posts: 782
silent heroes also has examples they use Down the barrel sights for most of the guns.


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 318 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group