New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stereoscopic depth for Confluence #8147
Conversation
<include name="CommonWindowHeader"> | ||
<param name="icon" value="icon_addons" /> | ||
<param name="label" value="$LOCALIZE[24001]" /> | ||
</include |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -8,6 +8,7 @@ | |||
</coordinates> | |||
<controls> | |||
<control type="group"> | |||
<depth>DepthDialogue+</depth> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
6c9935f
to
f603ea2
Compare
I addressed the comments so far and fixed some other things I noticed (gave dialogs that usually show up on top of others a higher depth, like DialogOK). |
<include>Window_OpenClose_Animation</include> | ||
<animation effect="slide" start="0,0" end="-40,0" time="75" condition="Window.IsVisible(Mutebug)">conditional</animation> | ||
</control> | ||
</depth> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
updated. Should hopefully be ready for prime time now. Things I changed since last update:
Skinners, please give it a short review again and hit the button if you like |
is this something that can (or maybe should) be fixed in core? other than that, i'm fine with adding 3D support to Confluence. |
thanks for review and testing @ronie. I also thought that it would be nicer to handle this in core, but I honestly have no idea if this will work reliable. Skinning engine does not know which control is supposed to be used as a background and therefor could be overstretched. We could ofc check if the control touches the edges of the canvas and then shift it for the exactly required 3D offset and adjust the width accordingly, but this might also effect controls with text or lead to other alignment oddities. We can ofc give it a try. Also, the 1300x731 offset is not set to stone, it's a random value I found to work well with our used 3D depths of these items, so if a skin would use -1 as depth, it might need more overstretching. And I just realized that I didn't need to change the hight as long as the picture aspect ratio is set correctly for the control. How would you like to go on from here, put this PR on hold and try to find a core solution or merge it for now and then try to find a core solution? |
There is a system setting for this 3D effect, right? What about putting the image dimensions into includes so we take the slightly oversized fanart dimensions when 3D effect is active and the normal image dimensions when no 3d effect is active? |
mind giving an example of what you had in mind? |
Of course. <control type="image">
<include condition="system.getbool(settings.name)">include_with_oversized_dims</include>
<include condition="!system.getbool(settings.name)">include_with_normal_dims</include>
...
</control> |
instead of includes, maybe use a conditional zoom animation based on that setting? |
Would also be fine, yes. |
Whats the advantage of zoom animations instead of includes? The zoom animation is evaluated at every frame afaik, while the include is only evaluated at window load. Not sure if it has any impact in this case, but in theory the zoom animations are less efficient. |
True, but the impact is probably negligible and animations seem to look a bit cleaner to me in skin code. (just one additional line for every bg image control + no need for two additional includes) I dont mind which one we take, but i think it would be nice to avoid scaling for non-3d setups by using one of these methods. |
In this case cleaner code is better indeed. Sorry for noise. |
I moved the background dimension and zoom stuff to an include and used that all over. Feel free to review and push the button |
ok guys, I realized we really need animation support for the depth because adding it to Anybody able to implement it into our GUI engine (will require handling of z coordinates correctly, so not a simple fix from a first look). |
Stereoscopic depth for Confluence
I'd start with 2-4 and see what happens. Biggest issue IMO will be playing around with camera distance to get it looking reasonable. By the looks that's what your current stereo factor stuff in graphiccontext is doing - looks like that can be dropped and a fixed cam location used. |
thanks @jmarshallnz - I had the feeling that this requires bigger changes from a quick look. Let's see if I can get my head around it. |
This PR adds subtile stereoscopic depth to Confluence. OSD and dialogues will pop out of the screen so that they stay on top of random objects from videos that also pop out. The popout effect is using ~60% of the possible depth which should be enough for everage movie scenes. It won't cover all cases ofc, but it'll be way to extreme if we'd go all the way for main UI elements. The main content area stays at level 0, which means that while you're browsing in GUI your eye can focus directly to the screen without hurting your eyes. The downside of this is, that a potentially playing movie in background will cause distractions on transparent areas. To compensate for that I pushed back the video background panel, but this doesn't seem to have an effect atm. Maybe @afedchin could have a look.
This PR depends on #8146 as it uses constants for the depths values for easy tweaking.
@ronie @phil65 @BigNoid please review. To simplify some things I created an include for the common global header (breadcrumb + clock) - not sure you like that, but I hope so.