Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

D3D lighting problem

akosmopakosmop Member Posts: 5
Hello, i am pretty much new in DX progamming, but i managed to find a couple of good tutorials on the net that helped me out to understand the basics.
I am using DX with VB to display 3D building models (actually their concrete or steel "skeleton". The problem i have is this:
i am using lit vertices, each vertex is described by 3 numbers- X,Y,Z coordinates plus nx,ny,nz components of the normal vector. Everything works as good as it gets, as far as the camera remains close to the model. When it moves further (i.e. along the negative Z-axis) then some strange black stripes/triangles appear on my surfaces. Kind of the thing you see when you have 2 overlapping surfaces, belonging to the same plane. That is NOT true on my case, as for example the 2 surfaces have a distance of 0.2 meters between them. Could it be when the camera moves too far, this distance of 0.2 is so small that the surfaces are practically overlapping (although the z-buffer should take care of that)?
I don't know what to think... please help!

Comments

  • CroWCroW Member Posts: 348
    well,im pretty new to directx,too.im writing in asm and using directx 8.1.
    which dx-version to you code for?how many bits do you use for stencil/zbuffer?your problems seems similar to the graphic-artefacts,which the old painter-alghorythm generates.i think you should try it with a greater depth-buffer.

  • akosmopakosmop Member Posts: 5
    : well,im pretty new to directx,too.im writing in asm and using directx 8.1.
    : which dx-version to you code for?how many bits do you use for stencil/zbuffer?your problems seems similar to the graphic-artefacts,which the old painter-alghorythm generates.i think you should try it with a greater depth-buffer.
    :
    :
    Thanks for your answer. I am programming for DX 8.1 too. I managed however to solve my problem by setting culling mode to counterclockwise.
    I know it's only a workaround, as the cause of the problem is most probably the order in which i define the triangles my prisms consist of and their respective normal vectors. But, since the problem is solved i didn't look into it further. Thanks again.
  • Shawn CarterShawn Carter Member Posts: 0

    ______ < http://forcoder.org /> free video tutorials and ebooks about ( Assembly, Swift, PL/SQL, PHP, Visual Basic, Delphi, Perl, Python, Go, MATLAB, Ruby, C#, Scratch, Objective-C, Java, R, C++, JavaScript, Visual Basic .NET, C LabVIEW, Bash, SAS, Scala, Apex, Awk, Lua, FoxPro, Dart, Fortran, Lisp, VBScript, Rust, D, ABAP, Clojure, Alice, Logo, Crystal, Scheme, COBOL, F#, Hack, Prolog, Erlang, ML, Ada, Transact-SQL, Kotlin, Julia ) ______

Sign In or Register to comment.