Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Tarique

Fog Problem - Urgent help required.

This topic is 6827 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, we finally delivered our 'final' version of the software to our client and their testers have come back with a list of problems. Most of them I have now fixed. The only one that remains is a problem that occurs only on certain cards. Any help in identifying how to get aorund this problem would be appreciated. The problem occurs on a RagePro card and a Diamond Viper 330. Basically what's happening is that alpha transparent textures are only being fogged to black, even though I'm fogging to white. Our underwater scene fogs to a blue hue. However, I have seaweed which is alpha masked anf that only fogs to black. Bare in mind this only happens on a couple of cards. Most cards I've tested render them fine. Any clues as to what I can look at to get around this? Once this is solved, I'm home and dry! And the title will be released at which point I can tell you what it is and show you some screen shots. It's looking quite good now. Please help!!!! Cheers, Taz. Edited by - Tarique on 3/7/00 4:07:26 PM

Share this post


Link to post
Share on other sites
Advertisement
Further to my post above, the render state stuff is below:-

wgtd3ddev->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
wgtd3ddev->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
wgtd3ddev->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
wgtd3ddev->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
wgtd3ddev->SetRenderState(D3DRENDERSTATE_SHADEMODE, D3DSHADE_GOURAUD);

if(PR_D3D_Caps.AlphaBlend)
{
wgtd3ddev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
wgtd3ddev->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
wgtd3ddev->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);

wgtd3ddev->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); <<---- THIS

wgtd3ddev->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA);
wgtd3ddev->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA);
wgtd3ddev->SetRenderState(D3DRENDERSTATE_ALPHATESTENABLE, FALSE);
wgtd3ddev->SetRenderState(D3DRENDERSTATE_COLORKEYENABLE, FALSE);
}

If I comment out the ALPHABLENDENABLE (labelled above as ''THIS''), the fogging works, ie it fogs to the specified fog colour. However, obviously the alpha blending no longer works! Commenting it back in again forces the polygons to fog to black, regardless of the current fog colour.

I have tried to force the fog colour (as a test) within this renderstate function, but it still doesn''t work.

Any help would be appreciated.

The testers have found this problem on the following cards:-

Diamond Viper 330 (4MB AGP)
Video Logic Grafix Star 560 (4MB - AGP)

and I have managed to get this problem on my RagePro card.

They also state that they have downloaded the latest drivers for the cards and the problems persist.

Is there anything I can try to get around this?

Thanks for any help received!

Cheers,
Taz.


---------------------------------
Tarique Naseem
Technical Director
Maelstrom Virtual Productions Ltd.
http://www.maelstrom.com

Share this post


Link to post
Share on other sites
This doesn''t sound like anything you or I can fix. Maybe those cards just don''t support color fogging with alpha blending. It is easier to fog to black since you just decrease the color values at each vertex.

Making an option in your application to disable fog is probably all you can do.

Chris

Share this post


Link to post
Share on other sites

This is basically what I have told them. Let''shope they fall for it and pay the last installment for the project.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!