[CODING] Fixing Bullet Tracer Appearance

Making or wanting help making your own asset? Check in here
Post Reply
1941__1941
Posts: 9
Joined: 2023-03-30 17:51

[CODING] Fixing Bullet Tracer Appearance

Post by 1941__1941 »

Long time player of Pr here, started roughly at about 0.6 - 1.0 and briefly returned for 1.4 - 1.6 and thus here we are today. Firstly should be noted as a whole the base experience of Pr is still excellent. Despite having numerous iritating server enforced dependancies such as insane amount of recoil, suppression, healing, kit restriction and squad functionality. Recently started delving into working inside both BATTLEFIELD 2 / Pr and seeing how far the base experience could further enhanced. In the spirit of BF:BC2, BF3, and BF4 trying to get every shot fired to have a tracer to assist longer range ballistic pattern target hitting along with several other key stuff which could potentially be brought forth into it's own iteration to be determined where and how that would proceed or transpire. Work itself has already been finished, but I'm stumbling into an issue presumably with newer shader version where increased size is rendering incorrectly or undesired

Already well versed in how to do significant change to files


Typically the increased size of tracerscaler is just a giant ball

°

However doing the identical thing tracer scaler in Pr will result

>

Not desirable, nothing tried has been able to fix. Advise if possible
Last edited by 1941__1941 on 2023-04-08 19:21, edited 1 time in total.
Reason: FORMAT
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [CODING] Fixing Bullet Tracer Appearance

Post by Mats391 »

I think some pictures are missing in your post
Image

Mineral: TIL that Wire-guided missiles actually use wire
1941__1941
Posts: 9
Joined: 2023-03-30 17:51

Re: [CODING] Fixing Bullet Tracer Appearance

Post by 1941__1941 »

https://drive.google.com/file/d/1zbqP6NBzbee-UMCW-UoJ3Igg-rVWSPP_/view?usp=sharing
https://drive.google.com/file/d/1b3cCkEMv8sLl1MIAulhZ7wv2l3P3DSDB/view?usp=share_link
How they appear in BATTLEFIELD 2 configured
by default every shot increased size adjustment

https://drive.google.com/file/d/1vVkKjSI1ceHDTpg-CDp5zC_BM_0xPrdb/view?usp=share_link
https://drive.google.com/file/d/1J9ZQ3GGt5y04VhmC5_UXaEaY-LWfMomG/view?usp=share_link
How they appear in Pr 1.7.3.2 - 1.7.4.2 configured
with BF2 values every shot increased size adjustment

Things I've tried before asking here

° Modifying the shader code for trails and particles in the zips
° Copying over the model data for the p_tracer_g / all config
° Copying over the modified texture for the p_tracer_g / r
° Copying over the value data for the tracers in bf2

Since it's very compartmentalized and there is no definitive guide on which variable does what, thought I'd reach out for help as it would solve a very distracting visual anomaly and potentially improve the pr experience overall for those who are interested in it's functionality disregard the comically excessive size

https://drive.google.com/file/d/1_L73jSFZoxR9TeVzFv1ZJbvq6vD2ncn1/view?usp=share_link
https://drive.google.com/file/d/17zVWwePspBnp5Key0ei1KfVsv-Wlx9D-/view?usp=share_link

Should be noted tracers on the receiving end or when fired alongside teammates appear correctly, it's just when they are being fire from the perspective of the shooter do they appear incorrectly it's the shape that's important in action
Last edited by 1941__1941 on 2023-04-08 21:35, edited 4 times in total.
Reason: IMAGE
piratepengu
PR:BF2 QA Tester
Posts: 95
Joined: 2013-12-24 02:45

Re: [CODING] Fixing Bullet Tracer Appearance

Post by piratepengu »

Man why does your game look like that!!!!
1941__1941
Posts: 9
Joined: 2023-03-30 17:51

Re: [CODING] Fixing Bullet Tracer Appearance

Post by 1941__1941 »

