Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7783717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:55:11+00:00 2026-06-01T19:55:11+00:00

I come across a problem which seems a bug for me. I’m making an

  • 0

I come across a problem which seems a bug for me. I’m making an app that visualizes atoms in a crystal. That problem is that it draws a transparent object and hides the object behind.

enter image description here

Here is the code:

        foreach (var atom in filteredAtoms)
        {
            var color = new Color();

            color.ScR = (float)atom.AluminiumProbability;
            //color.G = 50;
            color.ScB = (float)atom.MagnesiumProbability;
            //setting alpha channel but Opacity doens't work as well
            color.ScA = (float)(1.0 - atom.VacancyProbability); //(float)1.0;//
            DiffuseMaterial material = new DiffuseMaterial(new SolidColorBrush(color));
            //material.Brush.Opacity = 1.0 - atom.VacancyProbability;

            // make visuals and add them to
            atomBuldier.Add(new Point3D(atom.X * Atom.ToAngstrom, atom.Y * Atom.ToAngstrom, atom.Z * Atom.ToAngstrom), material);
        }

When I change the material to e.g. EmissiveMaterial there are no “cut” atoms. I googled this post, but the advices given don’t apply to this case.

Is this a bug with 2D brush applied to 3D?

The full source code can be found here http://alloysvisualisation.codeplex.com the dll and a test file http://alloysvisualisation.codeplex.com/releases beta link.

Steps to reproduce:

  1. Lunch app
  2. Click Open file button
  3. Open test file (xyzT2000.chmc)
  4. Click Mask button
  5. Check 11 (series of atoms are almost transparent)
  6. Ckick Redraw
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:55:13+00:00Added an answer on June 1, 2026 at 7:55 pm

    For the transparent atoms, you must disable z-buffer-writing. I’m unfamiliar with WPF, but you can probably set this in an Appearance or Material object or so.

    The problem occurs because of the following:

    When a transparent atom is rendered, it writes its depth to the z-buffer. Subsequent non-transparent atoms that are rendered and should appear, do not get written to the frame buffer, because their z-values fail the z-test, because of the z-values already in the z-buffer of the transparent atom.

    In short, the graphics card treats the transparent atom as opaque and hides anything behind it.

    Edit: Upon looking into WPF it seems pretty high-level, without direct control of z-buffer behavior.

    According to this link, the emissive and specular materials do not write to the z-buffer, so using those is your solution when working with transparent objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently come across a problem which requires at least a basic degree of
I'm fairly new to LWJGL/OpenGL and I've come across this problem which I can't
I've come across a strange thing in Firefox, which has become a problem to
I'm rather new to JAXB and have come across a problem which I can't
I have come across a problem with binding to a PasswordBox . It seems
I'm still getting the hang of Rails, and I've come across a problem that
Hey there guys, I'm learning processing.js, and I've come across a mathematical problem, which
I have come across the following thread which sorted out part of my problem.
I've just come across a pretty strange problem with VS2010 and Script#, which most
I come across this problem when i am writing an event handler in SharePoint.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.