Jump to content

Recommended Posts

Posted (edited)

Hi everyone!

after few miles of scrolling .INI files and testing everything on the game

FINALY:

" Cockpit Shadows " !!

--!  enabling process is same for each plane  ! --

--!  enabling process should apply on each plane you like to have cockpit shadows on 'em  ! --

--!  Be Advised !: This "Cockpit Shadows" has some little BUGs so we all should work on it together to make it better  !-- 

It's better than nothing :D

 

* Q: How to enable Cockpit Shadows?

- A: All you need to do is to make a .INI file with the same name and right at the place your chosen plane cockpit 3D file ( .LOD ) is located.

Example: 

!! [  Cockpit file are located at the folder with the same name (most of the times)  ] !!

SHO to Viper team F-16 BLK 30 to act like a test plane :biggrin:

cpS1.jpg.52adaa3f9864d04de49170ef4599d4b4.jpg

here the plane's Cockpit 3D model is the LOD file named " Cockpit_F-16C_B30.LOD " and above of that, our personally made .INI file;

Now

Inside the .INI file we should drop this :

 

[Shadow]
CastShadow=TRUE
ShadowCastDist=5000
MaxVisibleDistance=800 

-------------------------------------------------

* you are free to change the numbers  

-------------------------------------------------

 

here's an example file which you have to change it's name to the plane's cockpit file name !

plane's cockpit file name.INI

 

*with this simple trick you can enable shadows for every .LOD file.

feel free to ask.

 

 alexis99 thanks for that little help

 

sorry for bad English :)

hope ya'll enjoy!

one love.

 

 

plane's cockpit file name.INI

Edited by muhammad
  • Like 3
Posted

Clever. I never thought of doing that, but after all it's a LOD like everything else. Even for terrain objects the same thing applies, if we want shadows for the 300 custom ground objects, 300 such .ini files are required to be added.

The only major issue about shadow casting is that it would require cockpit 3d models without holes in them. Unfortunately many third-party and even stock cockpit 3d models feature holes, either to the front or back of the cockpit. For proper shadow casting those holes would need to be fixed, but we cannot edit LODs.

  • Like 1
Posted
3 hours ago, Menrva said:

Clever. I never thought of doing that, but after all it's a LOD like everything else. Even for terrain objects the same thing applies, if we want shadows for the 300 custom ground objects, 300 such .ini files are required to be added.

The only major issue about shadow casting is that it would require cockpit 3d models without holes in them. Unfortunately many third-party and even stock cockpit 3d models feature holes, either to the front or back of the cockpit. For proper shadow casting those holes would need to be fixed, but we cannot edit LODs.

not really a difficult thing with windows powershell script. consider only variable is the file name.

maybe we can do a script to allow auto generation of all at once

Posted
4 hours ago, Menrva said:

The only major issue about shadow casting is that it would require cockpit 3d models without holes in them.

Yes; this is the main concern; I guess it's doable but it'll take a lot of work.  I wish we'd known about this earlier cause it has the potential to really make the cockpits look more dynamic.

Great find @muhammad !

  • Like 2
Posted (edited)
2 hours ago, sophocles said:

Yes; this is the main concern; I guess it's doable but it'll take a lot of work.

Not just that. Site rules do not allow to edit LODs and share them, either third-party and stock ones. I wish we could fix them all one by one, it'd be a game changer. I guess the concern is more about third-party ones. To share a fixed LOD for stock cockpits wouldn't worry me as much. A stock cockpit LOD with no textures is of no use, it would require the users to own the game to experience it as it's meant to be. In any case, it cannot be done so it's case closed.

Edited by Menrva
  • Like 1
Posted (edited)

Alright , just running a quick test,your approach does work,

But as Menrva said, we need cockpit with all faces closed, his F-22 cockpit is nearest one but it still looks like there is a little problem, and for those older cockpit like F-15E's below,the problem looks more serious

For only the front panel alone, I think it is not that bad.

img00216.JPG

img00217.JPG

Edited by simonmiller416
Posted

Well while i was testing diffrent planes before everything, i noticed that the TMF Parani Saegheh ( Iranian V tailed F-5 ) plane, has cockpit shadows in alternate way!

maybe that trick which TMF used for that plane should be helpful to fix this

in my opinion the problem is like this:

while we're in cockpit views, game can't detect the outer frame ( the plane fuselage and nose ) to make it cast shadow on cockpit 3D model! so that's why we see wrong shadows because light was passed through the outer frame instead of make the outer frame draw its shadow on the pit AND it seems like pit 3D models are some sort of transparent from outside so cockpit 3D model shadow casts from wrong side!
I THINK if we make the external view model cast shadow on the internal view model, the problem is solved then

 

I also noticed that there're some other options for LODs in Shadow section in .INI files but I still don't know much about them

  • Like 2
Posted (edited)
On 19/7/2023 at 4:45 PM, muhammad said:

Well while i was testing diffrent planes before everything, i noticed that the TMF Parani Saegheh ( Iranian V tailed F-5 ) plane, has cockpit shadows in alternate way!

By using OpenCockpit=TRUE, it's a less than ideal solution, as it brings other side issues (with clouds for instance) as it treats the cockpit as open, much like that of a WW1 plane, thus with no canopy glass etc.

I've been thinking out of the box, and I'm wondering if shadows like in the first generation of Strike Fighters games would work in SF2 as well. Here's an example:

[Shadow]
CastShadow=TRUE
ShadowLOD=A-4B_shadow.shd
ShadowType=1

ShadowCastDist=10000
MaxVisibleDistance=400

If those statements work in SF2, it means we could develop our own .shd files to act as a LOD for the shadows of a cockpit. It's a big if and I honestly have very low expectations it would still work but, if it does, no need to worry about editing existing LODs.

Edited by Menrva
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..