Those who ask why do nothing. Relevant to the discussion how?
Starting a reply off "MAN" makes me think you a NAM PTSD vet
Help get this working first, it's unrelated to the point of the topic.
Then I'd be more willing to divulge cutting into the resolution.
Last edited by 1941__1941 on 2023-04-09 02:53, edited 1 time in total.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [CODING] Fixing Bullet Tracer Appearance

Post by Mats391 »

Did you try using the bf2 p_tracer_r.bundledmesh?
also your screenshots make it very hard to see what is going on. Could you re-make them without any ReShade enabled?
Image

Mineral: TIL that Wire-guided missiles actually use wire
1941__1941
Posts: 9
Joined: 2023-03-30 17:51

Re: [CODING] Fixing Bullet Tracer Appearance

Post by 1941__1941 »

Mats391 wrote:Did you try using the bf2 p_tracer_r.bundledmesh?
Things I've tried before asking here

° Modifying the shader code for trails and particles in the zips
° Copying over the model data for the p_tracer_g / all config

Already did that, before posting here, so it's not the mesh

Actually, this is just a newer SweetFX, but it is based off this here

https://www.realitymod.com/forum/showthread.php?t=118973&page=57

As for the screenshots, not sure how it wouldn't be clearly visible?
Shaders have absolutely nothing to do with visibility or rendering.
Do you know what it is you're looking for? See clearly here.

This is how they look in BATTLEFIELD 2 a tracer ball
https://drive.google.com/file/d/1OiXC3nN0bI78eHwH-vPffecMGx8yPtPI/view?usp=share_link

This is how they look in Project Reality crocodile >
https://drive.google.com/file/d/19oRWvFGlTcN-XyXDcLsZghFTQMBsG5O9/view?usp=share_link
https://drive.google.com/file/d/1p3_pW422f6bwVO_a_zTBlASIKNtVbbH0/view?usp=share_link

Guess if it is required to redo these with bigger tracer sizes, far larger than the intended size to see clearly sure, but I don't see how it would make the issue easier to see or correct it internally. Just feel as if those are not properly analyzed here. Download the picture outside Google editor otherwise there isn't a point in doing a brand new set, especially if you're just suggesting after it is tried without prior knowledge of the code itself. Anything those would be easier to see in those circumstances, but I digress. Didn't see, so do you not recognize how convoluted that is? How would we then compare a set from BF:BC2 / BATTLEFIELD 3 / BATTLEFIELD 4 which utilize an entire library of post processing to enhance their appearance? Frustrating it is being blamed on an unrelated thing which is purely preferential and has absolutely no obstacle in viewing those? Seriously. Just help fix the underlying cause
Last edited by 1941__1941 on 2023-04-09 14:45, edited 2 times in total.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [CODING] Fixing Bullet Tracer Appearance

Post by Mats391 »

Thanks for the screenshots. This is how the tracer looks with backface culling enabled, which it normally should not be. It indeed looks like a shader issue. Are you playing with advanced shaders enabled or disabled?
Image

Mineral: TIL that Wire-guided missiles actually use wire
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [CODING] Fixing Bullet Tracer Appearance

Post by Mats391 »

We might have found the issue. MeshParticle.fx has CCW CullMode enabled and might cause tracers to not render correctly. We are looking into it
Image

Mineral: TIL that Wire-guided missiles actually use wire
1941__1941
Posts: 9
Joined: 2023-03-30 17:51

Re: [CODING] Fixing Bullet Tracer Appearance

Post by 1941__1941 »

Excellent work Pr expect nothing less, didn't even see this file

Advanced shaders are being used. Particular element of them as noted, did try replacing the files outright initially, but ended up getting a pixel shader error, thus I figured it would have been better to just ask, because I'd like to keep those ideally to they really help the overall appeal and a ton of hard work has gone into Pr as a whole including the new renderer to jeopardize it with such a minute, but yet significant detail. I'll take a look into it as well, kudos. Figure this out and honestly the future of Pr is undoubtedly saved for the better. Trust that you'll get nothing but a "you the man" from me if it's solved. Just couldn't get over looking at those every day, especially while sniping. Got to have those it really does help immersion, not that I'd say they need to be on every weapon in the base game as in real life tracer ammo is purely optional, intermediately used every few shots or exclusively toward the end of a magazine, but that's what newer BATTLEFIELD titles have done is just have a sizable variant on everything for every shot fired and it does look amazing. Alas that is a topic for another thread, I'll for sure forward anything noteworthy to suggestions
1941__1941
Posts: 9
Joined: 2023-03-30 17:51

