Can't get UIDetect work

  • Fabu
  • Topic Author
More
5 years 2 months ago - 5 years 2 months ago #1 by Fabu Can't get UIDetect work was created by Fabu
Hi, I try a lot of things but I can't get the uidetection works, the effects just pass through the layer UIDetectMaskRGB as it shows:

Without the effect
ibb.co/T1k1zbc

With effect eneable, with a reset before
ibb.co/0f7MgfF

The only thing that "works" is the black area - UI desired - that is eneable by uimask_bottom
ibb.co/WtQGHcs

I noticed that when I eneable uidetect, it doesn't appear any option to adjust, nothing happens

Any help is appreciated!
Last edit: 5 years 2 months ago by Fabu.

Please Log in or Create an account to join the conversation.

  • brussell
More
5 years 2 months ago #2 by brussell Replied by brussell on topic Can't get UIDetect work
First, UIMask is a seperate shader. UIDetect only uses UIDetect, UIDetect_Before, UIDetect_After and comes with it's own UIDetectMaskRGB.png.

Have you read the description ( github.com/brussell1/Shaders/blob/master/Shaders/UIDetect.fxh ) and followed it's steps?

Please Log in or Create an account to join the conversation.

  • Fabu
  • Topic Author
More
5 years 2 months ago #3 by Fabu Replied by Fabu on topic Can't get UIDetect work
Hi Brussell,

Yes, I followed the description but I don't know what I'm missing... this is my UIDetect.fxh config

#define PIXELNUMBER 3

static const float3 UIPixelCoord[PIXELNUMBER]=
{
float3(40,8,1),
float3(39,7,1),
float3(84,4,1),

}
static const float3 UIPixelRGB[PIXELNUMBER]=
{
float3(0,0,0),
float3(212,203,196),
float3(192,184,144),
}
*/

This is the png image that I use for detection:
ibb.co/5241Dz7https://ibb.co/5241Dz7


and the effects order:
ibb.co/0f7MgfF

The pixel coordinates and color are based in this top left part of the screen (1920x1080)
ibb.co/T1k1zbc

Thanks!

Please Log in or Create an account to join the conversation.

  • brussell
More
5 years 2 months ago #4 by brussell Replied by brussell on topic Can't get UIDetect work
Are you sure you set "UIDetect_USE_MASK" to true?
If yes, it could be possible that the color values you got from the screenshot don't match with the real ones. You can check this via "UIDetect_ShowPixel" (details in description) and edit the values accordingly.

Please Log in or Create an account to join the conversation.

  • Fabu
  • Topic Author
More
5 years 2 months ago - 5 years 2 months ago #5 by Fabu Replied by Fabu on topic Can't get UIDetect work
About the first, yes, as the follow image:

ibb.co/VDSTWRT

I check the colors and coordinates in Photoshop and they are ok, but as you said in the instructions maybe there is some change ingame vs screenshot, so how I can eneable UIDetect_ShowPixel? it this an effect? because I don't find it in the library

"-UIDetect_ShowPixel must be the first and only effect in the load order when used"

Thanks in advance
Last edit: 5 years 2 months ago by Fabu.

Please Log in or Create an account to join the conversation.

  • brussell
More
5 years 2 months ago - 5 years 2 months ago #6 by brussell Replied by brussell on topic Can't get UIDetect work
Yes, you should find UIDetect_ShowPixel in the list of effects. Once enabled, you can set the x and y position of the pixel for which you want to see the color.
Then take a screenshot and use a color picker tool in Photoshop to see the real RGB values.
Last edit: 5 years 2 months ago by brussell.

Please Log in or Create an account to join the conversation.

  • Gabe_over
