chylld

Hi All,

I'm having a big problem drawing lines for a C# application I'm writing. I'm using the DirectX SDK that came with visual studio 2005, directx 9 i presume.

My problem is that when I draw triangles using either fillmode.wireframe or fillmode.solid, when I draw the (perspective) camera back too far the triangles disappear completely! The far plane for the camera is set to float.maxvalue. They last a little longer in wireframe mode than in solid mode, but either way is no use to me.

What I need is a kind of 'hairline' drawing method, where the lines will always be at least 1 pixel x 1 pixel regardless of how far away they are from the camera...

Can anyone shed some light on this Thanks in advance.

Jon


Re: Game Technologies: DirectX 101 Need help - disappearing lines and solids!

Jim Perry

chylld wrote:
What I need is a kind of 'hairline' drawing method, where the lines will always be at least 1 pixel x 1 pixel regardless of how far away they are from the camera...

Kind of defeats the purpose of having the view planes doesn't it






Re: Game Technologies: DirectX 101 Need help - disappearing lines and solids!

chylld

I suppose it does; I apologise as I am fairly new to this. What i am trying to do is draw an object like this:

http://temp.jw.id.au/tristrip.jpg

The top one is at full size, the bottom one is as far as I can zoom out before it disappears. I need it to stay visible (without any gaps between the triangles) even if i zoom out even further.

All the drawing will be done on the same Z-plane. Is there some other way i should be doing this




Re: Game Technologies: DirectX 101 Need help - disappearing lines and solids!

MoniDD

I am borrowing from my experience in Image Processing - DirectX has nothing to do with your issue.

What you are talking about is a problem with pixelation that any digital image processing system would have at extreme minimization of an image.

The link that you provide shows images which will suffer significant pixelation at extreme negative zoom.

Unless I completely misunderstand what you are saying.

Would you mind giving more info on what's the deal because when you say "I want infinite negative zoom but do not want the image to decrease" you imply that you have to limit the processing at a given zoom level, which is not an infinite zoom in itself.

Btw. - the gaps will depend on the color interpolation at the given zoom level as well.





Re: Game Technologies: DirectX 101 Need help - disappearing lines and solids!

chylld

monidd,

i believe you understand what i am saying correctly. my problem is that as soon as the on-screen size of a triangle is smaller than 1px x 1px due to the distance between the camera and the triangle, something deems it not 'worthy' to draw and so renders it at 0px x 0px, hence it disappears. what i needed was it to stay a minimum of 1px x 1px even as its on-screen size went below that.

a common case would be similar to the picture i posted earlier, however with several triangles in the chain, some larger than others. upon zooming out, the smaller triangles 'disappear', leaving only the large triangles remaining; instead it should appear as a continuous line regardless of how far i zoom out.

the reason i thought a solution might lie within the directx domain is because the triangles withstand this problem much better if drawn in wireframe than in solid.

this may all be a moot point however, since my workaround to this problem (draw both the solid as well as lines representing the wireframe) ran significantly slower than gdi+, even though i was using vertexbuffers and indexbuffers.

if you do have any ideas to offer though, they would be greatly appreciated.