Jump to content
  • Advertisement

Archived

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

Caesar

Something strange on my polygon

This topic is 5218 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 render 2 faces that should create a box (2d). The problem is that when I render the box (no lights, the vertices are just diffuse color and xyz) a smudge or what appears on the box and when the box gets transofrmed, it gets transformed as well (scaling, translation, haven''t tried rotation). I''ve colored the "infected" vertex green but the smudge still prevails here''s what I get all the vertices have the correct colors. I use a triangle list, that means 2 faces/6 vertices. I use no textures etc, just diffuse color and position for all vertices in the scene. I also think I have everything set right and yes, I''ve checked it (the stride, fvf, vertex count, etc), and the vertex data is gets allocated correctly before being filled. Any hints or ideas?

Share this post


Link to post
Share on other sites
Advertisement
quote:
a smudge or what appears on the box and when the box gets transofrmed, it gets transformed as well

I don''t really understand your problem. Maybe a screenshot of the smudge? (Or is the smude already in the screenshot?)

--
You''re Welcome,
Rick Wong

- sitting in his chair doing the most time-consuming thing..

Share this post


Link to post
Share on other sites
it''s already on the screenshot... that red thing in the lower-left corner... the vertex beneath the smudge is green, the other vertices are white, and this red-white smudge keeps rendering over it

Share this post


Link to post
Share on other sites
another thing I''ve noticed is that the red-white smudge is always the same size at the beginning, no matter how large I make the box. It only changes it''s size once I scale the box.

Share this post


Link to post
Share on other sites
it''s all 2d actually, have culling turned off... so normals not the deal I guess. Should have called the box a rectangle, sorry.

now I''ve figured out that the smudge in fact is a part of another object I have in the scene... seems like I''ve messed up something in memory or what... still working on it

Share this post


Link to post
Share on other sites
By "it''s all 2D actually", are you saying that you''re specifying the coordinates in screen space and lighting them yourself (or leaving them unlit alltogether)?

culling has nothing to do with normals. Culling simply works based upon whether the vertices are clockwise or not.

Share this post


Link to post
Share on other sites
well... it''s been all my fault (as you could have expected). I have mistaken the number of faces for the number of vertices so direct3d tried rendering more than it actually was supposed to. Sorry for bothering you

Share this post


Link to post
Share on other sites
PS: unlit altogether. It''s a 2d overhead game, so I''ve turned off the backface culling so that my models would still display even if (i have ortho projection and all Z = 0) they accidentialy have vertices in wrong order (I make them myself by hand). <= I don''t have normals, I don''t need them and so they weren''t for sure the problem (not gonna say for sure again today)

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!