Jump to content
  • Advertisement


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

Arcibald Wearlot

Environmental bump mapping problem

This topic is 5419 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

hi, i'm having some problems using bump env map in dx 8.1. the problem is, i want to use a cube texture to simulate the environment, but something isnt working using the following settings:



i'm getting something strange. the environment is NOT reflected as it should: i always see the positive X side no matter the position of the camera. the texture only slightly moves. if, for example, i rotate the camera far to the right, i can see a little of another face (on the right side of the object): this should be another cubemap face, right? but it is STILL the positive X side! i mean that 1) no matter where the camera is, the cubemap X side is always facing it 2) the X side is used in all the 6 faces of the cube (well i suppose, as i can really see just 5 faces) sure it's not a texture problem, it's a 6-sides .dds cubemap, and i load it using D3DX. and if i try doing plain env mapping (no bump), i get something similar but still strange: the cubemap is still not moving when i move the camera, only slightly when i rotate it (same as above), but this time the -Z side is facing me. i can see the +Y up, -Y down, -X left, +X right and a little of the +Z behind. so it seems correct, but the cube map is not changing when i move. so what am i forgetting/doing wrong? i hope you can help me, thank you in advance uh, i'm using a GeForce4 Ti4600 with detonator 45.23 drivers. [edited by - Arcibald Wearlot on December 15, 2003 12:50:20 PM]

Share this post

Link to post
Share on other sites
HAHAHA I have the same problem!!!!!! My primary machine fails like yours does.

I have an ATI on another machine, AND IT BEHAVES EXACTLY AS IT SHOULD, very-same code, reflecting all 6 faces respectively.

Only way to do it is with VS I guess...

Damn that positive X reflection! It only happens when using bump mapping reflections/refractions, not when I am using regular cube-reflections...

Please let me know if you find a solution without using VShaders. I tried just about every combination of renderstate settings but nothing made it work properly.

Incidentally, in my main machine I have GeForce4 Ti4200, which is same as yours, but slower...

[edit] clarifications [/edit]

[edited by - superdeveloper on December 15, 2003 4:40:38 PM]

Share this post

Link to post
Share on other sites
sorry... one more blurb...

Have you tried this with REF drivers? just to see if its infact a card problem?!?!

Wow I cannot believe I didn''t think of this sooner. If you try with REF, please let me know if the problem fixes itself.

I realize that this is not a viable solution, as you will get 1 FPS, but this is purely a test to see if it is infact a HAL/Driver problem...

MAke sure you set the D3DCreate_softwarevertexprocessing as well in the creation flags for creating a device...

Share this post

Link to post
Share on other sites
with a REF device, bump env mapp behaves exactly as plain env mapping: the -Z side is facing me, and other sides are reflected around it. but there is still this problem, if i move the camera im always getting -Z facing it, the texture isnt moving..

i'm gonna install the new nvidia drivers now, to se if something changes..
did you try to set it up with directx 9?

[edited by - Arcibald Wearlot on December 16, 2003 6:55:52 AM]

Share this post

Link to post
Share on other sites
I believe this is normal behavior. I had the exact same issue. I had to change my code that instead of locking each cube and facing it a direction (n,s,e,w,up,down), I had to lock the cube and get the direction relative to the camera (get its forward vector, then multiply that to the direction). That gave it much better results.

I don''t know if this is what you are looking for, but it worked for me.

Share this post

Link to post
Share on other sites
you're right, i just checked some sdk samples: you have to render each face of the cubemap according to the camera position. thanks for your help
by the way i sent the program to a friend so he tried it on his pc. he as a different config but similar video card (GeForce4 Ti4200) and he is getting exactly the same stuff (+X reflection only).

so here's the point of the situation:
-using environmental bump mapping with D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR only the +X side of the cubemap is shown.
-this only happens with a HAL device. with a REF it works fine.
-this only seems to happen with GeForce4 GPUs.
-this seems to happen no matter if using DX 8.1 or DX 9.0, and no matter what other render states have been set.
-"plain" env mapping works fine.

next step would be to try this program on non-nvidia GPUs and to see if it works (as superdeveloper said on his old post)

[edited by - Arcibald Wearlot on December 17, 2003 9:49:44 AM]

Share this post

Link to post
Share on other sites
yes this has been a painful experience.

Which sdk example has cubemapped bumpmapping sample?? I know there are cube map samples, but none that demonstrate bumpmapping (reflection?) as well.

Share this post

Link to post
Share on other sites
none of the env bump map samples uses a cube texture. cube textures are only used in env map samples..
hmm i just added some bumpenvmap code to an old demo i did some time ago, and im still getting the same stuff. the init code, the render states and everything else is completely different from my current project, the demo used .x files etc etc. but same problem. im really shocked

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!