🔒 Locked
DrawPrimitve
Advertisement
Original Post
I can clear see the triangles in my object when I render! How can I fix this problem?
Here is little more info:
* Object is a self made, very simple, stair with 8 steps. Every step have 4 triangels (2 for front-quad and 2 for the top-quad).
* I use 1 point ligtht, that moves with the camera.
* I store the object in a vertexbuffer, transform the WORLD matrix and render the object with DrawPrimitive D3DPT_TRIANGLELIST. I render 2 primitives at once (render 2 primitives, switch texture and render 2 more).
The strange thing is If I render a object with more then 2 triangels in one call, like this,
device->DrawPrimitive( D3DPT_TRIANGLELIST, 0, all );
the 2 triangles that made up a quad dosen´t be visible. But If I draw the object with many calls with diffrent start index, like this:
for(int i=0; iDrawPrimitive( D3DPT_TRIANGLELIST, 6*i, 2 );
the quads 2 triangels is visible!
Zeblar Nagrim, Lord of Chaos
How can I fix this problem? My quad look like two triangles! I think it is a light problem. My normals are OK. When I change the shade mode to D3DSHADE_FLAT the quad looks good on short distance but not on long distance. I have also tried to split up the quad in 4 smaller pices but the "triangle-look" still exist.
Pleeeeeasse help!
Pleeeeeasse help!
Here is a picture of the graphic problem:
Zeblar Nagrim, Lord of Chaos
Zeblar Nagrim, Lord of Chaos
It looks to me like you are flat shading the stairs. Are you changing the shading method at all? Maybe by accident?
Landsknecht
Landsknecht
Landsknecht : I use flat shading to avoid this problem (I have used gouraud shading before)!. With gouraud shading it looks even more ugly.
Zeblar Nagrim, Lord of Chaos
Zeblar Nagrim, Lord of Chaos
Maybe it looks better if use triangle strip instead of triangle list?
Here is a picture of the stair with gouraud shading: (triangle strip).
Zeblar Nagrim, Lord of Chaos
Zeblar Nagrim, Lord of Chaos
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement