Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Problem with objects not drawing correctly

Author
Message
Wizer1
18
Years of Service
User Offline
Joined: 31st Jul 2006
Location:
Posted: 1st Aug 2006 05:11
Im still a newb at this so sorry in advance. I searched the forums but I still can't figure out what is wrong with this.

My problem is I am drawing (currently) 5 objects on the screen. When I move around they overlap each other and never appear correctly.

So my question is what am I doing wrong and why do the objects keep overlapping each other? And also why is it when I have objects over matrixes when I look at the objects they tend to have odd artifacting on the objects (see my signature for sys specs, its not that)

NOTE: The code has images in it that you obviously won't have so you will need to edit those out if you try it. Thanks very much for any help! Also some of the code (such as collision detection) isn't even used yet, so just ignore it... Sorry... Controls are WASD and the spacebar acts as a jumppack (kinda) Dont worry about that I will fix it I just wanted to know why the boxes look funny.



P.s. For reference I am basically making a virtual showroom for my cabinet shop using real cabinet pictures for the boxes. Its probably not the best way of doing it but oh well...

Thanks in advance for any help!

System Specs: Hypersonic Aviator CX7 Duo
Intel 2.0 GHZ Core Duo, Nvidia Go 7900 GTX 512mb, 100gig 7200 RPM Hard Drive, 1920x1200 LCD
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Aug 2006 12:48 Edited at: 1st Aug 2006 12:49
Quote: "why do the objects keep overlapping each other"


DB Pro does not automatically perform collision, you have to implement that yourself using one of the various techniques (standard DB Pro collision, Sparky's DLL, Nuclear Glory, Newton, Dark Physics etc). Your objects are "virtual", they don't possess any physical properties to stop them merging into one another.

Quote: "when I look at the objects they tend to have odd artifacting on the objects "

This is an issue with overlapping objects again. The aberrations are caused by the objects "fighting" for the same ZDEPTH position. Sometimes, you can reduce this problem by changing the camera range (SET CAMERA RANGE), particularly at the near value. Alternatively, ensure your objects don't overlap.



Wizer1
18
Years of Service
User Offline
Joined: 31st Jul 2006
Location:
Posted: 1st Aug 2006 18:22
Sorry, I didn't clarify my problem well enough. My problem isn't with collision detection.

My probem is that when I have an object say at 0,0,0 and another at 140,0,0 (not connecting), when I look at one and the other is behind it the other object can still be seen.

Lame Pic:
[object1] [object2] <---- [Me] I can still see object 1 through object 2 when I should't be able to.

I'm not at my computer with DB on it right now but I will try the view distance thing when I get home.

BTW i doubt its my computers fault because I have used it on my desktop (to make it short its really good) and my laptop (specs in sig) and it does it either way and it looks the same.

Like I said some of my code doesnt do anything right now so youll just have to ignore it.


thanks for the reply BTW

System Specs: Hypersonic Aviator CX7 Duo
Intel 2.0 GHZ Core Duo, Nvidia Go 7900 GTX 512mb, 100gig 7200 RPM Hard Drive, 1920x1200 LCD
Wizer1
18
Years of Service
User Offline
Joined: 31st Jul 2006
Location:
Posted: 2nd Aug 2006 01:02
Hey, I just got it to work. I removed the line that changed the camera draw distance and it stopepd artifacting and the objects are now drawing correctly and in the correct order. I don't know what about that line of code was screwing it up but oh well, its working now!!

Thanks for your help, and for anyone reading this in the future feel free to elaborate on why that was screwing the code up. Also I recomend testing it to see what it does for yourself.

Thanks alot, c ya

System Specs: Hypersonic Aviator CX7 Duo
Intel 2.0 GHZ Core Duo, Nvidia Go 7900 GTX 512mb, 100gig 7200 RPM Hard Drive, 1920x1200 LCD

Login to post a reply

Server time is: 2024-11-26 14:21:27
Your offset time is: 2024-11-26 14:21:27