More
3 years 7 months ago #7 by Gabe_over Replied by Gabe_over on topic Can't get UIDetect work
Hello im having issue with making Detect UI work... tried everything that came to my mind. Here is video showcasing what I did, if you can please help me :(

Please Log in or Create an account to join the conversation.

  • brussell
More
3 years 7 months ago #8 by brussell Replied by brussell on topic Can't get UIDetect work
@Gabe_over

... it could be possible that the color values you got from the screenshot don't match with the real ones. You can check this via "UIDetect_ShowPixel" (details in description) and edit the values accordingly.
So in your case, activate UIDetect_ShowPixel as the first in the effect order and enter your first coordinate (3025,112) into Pixel X-Position, Pixel Y-Position. Take a screenshot and check the real color values of that pixel and write/correct them in the UIPixelRGB array. Always start with one pixel for every UI-layer. If it works with one pixel, add another one etc.

Please Log in or Create an account to join the conversation.

  • Gabe_over
More
3 years 7 months ago #9 by Gabe_over Replied by Gabe_over on topic Can't get UIDetect work
So I did exactly that, but with the default 2 pixels per UI, RGB values were slightly different from ones that I got from the screenshot, but it didn't work either. So I should try with single-pixel?

Please Log in or Create an account to join the conversation.

  • brussell
More
3 years 7 months ago #10 by brussell Replied by brussell on topic Can't get UIDetect work
Yes, it should look like this:
#define PIXELNUMBER 1

static const float3 UIPixelCoord_UINr[PIXELNUMBER]=
{
    float3(3025,112,1),  
};

static const float3 UIPixelRGB[PIXELNUMBER]=
{
    float3(xxx,xxx,xxx),      //your RGB values from the ShowPixel-screenshot
};

Btw, are you sure the UI is 100% opaque?

Please Log in or Create an account to join the conversation.

  • Gabe_over
More
3 years 7 months ago #11 by Gabe_over Replied by Gabe_over on topic Can't get UIDetect work
So what now? I got pixel cords for the skull, got show pixel, screened it, got RGB values, and modified it to just use one pixel. Still nothing :/
[img
[img

Please Log in or Create an account to join the conversation.

  • Gabe_over
More
3 years 7 months ago #12 by Gabe_over Replied by Gabe_over on topic Can't get UIDetect work
Pretty sure. When screened without clear alfa channel - im pretty sure that element is opaeque.
[img

Yes, it should look like this:
#define PIXELNUMBER 1

static const float3 UIPixelCoord_UINr[PIXELNUMBER]=
{
float3(3025,112,1),
};

static const float3 UIPixelRGB[PIXELNUMBER]=
{
float3(xxx,xxx,xxx), //your RGB values from the ShowPixel-screenshot
};


Btw, are you sure the UI is 100% opaque?
 

Please Log in or Create an account to join the conversation.

  • brussell
More
3 years 7 months ago #13 by brussell Replied by brussell on topic Can't get UIDetect work
Hmm, what Stalker game/mod is this? Seems I need to check it out.

Please Log in or Create an account to join the conversation.

  • brussell
More
3 years 7 months ago #14 by brussell Replied by brussell on topic Can't get UIDetect work
I did a quick test with Stalker Anomaly Dx11AVX and it works just fine for me.

As a last option you could try to raise the value of epsilon in line 29 of UIDetect.fx a bit, eg 0.0001 instead of 0.00001.

Please Log in or Create an account to join the conversation.

  • Gabe_over
More
3 years 7 months ago #15 by Gabe_over Replied by Gabe_over on topic Can't get UIDetect work
That EFPs 3.0 Custom UI.... will try testing with line 29 today.

Please Log in or Create an account to join the conversation.

  • brussell
More
3 years 7 months ago #16 by brussell Replied by brussell on topic Can't get UIDetect work
I've just updated the shader. I don't know if the changes solve your problem, but you should try it out.
The following user(s) said Thank You: Yossarrian

Please Log in or Create an account to join the conversation.

  • Yossarrian
More
3 years 7 months ago - 3 years 7 months ago #17 by Yossarrian Replied by Yossarrian on topic Can't get UIDetect work
Hello Sir,

Thank you for this fine script. It is working as a charm with menus. I came accross to an issue though. Im using DOF shaders but when I pull a gun in game (lets say in Cyberpunk 2077) I´d like to use detect UI to hide DOF. I made a video with the issue and following scenario...The gun holstered means no HUD elements (all shaders active), I pull the gun out the HUD interface pop on the screen (all shaders should decativate according the pixel taken from the screen with HUD). Seems to be working but I tried several different pixel HUD spots but always with the same result - flickering (turning the shaders on and off rapidly).

Would you have any ideas how to solve this issue? Im using UIDetect 2.2.



Thank you.
Yoss
 
Last edit: 3 years 7 months ago by Yossarrian.

Please Log in or Create an account to join the conversation.

  • brussell
More
3 years 7 months ago #18 by brussell Replied by brussell on topic Can't get UIDetect work
Are you sure that the HUD is 100% nontransparent?

Please Log in or Create an account to join the conversation.

  • Yossarrian
More
3 years 7 months ago #19 by Yossarrian Replied by Yossarrian on topic Can't get UIDetect work
Well, it seems that all in-game hud objects in Cyberpunk 2077 cant work with DetectUI as they are not probably fully opaque. What a shame. Thanks anyway.

Please Log in or Create an account to join the conversation.