project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
09 Sep 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Reply
 
Thread Tools Display Modes
Old 2018-04-11, 08:48   #1
GAJAN

GAJAN's Avatar
Default BTR-80 HUD improvements

Quote:
Originally Posted by mectus11 View Post
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
GAJAN is offline Reply With Quote
Old 2018-04-11, 14:23   #2
[R-DEV]​mectus11
PR:BF2 Developer

mectus11's Avatar
Default Re: Change Russian AA rockets from HATO to russian names

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.







mectus11 is offline Reply With Quote
Old 2018-04-11, 16:30   #3
GAJAN

GAJAN's Avatar
Default Re: Change Russian AA rockets from HATO to russian names

Quote:
Originally Posted by mectus11 View Post
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.



One more thing circle is closer to the center, and center is much more bigger then yours.
GAJAN is offline Reply With Quote
Old 2018-04-11, 17:53   #4
[R-DEV]Mats391
PR:BF2 Lead Developer
Supporting Member
PR Server License Administrator

Mats391's Avatar
Default Re: BTR-80 HUD improvements

Looking good
Steelbeasts has refs for commander and driver sights
http://www.steelbeasts.com/sbwiki/in...p?title=BTR-80

Mineral: TIL that Wire-guided missiles actually use wire
Mats391 is offline Reply With Quote
Old 2018-04-11, 19:48   #5
qs-racer
Supporting Member

qs-racer's Avatar
Default Re: BTR-80 HUD improvements

SOurce for unzommed sigth, and vehicule internal layout.
https://vk.com/page-39215368_49583475

qs-racer is offline Reply With Quote
Old 2018-04-12, 00:22   #6
TBob
Default Re: BTR-80 HUD improvements

Quote:
Originally Posted by mectus11 View Post
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:
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.



Also, you will probably want thicker lines if you're working with higher resolution textures since it can cause aliasing issues at lower resolutions.
TBob is offline Reply With Quote
Old 2018-04-12, 17:56   #7
[R-DEV]Mats391
PR:BF2 Lead Developer
Supporting Member
PR Server License Administrator

Mats391's Avatar
Default Re: BTR-80 HUD improvements

Also those split up parts all need to have power of 2 height and width.

Mineral: TIL that Wire-guided missiles actually use wire
Mats391 is offline Reply With Quote
Old 2018-04-13, 22:36   #8
TBob
Default Re: BTR-80 HUD improvements

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.




Showing how the segments are chopped up




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.

TBob is offline Reply With Quote
Old 2018-04-14, 09:28   #9
[R-DEV]​mectus11
PR:BF2 Developer

mectus11's Avatar
Default Re: BTR-80 HUD improvements

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




mectus11 is offline
Last edited by mectus11; 2018-04-14 at 09:49..
Reply With Quote
Old 2018-04-14, 17:15   #10
TBob
Default Re: BTR-80 HUD improvements

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\HudElementsB TR80gunner.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:
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.



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:



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.
TBob is offline Reply With Quote
Reply


Tags
btr80, hud, improvements

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 12:40.