cubic environnement mapping
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.
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
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
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?
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?
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
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
i use
DEVICE.SetRenderState D3DRS_NORMALIZENORMALS, true
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement