#4386239 - 10/22/17 11:12 AM
Mi-28 Working Instrument Needles
|
Joined: Dec 2010
Posts: 1,883
messyhead
Member
|
Member
Joined: Dec 2010
Posts: 1,883
|
This is a minor release to add working needles to the Havoc cockpit ==================================================================== Version 1.16.1 minor bug fix Changes: - Havoc cockpit now has working needles for instruments - Left/Right Engine RPM shown in Rotor RPM gauge - Status Panel Lamps working - Threat Warning Display working (needs reworked as using Hind threat warning) - many thanks to thealx for the help - Warning Panel Lamps working - Master Alarm lamp working - Chaff/Flare lamps now working (including damaged state) - Weapon panel lamps now working (including damaged state) - Wut text on startup screen moved - Menu screen title font changed to help it scale better To install: Delete the following folders; cohokum\graphics\textures\cockpit\mi-28-cockpit cohokum\3ddata\objects\Mi-28_Havoc_Instruments Reason for deleting these is to ensure the textures and object files are refreshed, as some of them have been reworked. Extract the archive and copy it into the root folder of your EECH game e.g. where the cohokum folder is. Replace any files if it asks for overwrites. MAKE A BACKUP IF YOU WANT TO REVERT CHANGES https://drive.google.com/open?id=0B_9WsInmSbhuMDMtbVdBVkhaWmc
Last edited by messyhead; 10/30/17 01:00 AM.
|
|
#4386425 - 10/23/17 06:17 PM
Re: Mi-28 Working Instrument Needles
[Re: messyhead]
|
Joined: Dec 2012
Posts: 1,382
thealx
Member
|
Member
Joined: Dec 2012
Posts: 1,382
|
Hi. I have fly around for a while, everything works properly - great job. One thing I noticed - rotor RPM dial also should have engines torque needles. As torque grades to the right are not available, it's only way to know engines state so I think it's important, but it's your choice anyway.
As for code changes, I have some notes:
1. You should never use something like "01" in version number. Thing you may want to use is build number (under minor version), but we have no such so only possible solution is make it as "1.16.1". It doesn't mean this version should be released immediately - you can wait for a while until other modders (including me) will finish their tasks, so this one can be named as 1.16.1a or whatever (APP_NAME is a string so type there anything you want), but MINOR_VERSION is integer - please revert related changes in the code.
2. you have commit changes in CMAKE.BAT, DMAKE.BAT files. it's not a big deal but next time please exclude them. no need to fix anything, just leave it like that.
|
|
#4386437 - 10/23/17 07:19 PM
Re: Mi-28 Working Instrument Needles
[Re: messyhead]
|
Joined: Dec 2010
Posts: 1,883
messyhead
Member
|
Member
Joined: Dec 2010
Posts: 1,883
|
I was hoping to get the bars for the engine gauges working, so I didn't add them. Also, the only texture with the Ng on that dial, is the night cockpit. The day texture only shows Rotor RPM. I also couldn't find any decent reference for the real thing.
As for the version number, I was trying to make it different from the current release, which I thought was 1.16.0. but now I realise it's 1.16.1, so I'll change it. It formatted as a decimal, so needs to contain a number. Maybe 1.16.2.
I added *.bat to the gitignore file, so I'm not sure why they were added. It doesn't seem to ignore them.
|
|
#4386455 - 10/23/17 09:12 PM
Re: Mi-28 Working Instrument Needles
[Re: messyhead]
|
Joined: Dec 2012
Posts: 1,382
thealx
Member
|
Member
Joined: Dec 2012
Posts: 1,382
|
You are planning to use texture animation, but not sure it's good idea - we can't expand it's functionality since original release, and I am not sure it will work with OGRE implementation in future. Texture animation is applying to the surface of the model, other words you are applying some pre-defined texture to the polygons, set animation name for the surface, and then game manipulate with this texture. Instead you could use the way which modern cockpits using - subobjects manipulation. Arneh usually placed lamp polygons as subobjects into the scene, and make code to hide (lamp inactive) or show (lamp active) them. I have tried another thing - lamps are always presented in the scene, but they are closed by shatter - simple non-transparent polygon, when it's hided - lamp is active. Both are complicated, but with texture animation you have really small chances to succeed, especially without background knowledge.
I have pushed working threat warning lamps for Havoc - code and subobjects was taken from Hind (copy all mi24v_rwr***.eeo into Mi-28_Havoc_Instruments folder). You can see on example how lamps presented in the scene, what labels has and how placed. You should notice that parent NullObject has rotated and positioned to fit original Hind's lamps into Havoc cockpit object.
Last release is 1.16.0, you can see it in the GIT log (yellow tag), so this one should be 1.16.1
|
|
#4386472 - 10/23/17 11:12 PM
Re: Mi-28 Working Instrument Needles
[Re: thealx]
|
Joined: Dec 2010
Posts: 1,883
messyhead
Member
|
Member
Joined: Dec 2010
Posts: 1,883
|
You are planning to use texture animation, but not sure it's good idea - we can't expand it's functionality since original release, and I am not sure it will work with OGRE implementation in future. Texture animation is applying to the surface of the model, other words you are applying some pre-defined texture to the polygons, set animation name for the surface, and then game manipulate with this texture. Instead you could use the way which modern cockpits using - subobjects manipulation. Arneh usually placed lamp polygons as subobjects into the scene, and make code to hide (lamp inactive) or show (lamp active) them. I have tried another thing - lamps are always presented in the scene, but they are closed by shatter - simple non-transparent polygon, when it's hided - lamp is active. Both are complicated, but with texture animation you have really small chances to succeed, especially without background knowledge.
I have pushed working threat warning lamps for Havoc - code and subobjects was taken from Hind (copy all mi24v_rwr***.eeo into Mi-28_Havoc_Instruments folder). You can see on example how lamps presented in the scene, what labels has and how placed. You should notice that parent NullObject has rotated and positioned to fit original Hind's lamps into Havoc cockpit object.
Last release is 1.16.0, you can see it in the GIT log (yellow tag), so this one should be 1.16.1
Ok, thanks for that. I was taking advice from Firebird about the texture animation, as that's how it works in the Hokum. What triggers the animation? For example, how does it know which rwr light to light up? I'm also thinking more about the Rotor Brake for example, what ties pressing R to trigger the animation?
|
|
#4386492 - 10/24/17 06:55 AM
Re: Mi-28 Working Instrument Needles
[Re: messyhead]
|
Joined: Dec 2012
Posts: 1,382
thealx
Member
|
Member
Joined: Dec 2012
Posts: 1,382
|
Default Havoc functions calculates which lamps should be active, their states saved in the "havoc_lamps" so you don't need to change anything here. Previously this data was used for drawing, but it will work fine for texture animation, sub-objects manipulation and any other goals. So flags still updating at the background even if lamps not appear in the cockpit, only thing required is use this data - you can see new function was added "update_threat_warning_lights", here these flags checking and related lamps appear or disappear in the scene:
rwr_above_light->visible_object = havoc_lamps.threat_warning_missile_above;
Rotor brake, and other avionics states, stored in another place - current_flight_dynamics. but in the Havoc's "update_status_panel_lamps" function you can see existing string:
havoc_lamps.status_16 = get_current_flight_dynamics_rotor_brake ();
So to get rotor brake state, you can use "havoc_lamps.status_16", or "get_current_flight_dynamics_rotor_brake ()", or "current_flight_dynamics->rotor_brake". First one is preferable as you can control it if necessary - disable all lamps if electricity power is turned off, for example.
|
|
#4386495 - 10/24/17 08:27 AM
Re: Mi-28 Working Instrument Needles
[Re: messyhead]
|
Joined: Dec 2010
Posts: 1,883
messyhead
Member
|
Member
Joined: Dec 2010
Posts: 1,883
|
Ok, thanks. I'm understanding it now. I'm still working out how the LW scene is linked to the code for various things.
There's a lot of code commented out with #if 0 blocks that seemed to be added with the Direct3D9 conversion, so I wasn't sure how much of it was still usable.
I'll try and get one of the lamps working using these methods, and if it's successful I'll do the others.
Do you think I should create new RWR objects for the Havoc, or just reuse the Hind ones you've added? I'm sometimes not sure about reusing code and objects from other cockpits, in case someone makes a change in one place that breaks other cockpits. For example, when I was doing the Havoc instruments, there's code in ha_instr.c that is used by the hind, but not used anymore by the Havoc. But when I removed it, the Hind cockpit broke.
|
|
#4386576 - 10/24/17 07:49 PM
Re: Mi-28 Working Instrument Needles
[Re: FireBird_[WINE]]
|
Joined: Dec 2010
Posts: 1,883
messyhead
Member
|
Member
Joined: Dec 2010
Posts: 1,883
|
]When converting eeo to lwo, you can specify textures search directory as an additional parameter. Result lwo files will refer existing texture files and not potential ones. Ah, I didn't know it took parameters. I'll convert them again, as I just had it in a batch file anyway.
|
|
#4386579 - 10/24/17 08:03 PM
Re: Mi-28 Working Instrument Needles
[Re: XIII]
|
Joined: Dec 2010
Posts: 1,883
messyhead
Member
|
Member
Joined: Dec 2010
Posts: 1,883
|
wow is a useful information. Firebird or thealx You have a script that automatically converts all files in folder to lwo or eeo?Is there any way to convert multiple files at once? I just list the files in the cmd line, then copy them into a text editor. Delete everything except the file names. And then on each line, just add the command that you would run manually. Then save it as a .bat, and run it from the cmd line. I was thinking of writing a shell sript that could find every .eeo in a directory, and convert it to a .lwo, but I've not got round to it. You can do things using a tool called sed in a shell script, that can find an manipulate strings, and you can add some parameters. For example, this is a snippet of the one I used to convert all the hind rwr files...
eeo2lwo.exe mi24v_rwr_above_light.eeo mi24v_rwr_above_light.lwo "C:\Enemy Engaged\EECH\cohokum\graphics\textures\cockpit\mi-24v-cockpit"
eeo2lwo.exe mi24v_rwr_airborne_light.eeo mi24v_rwr_airborne_light.lwo "C:\Enemy Engaged\EECH\cohokum\graphics\textures\cockpit\mi-24v-cockpit"
eeo2lwo.exe mi24v_rwr_below_light.eeo mi24v_rwr_below_light.lwo "C:\Enemy Engaged\EECH\cohokum\graphics\textures\cockpit\mi-24v-cockpit"
eeo2lwo.exe mi24v_rwr_left10_light.eeo mi24v_rwr_left10_light.lwo "C:\Enemy Engaged\EECH\cohokum\graphics\textures\cockpit\mi-24v-cockpit"
eeo2lwo.exe mi24v_rwr_left30_light.eeo mi24v_rwr_left30_light.lwo "C:\Enemy Engaged\EECH\cohokum\graphics\textures\cockpit\mi-24v-cockpit"
Last edited by messyhead; 10/24/17 08:04 PM.
|
|
#4386582 - 10/24/17 08:13 PM
Re: Mi-28 Working Instrument Needles
[Re: XIII]
|
Joined: Dec 2010
Posts: 1,883
messyhead
Member
|
Member
Joined: Dec 2010
Posts: 1,883
|
nice idea, But it still takes a lot of time.Thanks, see how it works. Yeah, but it's still quicker than doing each one. You can just copy/paste the file name twice, then use find/replace to change one of the eeo to lwo.
|
|
#4386644 - 10/25/17 10:19 AM
Re: Mi-28 Working Instrument Needles
[Re: thealx]
|
Joined: Dec 2010
Posts: 1,883
messyhead
Member
|
Member
Joined: Dec 2010
Posts: 1,883
|
Default Havoc functions calculates which lamps should be active, their states saved in the "havoc_lamps" so you don't need to change anything here. Previously this data was used for drawing, but it will work fine for texture animation, sub-objects manipulation and any other goals. So flags still updating at the background even if lamps not appear in the cockpit, only thing required is use this data - you can see new function was added "update_threat_warning_lights", here these flags checking and related lamps appear or disappear in the scene:
rwr_above_light->visible_object = havoc_lamps.threat_warning_missile_above;
Rotor brake, and other avionics states, stored in another place - current_flight_dynamics. but in the Havoc's "update_status_panel_lamps" function you can see existing string:
havoc_lamps.status_16 = get_current_flight_dynamics_rotor_brake ();
So to get rotor brake state, you can use "havoc_lamps.status_16", or "get_current_flight_dynamics_rotor_brake ()", or "current_flight_dynamics->rotor_brake". First one is preferable as you can control it if necessary - disable all lamps if electricity power is turned off, for example. I wish I'd looked in ha_avlmp to start with. It makes much more sense. I was looking in ha_lamps, which I suppose must be old and unused now?
|
|
|
|
|
|
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
|
|
|
|
|
|
|
|