projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.22k stars 364 forks source link

Some way to cap how epileptic presets can be #742

Open DuendeInexistente opened 7 months ago

DuendeInexistente commented 7 months ago

Is your feature request related to a problem? Please describe. Some presets are good. Others will have every color in the spectrum flashing through the screen every frame.

Describe the solution you'd like Some setting to cap this (Maybe limiting how different from the previous frame every given pixel can be in RGB values, and cut the difference in half until it's within acceptable ranges) would be greatly appreciated and turn this into not a health hazard.

Describe alternatives you've considered A curated list of presets that cut out the epileptic stuff. Sounds like an undertaking considering the amount of presets shipped, thou. Though it could be done programatically.

kblaschke commented 7 months ago

This is definitely something I've experienced many times during testing, always thinking that projectM's code is bad - only to see that these presets flicker exactly the same way in Milkdrop.

Sadly, there's no easy solution to this. We simply can't compare each and every pixel between frames: this would amount to 16 million comparisons in 4K, if we only compare the exact same pixels between each frame, and don't account for movement etc.

A programmatic solution is doable I'd say, as this doesn't need to happen in real time. I could see a tool that plays a list of presets, renders a number of frames (30 or so amounting to .5s would suffice) and then calculate the absolute color/brightness difference between all these frames. This should give a good indication of how much flickering is there, and then presets above a certain value can be sorted out. Working through the "Cream of the Crop" preset pack would then take about an hour, which isn't too bad.

I currently don't have the resources to start another side project, so any volunteer stepping up to write such a tool would be great!

revmischa commented 7 months ago

Yeah or we can remove them from the giant preset bundle as people report them. I don't think they're precious and need to be in the pack personally.

OfficialIncubo commented 7 months ago

Some suksma mashups may have presets that has seizures, not the projectM itself.

EDIT: The following comp shader code that can flickers/has a seizure is: if (frame%2==0) {ret = 1-ret;} It inverts and uninverts the entire screen every frame. 1st frame: inverted 2nd frame: uninverted 3rd frame: inverts again ...and so on!

kblaschke commented 7 months ago

Yeah or we can remove them from the giant preset bundle as people report them. I don't think they're precious and need to be in the pack personally.

That! Exactly! At some point, I fear I'll get an epileptic seizure looking at those while testing. Really uncomfortable. Whenever I stumble upon one of those, I'll delete it locally and from time to time push the change to GitHub. If anyone else can name presets in the "Cream of the Crop" pack, please post the relative filename(s) below.

Some suksma mashups may have presets that has seizures, not the projectM itself. Exactly, at some point I though "well, what did I miss in the render code?" but then looked at the shaders and saw it's exactly how they write the presets - for whatever reason.

Having a tool to automatically filter or at least narrow down such presets would still be a great thing, especially if people are using their own preset packs and want to clean those up.

OfficialIncubo commented 7 months ago

Mine not. I still feel comfortable by seeing some epileptic presets. As a very experienced Milkdrop visualization user, it's still mesmerizing and calming while watching all the presets. That's a huge amount of breathtaking imo. I'm still surviving. I know that anyone has a seizure phobia (or feeling uncomfortable from seeing epileptic things). Idk if I tell some presets that has seizures. I'll check the unorganized Cream of the Crop presets, look at some seizury presets, then I'll share the unseizured one.

kblaschke commented 7 months ago

Here's one example I've tested with a few days ago.

suksma - ed geining hateops - flx squeakers novelty vs permanance.milk

DuendeInexistente commented 7 months ago

Seizure stuff could still be shipped but in a separate folder. If a user wants ti they can jut drag the "warning, seizure" folder to the main presets folder.

kblaschke commented 5 months ago

If anyone has the time to skip through the 9000+ presets and delete all the epileptic ones in a pull request, that woul be amazing! I don't think anyone would really like to see those. This must not necessarily be done in one go - pick one of the subdirs in ther repo at a time, and simply note here which dir is already cleaned up.

