Page 1 of 1

BTR-80 HUD improvements

Posted: 2018-04-11 08:48
by GAJAN
mectus11 wrote:I could most likely recreate it in Photoshop, just need a 1080p screenshots or better would be a 4k ones.
What you think about this:
https://goo.gl/images/T51YYX

Re: Change Russian AA rockets from HATO to russian names

Posted: 2018-04-11 14:23
by mectus11
groho got me some good references too, I made a concept, no idea how to add it ingame, first time dealing with hud textures for pr at least.

Image
Image
Image

Re: Change Russian AA rockets from HATO to russian names

Posted: 2018-04-11 16:30
by GAJAN
mectus11 wrote:groho got me some good references too, I made a concept, no idea how to add it ingame, first time dealing with hud textures for pr at least.

Image
Image
Image
One more thing circle is closer to the center, and center is much more bigger then yours.

Re: BTR-80 HUD improvements

Posted: 2018-04-11 17:53
by Mats391
Looking good :)
Steelbeasts has refs for commander and driver sights
http://www.steelbeasts.com/sbwiki/index ... tle=BTR-80

Re: BTR-80 HUD improvements

Posted: 2018-04-11 19:48
by qs-racer
SOurce for unzommed sigth, and vehicule internal layout.
https://vk.com/page-39215368_49583475

Re: BTR-80 HUD improvements

Posted: 2018-04-12 00:22
by TBob
mectus11 wrote:groho got me some good references too, I made a concept, no idea how to add it ingame, first time dealing with hud textures for pr at least.
If you haven't already I would make sure you have different elements in separate layers.
To implement it efficiently you want as little empty area as possible, so ideally you cut it into separate elements and reassemble them in the HUD config.
Long lines can be implemented as single pixels stretched out, circles can be chopped into segments and rotated.

This is an example of how the circle on the Cobra gunner hud is drawn using a 1/4 circle:

Code: Select all

hudBuilder.createPictureNode			Ah1zGunCircle Ah1zTVFrameLaserCircle0 275 176 128 128
hudBuilder.setPictureNodeTexture 			Ingame\Vehicles\Icons\Hud\Air\Attack\Ah1z\ah1z_guncircle.dds
hudBuilder.setPictureNodeRotation		0
hudBuilder.setNodeColor		 			0 0 0 1

hudBuilder.createPictureNode			Ah1zGunCircle Ah1zTVFrameLaserCircle1 277 299 128 128
hudBuilder.setPictureNodeTexture 			Ingame\Vehicles\Icons\Hud\Air\Attack\Ah1z\ah1z_guncircle.dds
hudBuilder.setPictureNodeRotation		90
hudBuilder.setNodeColor		 			0 0 0 1

hudBuilder.createPictureNode			Ah1zGunCircle Ah1zTVFrameLaserCircle2 398 297 128 128
hudBuilder.setPictureNodeTexture 			Ingame\Vehicles\Icons\Hud\Air\Attack\Ah1z\ah1z_guncircle.dds
hudBuilder.setPictureNodeRotation		180
hudBuilder.setNodeColor		 			0 0 0 1

hudBuilder.createPictureNode			Ah1zGunCircle Ah1zTVFrameLaserCircle3 396 174 128 128
hudBuilder.setPictureNodeTexture 			Ingame\Vehicles\Icons\Hud\Air\Attack\Ah1z\ah1z_guncircle.dds
hudBuilder.setPictureNodeRotation		270
hudBuilder.setNodeColor		 			0 0 0 1

You could do it more compactly by using 1/8th segments, though I'm not sure how feasible it would be to get them to line up seamlessly this way.

This is a quick mockup of how you might separate the elements before turning it into a HUD.

Image

Also, you will probably want thicker lines if you're working with higher resolution textures since it can cause aliasing issues at lower resolutions.

Re: BTR-80 HUD improvements

Posted: 2018-04-12 17:56
by Mats391
Also those split up parts all need to have power of 2 height and width.

Re: BTR-80 HUD improvements

Posted: 2018-04-13 22:36
by TBob
I tested out how it looked in game with the circle chopped into 4 segments, seems to work fine. If you zoom in you can find the seams but normally its basically unnoticeable. This ended up using 80KB for the circle.

Image


Showing how the segments are chopped up

Image


For adjusting the size properly I would recommend using an 1600x1200 canvas, since the HUD is based on 800x600 this lets you to convert sizes easily.

Image

Re: BTR-80 HUD improvements

Posted: 2018-04-14 09:28
by mectus11
Nice, I'll look into it more this weekend.

Which settings do you use to save it as dds, DXT5?

I still have no idea how to implement this to test it ingame, can you explain like I'm 5 please

Re: BTR-80 HUD improvements

Posted: 2018-04-14 17:15
by TBob
DXT5 should be used when you need to preserve smooth alpha gradients. DXT3 should be used when you need to preserve sharper alpha edges without the artifacts DXT5 can produce at the cost of only having 16 levels of alpha. DXT1 can be used if you only need 100% alpha or 0% alpha.

When you export HUD textures you generally want them to be all white, the coloration is done by the HUD config. Texture sizes need to be powers of 2 (256x128, 32x512, 1024x1024, etc.)

You'll find the HUD config in menu_server.zip\HUD\HudSetup\Vehicles\HudElementsBTR80gunner.con
The texture files should go in menu_client.zip\HUD\Texture\Ingame\Vehicles\Icons\Hud\land\BTR80

This is what draws the original crosshair

Code: Select all

hudBuilder.createPictureNode		BTR80Hud 1PZ2_crosshair 144 172 512 256
hudBuilder.setPictureNodeTexture 	Ingame\Vehicles\Icons\Hud\Land\BTR80\1PZ2_crosshair.dds
hudBuilder.setNodeColor		 	0 0 0 1
The "144 172 512 256" part determines the position and size when drawn at 800x600, in this case the top left corner of the texture is positioned at 144x 172y with 512 width and 256 height. If you're working with a 1600x1200 canvas you just divide all the positions and sizes by 2.

Image

You can rotate using hudBuilder.setPictureNodeRotation as in the Cobra HUD in my earlier post. This rotates the texture counter-clockwise from the center.
Putting a 90 degree rotation should look like this:

Image

To get the proper position for rotation I think the easiest way is to position it pre-rotated in your document, then create a copy rotated back to the original orientation and use those coordinates.

If you still have questions feel free to ask.