Rendering artifacts on Intel HD Graphics 4600

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Rendering artifacts on Intel HD Graphics 4600

Post by ShawnCG » Tue Feb 25, 2014 1:00 am

Several of our users are reporting rendering artifacts on computers with Intel HD Graphics 4600 display adapters. Here is an example SurfaceGridSeries3D where all of the values are zero. In the first screenshot (a system with an AMD display adapter), the surface looks correct, but in the second, something odd is happening with the shading.
FlatWavefrontExampleGood.png
FlatWavefrontExampleGood.png (15.61 KiB) Viewed 24776 times
FlatWavefrontExampleBAD.png
FlatWavefrontExampleBAD.png (88.89 KiB) Viewed 24776 times
Is this a known issue with Intel display adapters? Is there any way to programmatically detect a GPU requirement is not met before rendering to notify the user of a possible issue?

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ArctionPasi » Tue Feb 25, 2014 3:49 pm

Is your WallOnBottom.Visible = false, or is it just a white wall? If WallOnBottom is visible, and grid values are 0, it will cause Z fighting because the bottom wall and series are rendered in the same position. But if that happens, it should also happen with NVidia.

I tested with Intel HD Graphics 4000 (not 4600) and surface renders correctly when bottom wall is hidden, even when using zero values.

This is the code I used

Code: Select all

LightningChartUltimate m_chart; 
		
		public MainWindow()
		{
			InitializeComponent();

			m_chart = new LightningChartUltimate(); 
			m_chart.BeginUpdate(); 
			m_chart.ActiveView = ActiveView.View3D; 

			SurfaceGridSeries3D surface = new SurfaceGridSeries3D(m_chart.View3D, Axis3DBinding.Primary, Axis3DBinding.Primary, Axis3DBinding.Primary); 
			surface.SetRangesXZ(20,80,20,80); 
			surface.Fill = SurfaceFillStyle.Toned;
			surface.ToneColor = Colors.Magenta; 
			surface.WireframeType = SurfaceWireframeType.None; 
			surface.SetSize(100,100);
			m_chart.View3D.SurfaceGridSeries3D.Add(surface);
			m_chart.View3D.WallOnBottom .Visible = false;

			gridMain.Children.Add(m_chart); 
			
			m_chart.EndUpdate(); 
		}
We unfortunately don't have 4600 model here.

Can you post your code here?
LightningChart Support Team, PT

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ShawnCG » Tue Feb 25, 2014 5:08 pm

Here is some additional information that might help find a possible bugfix/workaround:
  • The surface data is a square grid that is zero within the circular region and values set to Double.MinValue (-1.7976931348623157E+308) in the area meant to be clipped.
  • View3D.ClipContents is set to true
  • WallOnBottom.Visible = false
  • On the graphics cards that exhibit this rendering problem, the under-surface is actually rendered fine, just the top surface has the odd triangulated pattern.

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ShawnCG » Tue Feb 25, 2014 5:30 pm

Also, some of our users who are seeing this rendering artifact have the HD Graphics 4000 cards. So, we are seeing it with the 4000 and 4600 models.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ArctionPasi » Tue Feb 25, 2014 5:41 pm

Thanks for this info.

Does the artifact disappear if setting ClipContents = false?

If it disappears, set back to True and adjust YAxisPrimary.MinValue to slightly negative value. When data exists in the axis end value, it clips.
LightningChart Support Team, PT

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ShawnCG » Tue Feb 25, 2014 6:34 pm

We just tried and, interesting enough, changing ClipContents to false doesn't make a difference. We also get rendering artifacts for cases where the surface isn't flat. I'll also re-iterate that the under-side of the surface renders just fine.

Here are a few more screenshots. First is the top-side rendered on the Intel card. Next, you can see the bottom of the surface rendered on the same card which looks OK. Finally is a screenshot showing the top surface rendered correctly on an AMD card.
screenshotWFTopbad.png
screenshotWFTopbad.png (65.6 KiB) Viewed 24759 times
screenshotWFunderside.png
screenshotWFunderside.png (57.01 KiB) Viewed 24759 times
screenshotWFTopCorrect.png
screenshotWFTopCorrect.png (79.61 KiB) Viewed 24759 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ArctionPasi » Tue Feb 25, 2014 9:11 pm

Please post the source code of that. You can export surface series data with surface.SaveToCSV().

Or small solution preferred...
LightningChart Support Team, PT

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ShawnCG » Fri Feb 28, 2014 11:19 pm

Here is a simple example project to reproduce the rendering problem.
LCSurfaceRenderIssue.zip
(11.25 KiB) Downloaded 1031 times
This is a screenshot of the rendering on an Intel HD Graphics 4600 display adapter.
RenderIssueExampleOnIntel4600.png
RenderIssueExampleOnIntel4600.png (121.22 KiB) Viewed 24710 times
This is a screenshot as it looks on my AMD FirePro.
RenderIssueExampleOnAMD.png
RenderIssueExampleOnAMD.png (122.77 KiB) Viewed 24710 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ArctionPasi » Sun Mar 02, 2014 3:35 pm

Thanks for the code. Use Double.NaN instead of Double.MinValue. It seems to work with Intel as well as AMD and NVidia.

Also set WireFrameType = None, otherwise you'll get strange wireframe lines around the chart.
Intel with Double.NANs
Intel with Double.NANs
IntelNan.jpg (76.18 KiB) Viewed 24674 times
You may want to also set ColorSaturation near 100, the prevent light computation with Double.NaNs from disturbing in the edges.
LightningChart Support Team, PT

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Rendering artifacts on Intel HD Graphics 4600

Post by ShawnCG » Wed Mar 12, 2014 4:07 pm

The recommendation to use Double.NaN instead of Double.MinValue works for us except for the strange wireframe lines as you mentioned. On most display adapters those lines do not show up, but on the Intel HD Graphics 4000/4600 they do. Please let us know if/when you find a work-around or bug fix for the wireframe artifacts.

Post Reply