I'd support this by adding a temporary UI feature (or shortcut) in my SDL frontend working branch to quickly delete an unwanted preset directly from the app. I'll provide a pre-built archive for the respective OS - just drop a note here, visit our Discord or email me via my GitHub profile.

YutMarma commented 4 months ago

I think removing some presets because some people don't like them is pretty anathema to the spirit of MilkDrop. I personally enjoy the more flashy/gaudy presets, they bring me back to the good old "rave days".

With all due respect, I don't think it's right that presets should be deleted for everyone based on the views of a vocal minority. I don't think I should have to take extra steps to truly see all the "cream of the crop" presets.

kblaschke commented 4 months ago

Please remember that it's not just a matter of taste in this case, but also a potential health issue. People susceptible to epilepsy can have a really bad time being exposed to such imagery, so it's at least responsible behavior to reduce exposure to health-threatening visuals - there's a very good reason most games and some movies show a clear epilepsy warning at the very beginning.

It's just about the default preset collection shipping with projectM applications. We're not going to change any preset collection out there, or keep people from using their own.

revmischa commented 4 months ago

Please remember that it's not just a matter of taste in this case, but also a potential health issue. People susceptible to epilepsy can have a really bad time being exposed to such imagery, so it's at least responsible behavior to reduce exposure to health-threatening visuals - there's a very good reason most games and some movies show a clear epilepsy warning at the very beginning.

It's just about the default preset collection shipping with projectM applications. We're not going to change any preset collection out there, or keep people from using their own.

Well-put, yes.

dpw13 commented 4 months ago

According to https://www.epilepsy.com/stories/shedding-light-photosensitivity-one-epilepsys-most-complex-conditions-0, we want to mark anything flashing at faster than about 3 Hz as potentially risky. However, that page also mentions pattern-based epilepsy sensitivity, which I was not aware of. I have a dev branch that logs the change in brightness per-pixel each frame, but finding striping patterns is going to be much more difficult. I suggest starting with the time-based analysis, placing each preset that flashes faster than 3 Hz into a separate folder structure, and then watching for pattern-based presets that may cause further issues.

OfficialIncubo commented 4 months ago

Hey! I found a part of the code in the warp shader code that it gets seizury:

ret.z=1-ret.y;
ret.y=1-ret.x;
ret.x=1-ret.z;

From the preset: cleave and cleave to thine wive's cleavage thankee sai for more trippy ass s*** hail (marked as * to prevent foul language)

YutMarma commented 4 months ago

Please remember that it's not just a matter of taste in this case, but also a potential health issue.

I would appreciate if you exhibited a bit of common courtesy here. I know epilepsy exists (it's right in the title of this Issue) and your post comes across as, to put it mildly, somewhat condescending.

I tried to keep it brief with my original statement - perhaps to the detriment of all involved. So allow me to elaborate on my reasoning a little. I'd like to offer an analogous situation: People also have peanut allergies. It's hardly an edge-case, and in fact peanut allergies are twice as prevalent amongst children as epilepsy is amongst the general population, and generally more-deadly. The proper response which society has arrived at is not to place all the peanut-bearing products on an inconvenient shelf, or demanding that the 99% of the population which does not have peanut allergies (or epilepsy) jump through hoops before having a Reese's. The solution is listing the ingredients.

If this Issue was about labeling flashing presets, that's well and good, but people here are discussing removing - or restricting access to (making things more cumbersome is "restricting access") - some of the most captivating, music-synergized, and in many cases actually beautiful presets to suit the needs of a vastly small minority (about 1.0 - 1.5% of the population, depending on whose numbers you roll with, have active epilepsy, and not all those cases are photosensitive). That's going too far.

Treating epilepsy as a serious issue, the responsible way is a curated whitelist, rather than a blacklist. It is also preferable to offer a separate folder of "epilepsy-safe" presets, rather than the other way around. Rather than expect people with epilepsy to accept on blind faith that the default presets are epilepsy-friendly, having them in a separate, clearly-labelled folder makes it clear up-front that the project is aware of the needs of those with photosensitivity. There's also far less risk of a gray-area preset slipping into the defaults under the radar and spoiling someone's evening.

It's an extra-step for photosensitive people, yes, but even if photosensitivity wasn't an objectively-very-small minority, I personally would feel more comfortable and reassured taking the extra step of installing a folder that came with my download and was expressly-labelled as "epilepsy-safe" - the same way I'm non-hypothetically more comfortable physically turning the headlights on in my car rather than leaving them on "auto" and hoping on blind faith that the car's light sensors don't let me down when it's rainy but bright out.

I know that's a fair amount of text, but unfortunately sometimes a civil dialogue necessitates more than just pithy Twitter one-liners. And besides, reading is fun :)

DuendeInexistente commented 4 months ago

Having a 1% chance to kill somebody is entirely too much when making something that, at a minimum, several thousand people are going to use. That's ten out of every thousand at risk, my man.

This isn't "restricting access", this is not including hazardous code with the default release. In steam it can be a free dlc (no idea if that'd cost the devs money) or just a folder that can be drag and dropped into the presets. Even I, having no epilepsia I'm aware of, get a looming migraine looking at some of them. I'd rather not risk physical ailments using software because someone went lul whatevs.

