SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 ATO Mods (https://www.subsim.com/radioroom/forumdisplay.php?f=234)
-   -   New Interface for Uboats (https://www.subsim.com/radioroom/showthread.php?t=152590)

karamazovnew 11-18-09 12:48 AM

Well, after an entire day reworking the periscope model (you have no idea how many useless polygons are there :haha:) and a few hours trying (and failing) to achieve a nice metal look, I've made the periscope background. The size of the reticule is almost the same, just a bit smaller so that the real marking layout should fit nicely. On 16:9 resolutions it will take the same space on screen but you'll be able to see a few more things to the sides. Here's a pic (1600x1200) made in photoshop so don't mind the blurry low rez orders bar:
http://img443.imageshack.us/img443/5...riscope.th.jpg

Hitman 11-18-09 07:56 AM

Holy cow, that looks wonderful :o

I used for my own optics mod a 28º/7º lense in the scope, which left the markings out nicely and is enough to provide good field of view :up:

karamazovnew 11-18-09 08:26 AM

I have to say... making this mod has been like a rewrite of Murphy's Law. I can't wait to finish it.
Damn... edited by mistake...

Hitman 11-18-09 09:31 AM

Quote:

PS: Hitman I need your help. I was planning on using the existing SH3 AOBF's to make the 3d one. But they are inexact. At a scaling factor of 10, the bottom part doesn't match up. Do you maybe have some good layouts? Simple spiked wheels, simple lines, nothing fancy, I just need them to align some faces. I only need the ones for range lenght and aob.
I'll need to browse through my archives, and will report later if I find something useful :yep:

karamazovnew 11-19-09 02:29 AM

Quote:

Originally Posted by karamazovnew (Post 1205218)
I have to say... making this mod has been like a rewrite of Murphy's Law. I can't wait to finish it.

Just to give a recent example...
As you've seen everything I've made so far for this mod keeps it's proportion on the screen, meaning that as you increase resolution, the items do not become smaller. I've just tried to do the same with the small depth meter in the periscope screen and failed miserably :damn:. Why? Because the devs didn't figure that they'd be making uboats when they made SH4. So they didn't feel the need to make dials for the Periscope Height or the Sub Level items. They would've been logarithmic linear dials. When UBM came up they just hardcoded something fast. I've pretty much figured out the formula that they used and was expecting it to be based on either the parent's size or the item's size. But no... it's also based on (are you ready?) the Item Height Proportion (the one that is used to position an item). What does that mean? Well it's simple, if you scale the resolution up and decide to also scale up the entire depth meter, the amount of movement for both the periscope height and the sub level linear dials will remain the same in number of pixels :damn:. :nope: Can't wait for SH5.

karamazovnew 11-19-09 08:51 AM

I just found something
 
Strange, this is the first time a quirk of SH4's interface has turned into a perk :haha:. There was no point in starting a new thread for this info, but it should help pretty much any interface modder that has to create marking lines. I have not tested this in SH3 and would appreciate if anybody (I'm looking at you Makman :up:) tests this.

As you all know the periscope marking lines are hardcoded to light up at night. How? Apparently, EVERY item in the Marking lines group has this feature, even the ones that you add. In SH4, it looks like this...


[G26 IXXX]
Name=Marking lines
Type=1026;Menu group
ItemID=0x26060000

Then come a few text items (not important, actually i moved them offscreen)... I just added my item after them (if your Pos and Zone are the same, then yes, the marks will remain centered on the screen in SH4):

[G26 I278]
Name=Karamazov Periscope Marks ;new item
Type=1030;Static bmp
ItemID=0x260EF005
ParentID=0x26060000
Pos=0,-768,1024,768
Zone= 0 0 1024 768 1 1 0x26060000 0.5 -0.5 0x260EF005 -0.5 0.5 0 0
Color=0xFFFFFFFF
Materials=1
Display=2;Linear
Mat 0=data/menu/Karamazov/AP_Marks2.tga
Crop 0=0,0,1,1
MatFlags=0x29
TexFmt=0x0

That image, AP_Marks2.tga is a simple image file with a black alpha channel. The color channel itself is a full block of color and the marks themselves are on the alpha channel as white marks. Now here's the real trick.... The game deals with the color channel very differently than you might expect. regardless of the color in the RGB channel, during the day, it will make the marks appear black. But during the night it will make it a different color depending on the HSB values that you used that you used. It's something like this( I'll consider the values that you used to be H, S and B:

New Brightness=B
New Hue=H*S + GREEN*(100%-S)

In other words:
Perfect White becomes Perfect Green
Perfect Red becomes Still Perfect Red
Red with less saturation becomes Something
And of course, the brighter your color is the more the marks will "lit up" during the night. However, the items will never be true opaque, no matter how white you make the alpha channel. They will have around 5-10% transparency.

Hope this info will be useful to someone. This method should work in ANY group that has such items so it should work for binoculars, Uzo, Obs Scope and the rest, hopefully in SH3 too. For example I've just made a periscope filter that makes the image appear green during the night (a sort of night vision). It's very very subtle, but it's there :) Also has the effect of making the image a bit darker during the day (I mean darker than the Obs Scope).

Hitman 11-19-09 09:22 AM

This is indeed a very sueful info for me, as I'm still working in a new version of my interface mod for SH3 :D

I had already noticed what you mentioned about the RGB and Alpha channel, as I had noticed it when modifying the red light mask. But what I didn't know is that adding the reticle as child to the existing "frame" in the menu-ini would make it turn dim green by night :yeah:

So far I had solved it by adding a new image with the reticle in Alpha channel to the red mask layer, and as you suggested, tweaking the values to be bright green. But of course your new solution is a much cleaner method :ping:

EDIT: It's only sad that we can't get rid of the original marking lines, specially in the UZO!

karamazovnew 11-19-09 09:31 AM

Quote:

Originally Posted by Hitman (Post 1205794)

EDIT: It's only sad that we can't get rid of the original marking lines, specially in the UZO!

SH4 doesn't have a red mask, thank god. I noticed that rule when I looked at the Bearing.tga which was white and it clicked.
Can't the Uzo can be fixed like any other screen: zoom in and make the view hole smaller? At least the extra zoom would be a reason to use the silly thing. Oh wait... in SH3 it didn't move with the waves... that was a good enough reason :haha:.

PS: You should see the periscope now... my god it's beautiful! I've used a 30% dimming of light at the edges (as it was in real life), a red overall filter (i just like redish water) and a green night filter that increases visibility by 8% but decreases it during the day (it's black then) by 8%. At night you can clearly see the horizon while during the day it just looks cool :)

Hitman 11-19-09 10:17 AM

Quote:

Can't the Uzo can be fixed like any other screen: zoom in and make the view hole smaller? At least the extra zoom would be a reason to use the silly thing.
The real UZO had a 7x zoom with a FOV of 7.25 degrees. Its use was exclusively for aiming at a target, and the reasonably low zoom factor and large FOV ensured both stability when looking through it and also being able to see the whole target ship when shooting, helping apreciate the distance and AOB of it. Currently I have done exactly what you have said, and have a 10x zoom with a 4º FOV, which is historically correct for a mid to late war model codenamed UZS4, which was however little or no used, since the uboats did no longer attempt surface attacks at night by then. But after much using it, I think that a 7x is certainly prefereable for surface attacks.

Quote:

Oh wait... in SH3 it didn't move with the waves... that was a good enough reason :haha:.
It did only a little (In storm waves it became much noticeable), but since it was also stabilized in real life, it wasn't that bad. It can however be modified in the cameras.dat file IIRC :yep:

Quote:

PS: You should see the periscope now... my god it's beautiful! I've used a 30% dimming of light at the edges (as it was in real life),
Correct AFAIK :up:

Quote:

a red overall filter (i just like redish water)
What do you mean? When looking through the periscope while rigged for red you would not see anything reddish in real life :hmmm:

Quote:

nd a green night filter that increases visibility by 8% but decreases it during the day (it's black then) by 8%. At night you can clearly see the horizon while during the day it just looks cool :)
Not historic :down: Periscopes had two colour filters, one orange to use against sun blending in dusk/dawn, and a grey one to prevent the glowing sun reflections in the cap of the waves.

Can't you leave the green at night as option?

Besides, I have readed several accounts that stated that periscopes where unusable at dark nights, even the observation scope (Which allowed more light).

But I'm sure dying to see more pictures, please upload them :D

karamazovnew 11-20-09 09:50 AM

I know that a red filter blocks red light, but here filters are simple semi-transparent images that give a hue while reducing contrast. There are 3 images of this sort in my mod:
- an image that controls how dark the image becomes at the edges of the scope (easy to mod by increasing contrast of the alpha map)
- an image that gives an overall tint to the image (my red filter). It's veeery subtle.
- a filter that becomes green at night and black during the day. It's not night vision but it allows superb visibility of the horizon at night.
Ofc you can change anything you like, the color or the transparency as you wish. The marks are also on a separate image so you'll be able to change them as you wish.

There's no point in posting more pics, if I don't slack today, I'll post the final version later tonight.

By the way I have an important question.

Can I change the ClassName values in the Names.cfg file? Does it affect anything else than the text item next to the "Ship:" button on the solution page? It displays the type of unidentified ships and it's annoying. I want to keep that item for when you identify ships, then I'll move the "Ship" button under it (invisible ofc) so you can press the name of the ship and have the recog manual move to that page. This might sound as cheating but in OM it's impossible NOT to use the auto identification. There are just too many ships.

Hitman 11-20-09 03:51 PM

Quote:

This might sound as cheating but in OM it's impossible NOT to use the auto identification. There are just too many ships.

... as in real life :D

Therefore, Kaleuns didn't usually identify their targets before killing them, but instead they got the details from the distress message, debris, etc.

Kaleuns normally estimated the target size and tonnage, (which explains their overclaims) and that is not so difficult in the current game. In fact it is even easier than in real life, so I go with that and have not opened that horrible recognition manual for ages :ping:

LiveGoat 11-20-09 05:47 PM

Nice work, Karamazovnew. I've never played the U-Boat addon before but now I might if it a whirl.

karamazovnew 11-20-09 06:23 PM

It's strange... When I had >200 items to add, sure it was a pain in the neck and I didn't have experience, but at least it went smooth.
Now, I can joggle with entire groups and intertwine them as I like and I have only a few items to add, but each one of them is proving to be more difficult than the Minotaur's maze.
I was so happy that the entire periscope page was very clean, with absolutely no weird stuff. But now... :har: even I have trouble understanding what's going on there. And it's not because I don't understand what to do, but because some items obey no rules. For example the horizontal bearing dial sits on top of any other item, and it doesn't scale it's tga regardless of what values you put there. The Reject button resets the TDC, the stadimeter also modifies the temporary AOB :o, and other crazy weird zulu things. I guess my favourite is that if you place the Reject button in one of the aob/range/speed pages, when you click on it that page becomes invisible, but the button itself blocks and you can't click anywhere anymore :haha:. But this is just smug talk, I've solved everything, although I did have to cut some corners. For example the AOBF inner wheel will be allowed to move only if you press in a certain place, not anywhere inside it. This is because every button item automatically has a "Needs-Focus" thing that screws it up. And there are plenty of them there: the Reject, the Stadimeter, the Ship button and the panel autohide buttons. Oh, and of course, pressing the Ship Button has a bug (default SH4 bug). If you press it, it does flip to the page of the ship, and it does try to show the manual but only manages to display the horizontal scale under the ships :haha:. Oh well, minor things.

I'm tired and I'll have a few hours of work before I can finish the AOB wheel. Then I can finish up. Here's the latest screens :hmmm: damn, again the photoshop contrast strikes again. It looks brighter in the game:

Daytime:
http://img509.imageshack.us/img509/4514/dayperi.th.jpg

The small green circle near the bearing is the stadimeter button, it lights up green when the stadimeter is on. On the other side of the bearing dial is the button (dark grey) for showing the aob wheel.

Night time with AOB wheel:
http://img442.imageshack.us/img442/6...ghtperi.th.jpg

Now you can clearly see the red circle at the right of the bearing which now hides the aob wheel (it's the reject button). It works seamlessly. Also note the lit marks on the lens. And yes, I know that the bearing indicator is small, as I said, it can't scale up with resolution, but on lower resolutions it's much bigger (because the pixels occupy more screen space). You have the TDC bearing vernier dials anyway. Oh, did I mention that the depth vertical dial doesn't work? It took me many hours to give up on it. I've moved the original offscreen, but it's easy to put it back for those who want it. Too bad, that new background sure looked nice. :haha:

makman94 11-20-09 07:33 PM

a m a z i n g ! ! !

congratulations Kara !!

about the contrast 'problems' you have with photoshop: have you ever try the paint.net ? i am using this and i think that you will not have any problem at contrasts with this programm

PS: just one tiny thing.....make the needle for the torpedoes panel facing the opposite side

karamazovnew 11-20-09 08:06 PM

Thanks, it must be something from my drivers. If I make a screenshot int he game it's very dark. But if I use Print Screen it's ok.
Don't worry, I'll change the handles for both panels, I'm not done yet :haha:.


All times are GMT -5. The time now is 01:12 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.