Archived

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

Dahadrael

Ugly Clipping

Recommended Posts

Just wondering if anyone had any advice on this problem I have. I have a scene in the landscape editor with some trees on it. When you move away eventually the far edge gets clipped. It looked pretty ugly because pieces of the tree would disappear at a time. So I used the fog to smooth things out. However, when I put in a skycube with a nice background the same thing happens. The trees slowly blend to the fog colour but when the fog doesn''t match the background there''s sharp ugly clipping again. Might there be a way to fog to transparency rather than to a specific colour or maybe someone has a completely different approach? Thanks

Share this post


Link to post
Share on other sites
There is "alpha fog" which is exactly what you want. It will make things more translucent as they go farther away. This can be easily done in LS, but I belive for PRO files you have to set the render method to FOG on each material separately.

-Rich

Share this post


Link to post
Share on other sites
Thanks... I think I need a new video card...this one doesn''t seem to support alpha fog....but I can''t do without it. Hehe.

Thanks again :-)

Share this post


Link to post
Share on other sites
Alpha fogging isn''t available when you use the D3D pipeline, so it no longer works for terrain. I may remove this feature altogether. You will still be able to create it using vertex shaders.

There are a couple of things you can do.

1) Move the far clipping plane of the camera in closer, so instead of objects popping in all at once they will be clipped.

2) Design your skybox so the middle part is filled with your fog color. If you''re close to the ground most of the time objects will lie in the middle part and look fine as they come into view.


Share this post


Link to post
Share on other sites
Unfortunately the skycube cant'' match the fog...that was part of the reason I couldn''t use normal fog in the first place. I''m looking into the camera''s viewing range, but I don''t really want them to clip at all. That would just be like using no fog wouldn''t it?

Don''t think vertex shaders will be practical...too new.

I don''t suppose there''s a way of disabling the d3d pipeline and sneaking in some alpha fogging? Also, just for my own curiosity, why doesn''t alpha fogging work with the d3d pipeline? It does seem like a pretty useful feature...

Share this post


Link to post
Share on other sites
You can use vertex shaders without new hardware. Instead of putting the results of the fog calculations in the fog register, you would make them the alpha value.

As an alternative to vertex shaders, you could assign a different alpha value to the object''s material(s) to make it fade out.

Alpha fogging doesn''t work with the regular D3D pipeline because hardware never supported such a thing. I added it to PR''s pipeline to provide a better solution to your problem.

You can turn off the D3D pipeline and use alpha fogging on objects, but you won''t get any hardware accelerated transformation and lighting. Also the terrain only supports the D3D pipeline now, so you won''t be able to alpha fog the ground.


Share this post


Link to post
Share on other sites
Any graphics card can do Vertex Shaders in software. The only cards that do them in hardware are the GF3 and the Radeon. Its just a little slower when its done in software (but the effect is the same).

-Rich

Share this post


Link to post
Share on other sites