Secondly, a lot of these aren't even that way due to artistic intent. Projectm is still in development and there's a number of shaders that simply don't display properly (not reacting to the sound at all and in some cases just constantly exploding on my screen even with no sound being played being the inciting situation in this context) so it's not any such thing as the damage to art you seem to imply. It'd be quite literally removing disfunctional, dangerous code from the release.

DuendeInexistente commented 4 months ago

And as an adennum- including this makes projectm unusable in streams and such due to it's risk, where it can otherwise be used to make the screen more interesting or fill blank space. It harms people and harms the software's viability in a lot of use cases.

If someone doesn't see the potentially dangerous presets folder, that's life. I'd rather they stay in the safe lane by default than in the danger lane that makes your brain explode.

YutMarma commented 4 months ago

Having a 1% chance to kill somebody

What is this in reference to? People with photosensitive epilepsy don't generally die as a result of their seizures. Ian Curtis, singer for Joy Division, had one of the worst cases of documented epilepsy and routinely had seizures triggered as a result of flashing concert lights. He did not die - well, not from a seizure, at least. I bring him up specifically because he's almost like a photosensitivity stress test - routine seizures at dingy concert venues triggered by all-consuming surrounding flashes (as opposed to a mere screen) during a period of time where basically no random person could be expected to know how to provide care for someone having a seizure, and with a history of drug abuse to top it all off.

It's not impossible to die from an epileptic seizure, but it's extremely, extremely difficult. Far less than the "1% chance" you imply. It's about on par with the risk of death due to smoke inhalation due to a fire triggered by an overheating GPU/CPU or malfunctioning PC power supply.

That's ten out of every thousand at risk, my man.

Well, you lasted nearly two sentences without being unnecessarily condescending, "my man". I'd settle for lasting one sentence without wild misinformation, but I suppose beggars can't be choosers.

kblaschke commented 4 months ago

To make things a bit more clear:

Removing the flashy presets from our repo is what we're planning to do. This does not mean we're going to implement some technical measures to detect and skip those presets in proejctM itself. You'll still be able to use any preset you like with projectM.

This is not about patronizing anyone, or deciding about good or bad taste - we just want to keep our default preset collection as accessible to anyone as possible, without posing a health risk to even a very small percentage of the users. So from a technical standpoint, the initially asked question to make this collection less flashy is still very valid.

Also remember that libprojectM itself does not come with any presets at all - it's just a library which can be used in any application which has a use for it. Which (if any) presets are shipped with each application is completely up to the application dev, not us here. We'll just provide a collection of presets we think are a good starting point to use projectM and ship with applications, appealing to most users while not posing a (big) risk to anyone at the same time. No one is obliged to use this collection.

If you really want to see the all the original presets, you can simply download the original Cream of the Crop collection and use it with projectM, Milkdrop, Beatdrop of any other compatible visualizer.

If you want to continue the discussion, please do it elsewhere. I'm closing this discussion for the time being.