Search Unity

Light Editor Skin Possible Solution : filtering utility

Discussion in 'General Discussion' started by Darksider, Jul 5, 2015.

  1. Darksider

    Darksider

    Joined:
    Apr 25, 2013
    Posts:
    48
    Hi. I saw several threads where people were complaining and asking for dark theme in Unity Personal.
    Now...Before a lot of Unity features went in the free version, people tried to find workarounds to achieve them. For example, some were making glow addons, altough glow was an Unity Pro only feature.
    I didn't find a thread where people were discussing technical workarounds, so here are my ideas:

    An external filtering utility, witch does the following :

    1. Detects the pannels layout, especially viewports.
    2. Applies filters or effects such as inversion on UI elements, outside of viewports.

    Each pixel has a RGB vallue. For a certain RGB vallue ( such as editor's gray), we apply a filter on top of that pixel that makes it darker.

    I don't know what could be the performance impact of this utility, but it might work.

    What do you think ? Is such a utility doable ? Also ,could the pannels (viewports) layout information be obtained in realtime to feed the app ?
     
  2. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Hm, I think it's doable, but it would need to be two-fold solution:

    1. Editor scripts to obtain layout info (positioning, sizes, etc. and save somewhere updating it every so often
    2. External app that draws on Unity's window using WinApi calls (you'd need native app for that, unmanaged - .NET won't work there as well because of not every WinAPI function having .NET equivalent), GDI in particular taking into consideration layout info (so it won't try to e.g. draw over scene view).

    As for performance, I think it would have negligible effect on it as I've done similar things in the past (when Clippy still was a thing, I've wrote simple app that used GDI calls to office assistant process drew clown makeup over Clippy).
     
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Here is one solution. Work for a third party for a week or two. Pay for pro. Turn on dark skin.

    Its likely to be less effort then trying to work around the editor restrictions. :)
     
  4. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    I still dont see why they kept the dark skin pro only... (probably cause my eyes are burnt out looking at that free version) *chuckle*

    *stares at entire screen of white/light gray/black text that is this webpage*
     
    Kiwasi likes this.
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    I recommend carefully considering whether or not Unity would like you to release a solution for bypassing what is normally only available to those who have purchased their engine. Is it really any different from pirating for the sake of having the skin?
     
    Kiwasi likes this.
  6. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    There are plenty of aps out there that will flip you screen colours in various ways. My father, who is getting pretty close to being defined as legally blind, uses this sort of thing to mess with contrast and the like to make things usable (combined with various magnifiers and text-to-speech converters). If its just eye strain that's bothering you, simply get one of those and reverse everything.

    He is also losing his hearing. Thus he is building an app that translates all of his messages into Morse code. That way he can keep on communicating even after his sight and hearing are gone.
     
  7. Darksider

    Darksider

    Joined:
    Apr 25, 2013
    Posts:
    48
    After some research, I have found a free Open Source app that could invert screen blacks and whites, without affecting colours:
    http://arcanesanctum.net/negativescreen/

    I haven't tested it with Unity yet, but it seems promising.

    This app could be modified to do the following:

    The user could mannualy drag a rectangle selection, after pressing a hotkey. The area inside the rectangle is not affected by inversion.

    The sources for this app are written in C#, the same language as some Unity uses.


    The app could also be configured to match Unity Dark theme colours.
    As they said:

    You can now choose your own hot keys if you don’t like the defaults, and you can even add you own color effects!
    This requires some knowledge in color matrices though.
    I may add an easy way to build some in a future version…

    What do you think ?
     
  8. Darksider

    Darksider

    Joined:
    Apr 25, 2013
    Posts:
    48
    Got another idea:
    If the image in the viewport could be inverted, then negativescreen app will nullify the inversion, rendering the black and white right.

    Now how could inversion be achieved in viewport while editing scenes ? When you press play, image effects are activated, but only when the game runs.

    Could a shader be applied to the camera that inverts the image in edit mode ?
     
  9. Darksider

    Darksider

    Joined:
    Apr 25, 2013
    Posts:
    48
    I have made some tests. Here are 3 screenshots: one with light skin, one with inverted light skin and one Unity PRO.
    1. Unity Pro

    2. Unity Personal - inverted



    3. Unity Personal - non inverted


    As you could see, if the inverted Unity Personal theme is darkened a little by tweaking the matrices inside NS configuration file, it would resemble Unity Pro theme.
    Now...are there scripts that could invert the viewport blacks and whites ? What solutions could there be to invert viewport colours, so they are seen normally ?

    I have found out that the same people that created NS provide an utility for creating colour matrices for use in it. This might come handy:

    http://arcanesanctum.net/colormatrix-viewer/
     
  10. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    sorry, but that looks worse than the light theme. and i dont mean the viewport. you also have to exclude the gizmos and all that stuff from being inverted. i dont think that works.
    beside just buying the pro version or get used to the light version.. trust me. there are easier ways to have a darker skin
     
  11. Darksider

    Darksider

    Joined:
    Apr 25, 2013
    Posts:
    48
    How could a darker skin be achieved in easier ways ?
     
  12. Taz-dragon

    Taz-dragon

    Joined:
    May 21, 2015
    Posts:
    38
    Why... do we want this?
     
    Kiwasi and angrypenguin like this.
  13. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I ask this in all seriousness: wouldn't time "solving" this be better spent making games?
     
    Kiwasi likes this.
  14. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Sounds sad yet inspiring.
     
    Kiwasi likes this.
  15. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    That seems like a terribly inefficient solution when unity has the required stuff built in, you just have to activate it.
     
  16. Taz-dragon

    Taz-dragon

    Joined:
    May 21, 2015
    Posts:
    38
    EXACTLY