Re: Problems with Z-buffering

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello !

Thank you for the new suggestions regarding alpha blending. However, these
tricks did not provide a solution either. In order to clarify the results, I
am posting links to the rendered model with ALPHATESTENABLE and
ALPHABLENDENABLE first as both disabled, then test enabled, then blend
enabled, and finally both enabled. Pictures are in respective order as
below:

http://www.tpu.fi/~t1akeski/chair_alpha_alloff.bmp
http://www.tpu.fi/~t1akeski/chair_alpha_teston.bmp
http://www.tpu.fi/~t1akeski/chair_alpha_blendon.bmp
http://www.tpu.fi/~t1akeski/chair_alpha_bothon.bmp

As you can see, even with alpha testing/blending disabled, the chair remains
transparent from the back wall. In all images, the backface culling mode is
set to CCW, as in the previous post it was discovered that changing this
option has no desired effect on the result.

With both face culling, Z-testing and alpha testing options circled through,
I myself am running quite low on options as to where this problem might
infest itself. The material has been double-checked for opaque options (set
to 1.0f in all).

Anything else I should try out ? Does anyone have a clue how the DXUT
Framework sets the rendering options ? Should I create a sample application
with it and try to see if it renders correctly (thus, resolving possible
backbuffer format etc issues) ?

In search of solution,
Antti Keskinen

-------------------

"Callum Winter" <callum@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ep2I0$DaFHA.3320@xxxxxxxxxxxxxxxxxxxxxxx
>> Unfortunately no. The culling is not the problem. In order to elaborate
> the
>> situation, I have uploaded a few bitmap images of all culling modes
>
> It may be a longshot but as there seems to be no facial difference in any
> images in different cull modes, it looks to me like you have set material
> or
> vertex transparency, and you are seeing inside floor and back face through
> the others, as the colours blend rather than stay the same as you would
> expect with a z order problem.
>
> Try setting the ALPHABLENENABLE and ALPHATESTENABLE render states to false
> before you render the object and see if it makes any difference. If it
> does,
> check the diffuse member of your material and/or vertices to make sure the
> alpha component is set to 1.0f(opaque) and not less than 1.0f. which would
> be transparent, if alpha blending is turned on.
>
> pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
> pDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE);
> pObject->Render();
>
> Hope this helps.
> Callum.
>
>


.



Relevant Pages

  • Re: Problems with Z-buffering
    ... could be something inside that is similar to Alphablending... ... > Thank you for the new suggestions regarding alpha blending. ... > culling mode is set to CCW, as in the previous post it was discovered that ... >> before you render the object and see if it makes any difference. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: DirectDraw and Direct3D
    ... Render them in back to front order and use color keying to exclude pixels ... with alpha blending and alpha testing enabled (or just ... layer behind the previously displayed layer for pixels that are removed. ... texture in video memory whenever the background is updated. ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Animating text, letter by letter...
    ... Steve Reeves wrote in ... I have in fact done this using the black plane method as Gene has ... Could somebody explain a little as to how I might use an Alpha channel ... set up and much quicker to render than disolve or transparency. ...
    (comp.graphics.apps.lightwave)
  • Re: Problems with Z-buffering
    ... the model still doesn't render correctly. ... The only last possiblity is that the device settings and/or backbuffer modes ... > Can you please post all the SetRenderStageStates you are using, ... >> Thank you for the new suggestions regarding alpha blending. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Render-Target destination alpha
    ... see doc section "Render Target Alpha" ... > Render scene into render target, flagging some pixels as stencil bits ... > Render untextured poly, clearing alpha channel (D3DRS_COLORWRITEENABLE, ...
    (microsoft.public.win32.programmer.directx.graphics)