1
\$\begingroup\$
using Microsoft.DirectX.Direct3D;
using Microsoft.DirectX;

I render a 3D data by setting device.RenderState.AlphaBlendEnable = true

Solid FillMode @ Side view

WiredFrame FillMode @ Side view

Now my top view looks like below, the outer surface layer covered the underneath layers and resulting only outer layer is displayed at top view.

Solid FillMode @ Top view

I would like to view the underneath layer from top view. How do I do this? Is there any setting can be done using Microsoft.DirectX ?

Update: Question is solved by myself

device.RenderState.ZBufferWriteEnable = false;
\$\endgroup\$
  • \$\begingroup\$ Can you be more specific? From what I understand you want the "overlay" to be transparent, which it appears to be? Or do you want it to be invisible when seen top-down? Could you try faking (e.g. using some drawing program) what you'd like to achieve? \$\endgroup\$ – Mario Sep 5 '13 at 9:57
  • \$\begingroup\$ Looks like you want the green bits to also show up in the top-down view? \$\endgroup\$ – MichaelHouse Sep 5 '13 at 12:59
1
\$\begingroup\$

You're only seeing the top layer of your data from the overhead view because your depth buffer is enabled. One way to fix this and possibly achieve the result you want is to disable writes to the depth buffer when rendering that volume data:

device.RenderState.ZBufferWriteEnable = false;

Do note that this could mean some objects that should be behind others show up "in front," especially if you are not then depth-sorting your transparent rendering. You may want to look into other ways to handle order-independent transparent rendering, such as depth peeling.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.