Realm667 / WolfenDoom

"WolfenDoom - Blade of Agony" | Important: This is only meant for development and testing purposes. You are NOT ALLOWED to use material from this repository for your own projects. Important: This repository is for development and testing purposes, you are NOT ALLOWED to use the copyrighted material for your own projects without our permission!
http://boa.realm667.com
259 stars 26 forks source link

Light cones and fog gets more transparent when getting close to them #296

Closed Tormentor667 closed 4 years ago

Tormentor667 commented 4 years ago

@nashmuhandes - I know Blade of Agony isn't your top-priority project but I really like the addition you made to the TCotD2 Remaster where fog gets more transparent when being closer and gets less transparent when being farther away. Do you think you could implement that mechanic into BoA as well - including taking care of the volumetric light cones?

The current implementation is good (thanks to @Talon1024 and @Ozymandias81) but it is not working yet on Fog and Clouds. Also it's in question if it makes sense to add them to Steam as well. (including ZyklonSteam).

nashmuhandes commented 4 years ago

@Tormentor667 I don't have much free time right now but what I can do is, make a minimal example file that maybe @Ozymandias81 can take care of to merge into BoA. I will see what I can do soon.

If I take too long to get back to this, feel free to @ me again

Tormentor667 commented 4 years ago

Thanks kindly for the offer, that would be totally awesome.

Ozymandias81 commented 4 years ago

So this is what I have come so far mixing 2 lumps from TCOTD2 (DietActor and Clouds) and applying Vollight defs and such: due to fact that effects are controlled by the EffectsManager, so that's why atm it spam several cones until we are near it and wait for 10-20 secs to see it fading slowly (also conelights have Add instead of Translucent Fog from TCOTD2). Tested under C3M1_A, uncomment vollight from decorate and include vollight on zscript obviously to test it.

[ATTACHED FILE REMOVED]

Tormentor667 commented 4 years ago

I will keep this uncommented, that's stuff that I have no idea of :) Maybe @AFADoomer and @Talon1024 can help here.

AFADoomer commented 4 years ago

The DietActor variants are basically the same as the SimpleActor which is already present.

Which actor are you using to test this effect? Unless I've missed a change, the light fixture actors that spawn cones (nor the cones themselves) are not set up to be culled by the effects manager.

nashmuhandes commented 4 years ago

@AFADoomer I suggest just using your SimpleActor class then, it makes no sense to duplicate similar classes this way.

If you (or anyone else) cares to do it, it's basically just a shader that sets the pixel's alpha depending on the camera distance. There is no actor code involved to achieve this effect.

AFADoomer commented 4 years ago

I just pushed an actor-code based version... The shader approach is probably better; will have to take a look at the code.

nashmuhandes commented 4 years ago

@Tormentor667 @Ozymandias81 ok I had some time to properly sit down and take a look at this.

As per my requested agreement for my involvement with TCOTD2 - please do not use any of my TCOTD2 code inside BoA. My permission only allows reuse of my stuff within the Remaster projects and that hasn't changed.

My suggestion here is - use AFADoomer's SimpleActor class, and apply a camera distance shader to the fog sprites. It should be very trivial to write one

Ozymandias81 commented 4 years ago

I have removed the attached file, and then I think we can close this since the shader implemented by @Talon1024 works like a charm for conelights. Just adding them for fog actors, but apparently nothing happens, probably the "coolness" sprite with "----" has a role in this (but also doesn't work for Steam so idk yet)