Re: [CODING] Fixing Bullet Tracer Appearance

Post by 1941__1941 »

Issue has been resolved, thanks for pointing in the right direction!

https://drive.google.com/file/d/1l7CzwquzxDtZ-FHIaFBEPpf0MtpZ-hNg/view?usp=sharing

"you the MAN"
"you the MAN"
"you the MAN"
"you the MAN"

"We're losing this battle,
start fighting or I'll find someone who can!"
Last edited by 1941__1941 on 2023-04-10 17:23, edited 1 time in total.
User avatar
ALADE3N
PR:BF2 Developer
Posts: 577
Joined: 2016-02-13 17:34
Location: Philippines

Re: [CODING] Fixing Bullet Tracer Appearance

Post by ALADE3N »

If someone makes an airsoft mini mod for pr this will be good
Image
1941__1941
Posts: 9
Joined: 2023-03-30 17:51

Re: [CODING] Fixing Bullet Tracer Appearance

Post by 1941__1941 »

ALADE3N wrote:If someone makes an airsoft mini mod for pr this will be good
Good idea. Also include Paintball. This has also been something I've considered not just for pr, but plenty of other title which would support it. Quite right, just remove the glow on the texture and make it a circular white ( or black or colored ) BB or ball of paint with the appropriate size itself is adjustable then lower the damage to be both insignificant ( non-lethal or requiring return to rally point to remove paint off screen and hit tagged or completely ignoring it by getting a penalty to the score all programmable stuff ) and correct velocity with proper projectile drop. Including the concequence for going on a rampage with friendly fire and shooting out players or being excessive with shooting, even though in this instance that's absolutely hilarious. They actually use this as live exercise training in real life. Would be a great way to showcase pr stuff without being caught by a stray chunk of lead from approximately 200M or even 500M away due to rules of engagement. Make the magazine capacity wise absolutely insane to simulate the reserve and redesign the class system. I'll look into it creating a fork later, but it just isn't the focus right now

As far as tracers in real life are concerned

° They may or may not be used for stealth
° Used for examining ballsitic pattern
° Used for squad target destination
° They are big, bright and cool looking
° Can also be small and variably colored
° Typically 4:1 or one every fifth shot
° Typically at the last five rounds of a magazine
° They can be every round, if they are in excess
° They can be every round, if they are allowed
° Exclusively used in excess on Support gunners

Still, without tracers it would be nice to have a visible indication of where every bullet is going which is what I'm doing in this thread. In base pr, this could be as simple as a small black or white dot to symbolize the bullet in flight which wouldn't be noticed except to the extremely observant eye at close range, but that's how it is in every BF title after BC they are bright and beautiful. Would also be nice if there was a designated RIFLEMAN and MARKSMAN kit with his option issued by the squad leader for their intensity

This isn't a suggestion thread, so we can mark it as solved.
However I'm keen on revisiting it in the future elsewhere

"Don't ask, don't tell"
Last edited by 1941__1941 on 2023-04-10 18:58, edited 2 times in total.
1941__1941
Posts: 9
Joined: 2023-03-30 17:51

Re: [CODING] Fixing Bullet Tracer Appearance

Post by 1941__1941 »

EDIT

Can make any weapon fire blanks, by typing "rem" and a space in front of the projectile template it will reference in the weapon tweak file. Obviously undeal for turkey shoot scenarios, but interesting nonetheless it basically stands for sleep this function or remove from execution comment. Could solve friendly fire

MK-11 SR-25 MOD 0 ENB SS SHADESERIES
Last edited by 1941__1941 on 2023-04-13 06:07, edited 3 times in total.
Post Reply

Return to “PR:BF2 Community Modding”