cubic environnement mapping

Started by
5 comments, last by BIGPOPA 19 years, 11 months ago
Hello peolple i have some troubles, i will become crazzy i''m trying to do cubic environnment mapping i can sussefully render the scene to a cubemap. Then when i map the Cubmap over a teapot , like in DX SDK i got some strange artefacts see that link below http://perso.wanadoo.fr/malakoff/TeaPot.JPG I don''t know what happens , but the cube mapped texture is pixelized, and looks ugly. This is how i do the effect: 1=====I render the scene 6 times, to the cubemap texture. 2=====I activate the effect: device.SetTextureStageState 0, D3DTSS_TEXCOORDINDEX, (D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR) 3=====I set the cubemap texture to the device 4====I render the teapot 5=====I deactivate the cameraspace reflection device.SetTextureStageState 0, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_PASSTHRU Where am i wrong? someone knows how to perfom that effect in visual basic.
Round, one , fight!!!
Advertisement
two thoughts,
maybe the cubemap texture is too low res for you''r tast,
or it actualy looks like the normals of the polys arn''t smooth, might you have turned off garoude shadeing or changed the normals or something

Bobboau, bringing you products that work... in theory
Bobboau, bringing you products that work... in theory
Even if i increase the resolution of the cubemap, or i switch between different shading mode.

No change, i always have a strange cubemapping on my teapot.

Not that i do not use any shader, i do that with oldfashion method.

Any suggestion or code?
Round, one , fight!!!
I haven''t played with environment mapping in a while, but it looks like the coordinates being generated for the cube map are not correct. Try having DX normalize all of your normal vectors.

I''ve never used C# but I think the code would be like this:
device.RenderState.NormalizeNormals = true;

neneboricua
Even if force DX to normalize normals, the texture mapped over the teapot looks pixelized and strange.

i use
DEVICE.SetRenderState D3DRS_NORMALIZENORMALS, true

Round, one , fight!!!
What about filtering? Do you turn that off? I haven''t worked much with cubemapping, so I don''t know if that''s even related. Just throwing the option out.

Chris
Chris ByersMicrosoft DirectX MVP - 2005
I played a bit with txture filter and mimmap filter
i set the cubemap filter to bilinear

But that does not help

i still get this result

http://perso.wanadoo.fr/malakoff/TeaPot.JPG

if that can help, i have a GForce FX 5200
with the latest Nvidia driver

What can be the problem?

Round, one , fight!!!

This topic is closed to new replies.

Advertisement