romnik
Topic Author
Posts: 1
Joined: 21 Jun 2023, 11:35

Incorrect rendering of "Path" in unity when using HDRP

11 Jul 2023, 14:11

image1.png
image1.png (6.51 KiB) Viewed 1237 times
image2.png
image2.png (4.61 KiB) Viewed 1237 times
When rendering in Unity, Paths are distorted when using HDRP (image 1). When rendering in the context of WPF, everything looks fine, as well as when using Unity without HDRP (image 2)

Camera Settings:
camera1.png
camera2.png
camera2.png (19 KiB) Viewed 1237 times
XAML:
<Viewbox Stretch="Uniform">
                <Canvas  Width="120"  Height="120" noesis:Element.PPAAIn="1" noesis:Element.PPAAOut="1">
                    <Path Fill="YellowGreen" noesis:Element.PPAAIn="4" noesis:Element.PPAAOut="1"
                                  Data="M74.3221 68.6129H119.999V48.2852C119.999 25.5901 120.052 27.3202 119.31 25.7654C118.67 24.4246 117.695 23.5978 
                                        116.128 23.0673C115.617 22.8941 114.795 22.8861 94.959 22.8612L74.3221 22.8352V68.6129ZM22.8634 94.8145C22.8898
                                        114.205 22.9007 115.338 23.0652 115.887C23.3794 116.937 23.9082 117.879 24.5323 118.5C25.2346 119.199 25.8646 119.553
                                        26.8629 119.809C27.5971 119.996 28.0036 120 48.1119 120H68.6124V74.3226H22.8354L22.8634 94.8145ZM74.3221
                                        120H119.999V74.3226H74.3221V120Z" />
                    <Path Fill="ForestGreen" noesis:Element.PPAAIn="1" noesis:Element.PPAAOut="1"
                                  Data="M0.528384 3.12648C1.2388 1.57461 2.58337 0.571742 4.50587 0.159677C5.09203 0.0340645 9.20781 0.0148065 36.895
                                        0.00793548L68.6127 0L68.5641 68.5645L0 68.6132L0.00164515 36.7985C0.00348385 2.21391 -0.0298063 4.34574 0.528384 3.12648Z" />
                    <Path Fill="White" noesis:Element.PPAAIn="1" noesis:Element.PPAAOut="1"
                                  Data="M62.9028 37.8027C62.9028 38.0066 55.9366 52.3204 55.6593 52.6859C55.269 53.201 54.5574 53.7813 53.9299 54.0964C53.8842
                                        54.1195 53.8426 54.1414 53.8031 54.1624C53.7568 54.1869 53.7133 54.2101 53.6692 54.2319C52.9429 54.5921 52.0383 54.592 35.0226
                                        54.591L11.5935 54.5909L11.2645 54.2618C10.8923 53.8896 10.8375 53.5125 11.0857 53.0325C11.3087 52.6014 11.3679 51.858 11.2218
                                        51.3269C11.1208 50.9601 10.966 50.7454 10.4703 50.2844C8.46391 48.4185 7.80917 47.5758 7.25537 46.1458C6.77925 44.9162 6.67737 
                                        44.163 6.67737 41.8691V39.7844H42.0965V39.5386C42.0965 39.2092 42.4004 38.6368 42.7531 38.3019L42.793 38.2638C42.8178 38.24 42.8412
                                        38.2174 42.8646 38.1959C42.8856 38.1767 42.9064 38.1584 42.9278 38.1409C43.3882 37.7652 44.1552 37.7646 52.6786 37.7591L53.3948 
                                        37.7586C58.6242 37.755 62.9028 37.7748 62.9028 37.8027Z" />
                    </Canvas>
            </Viewbox>
Unity version: 2022.2.7f1
Noesis GUI version: 3.2.1

A similar problem has already been discussed earlier: viewtopic.php?t=2228
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Incorrect rendering of "Path" in unity when using HDRP

12 Jul 2023, 12:31

Hello,

Your XAML is incomplete and doesn't correspond to the images you attached (you are heavily changing the AA quality by using PPAAIn and PPAAOut).

I modified your XAML to something like this:
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions">
  

  <Viewbox Stretch="Uniform" Margin="10">
    <Canvas  Width="120"  Height="120" >
      <Path Fill="YellowGreen"
                      Data="M74.3221 68.6129H119.999V48.2852C119.999 25.5901 120.052 27.3202 119.31 25.7654C118.67 24.4246 117.695 23.5978 
                            116.128 23.0673C115.617 22.8941 114.795 22.8861 94.959 22.8612L74.3221 22.8352V68.6129ZM22.8634 94.8145C22.8898
                            114.205 22.9007 115.338 23.0652 115.887C23.3794 116.937 23.9082 117.879 24.5323 118.5C25.2346 119.199 25.8646 119.553
                            26.8629 119.809C27.5971 119.996 28.0036 120 48.1119 120H68.6124V74.3226H22.8354L22.8634 94.8145ZM74.3221
                            120H119.999V74.3226H74.3221V120Z" />
      <Path Fill="ForestGreen" 
                      Data="M0.528384 3.12648C1.2388 1.57461 2.58337 0.571742 4.50587 0.159677C5.09203 0.0340645 9.20781 0.0148065 36.895
                            0.00793548L68.6127 0L68.5641 68.5645L0 68.6132L0.00164515 36.7985C0.00348385 2.21391 -0.0298063 4.34574 0.528384 3.12648Z" />
      <Path Fill="White" 
                      Data="M62.9028 37.8027C62.9028 38.0066 55.9366 52.3204 55.6593 52.6859C55.269 53.201 54.5574 53.7813 53.9299 54.0964C53.8842
                            54.1195 53.8426 54.1414 53.8031 54.1624C53.7568 54.1869 53.7133 54.2101 53.6692 54.2319C52.9429 54.5921 52.0383 54.592 35.0226
                            54.591L11.5935 54.5909L11.2645 54.2618C10.8923 53.8896 10.8375 53.5125 11.0857 53.0325C11.3087 52.6014 11.3679 51.858 11.2218
                            51.3269C11.1208 50.9601 10.966 50.7454 10.4703 50.2844C8.46391 48.4185 7.80917 47.5758 7.25537 46.1458C6.77925 44.9162 6.67737 
                            44.163 6.67737 41.8691V39.7844H42.0965V39.5386C42.0965 39.2092 42.4004 38.6368 42.7531 38.3019L42.793 38.2638C42.8178 38.24 42.8412
                            38.2174 42.8646 38.1959C42.8856 38.1767 42.9064 38.1584 42.9278 38.1409C43.3882 37.7652 44.1552 37.7646 52.6786 37.7591L53.3948 
                            37.7586C58.6242 37.755 62.9028 37.7748 62.9028 37.8027Z" />
    </Canvas>
  </Viewbox>
</Grid>
And created an empty HDRP project, added the XAML to the camera and tried all combinations of Post Anti-aliasing in Unity camera and I am not able to reproduce your issue. Make sure PPAA is always enabled in NoesisVIew.

Could you please create a minimal project reproducing your issue and provide a link in a ticket?

Who is online

Users browsing this forum: Bing [Bot] and 4 guests