Skip to content
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

Anti-aliasing introducing additional colours into Viewport Renders. #2138

Open
whogoesthere opened this issue Feb 7, 2024 · 3 comments
Open

Comments

@whogoesthere
Copy link

I'm using HelixToolkit.Wpf.SharpDX to draw some colour-keyed triangles to a Viewport3DX and then rendering the scene to determine which triangles are visible. I render the Viewport3DX to a bitmap source using

BitmapSource B = ViewPort3DX.RenderBitmap(Cols, Rows);

and then look at the colours of the pixels in the rendered scene to determine the index of the visible triangle.

The problem is the anti-aliasing and rendering introduces colours which weren't in my original scene and not in my mapping. How can I render to a bitmap which retains my original colour content without introducing additional colors to the bitmap? I've tried numerous switches on the ViewPort3DX but not having any luck. (AmbientLight3D in the Viewpoer is Color='White';)
Thanks for your help
Best regards
Ian

@holance
Copy link
Member

holance commented Feb 7, 2024

Could you provide some image examples for your issue?

@whogoesthere
Copy link
Author

whogoesthere commented Feb 7, 2024 via email

@holance
Copy link
Member

holance commented Feb 7, 2024

Couldn't see the images. You probably have to turn off the anti aliasing during exporting if you need precise pixel colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants