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.

DarkBASIC Discussion / Issue with ghosting

Author
Message
Bizar Guy
20
Years of Service
User Offline
Joined: 20th Apr 2005
Location: Bostonland
Posted: 15th Apr 2009 18:39
Hi, I've been having trouble with ghosting multiple objects when ghosted objects and dark ghosted objects overlap. Is there some way I can control which order they are seen in, so this doesn't happen?



Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 15th Apr 2009 19:08 Edited at: 15th Apr 2009 19:09
Not sure if this would help, but I've found that if you place two objects at the same z-coordinate then the object with the lowest number is drawn on the top.

For example:


You should see the black plain (object 1) rendered over the white plain (object 2). I'm not sure how all this would fit with your project and ghosted objects, but it might be of some use. However, for non-plain objects you can sometimes get what's known as Z-clipping, as both objects are drawn 'over each other' so to speak.

Alternatively, you could always use "Disable Object ZDepth" to ensure that a particular object was drawn over all others. Now this might disrupt your visuals in some other way, but it could be worth a try. Hope this helps!

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Apr 2009 23:05
wow, two ghosting error threads at same time

There are only 10 kinds of people in the world, those who understand binary and those who dont
Bizar Guy
20
Years of Service
User Offline
Joined: 20th Apr 2005
Location: Bostonland
Posted: 16th Apr 2009 19:07
@Robert The Robot, disabling object zdepth would work for the scenario I show here, but you see how there are some round particles that are shown in front of the light? They also show up in front of the light if the light is in front and the particles behind. It seems to have nothing to do with the number being greater or less than itself (at least from my tests), and while the particles aren't terribly far from the light position wise, they are not positioned in the same place. I also could not disable the zdepth on the light when it is in front, because that does have objects that go in front of it.

Quote: "wow, two ghosting error threads at same time"

yes, both about fairly different issues to do with ghosting... what's you're point?

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 16th Apr 2009 23:37
@Bizar Guy
On the dark ghosted object(s) try
SET OBJECT AMBIENT num,RGB(255,255,255)
or
SET OBJECT EMISSIVE nun,RGB(255,255,255)

Enjoy your day.
Quirkyjim
16
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 17th Apr 2009 02:02 Edited at: 17th Apr 2009 02:02
Quote: "set object emissive NUN,rgb(255,255,255)"


Quote: "
Due to continuous problems the following subjects are also banned from discussion on all of our forums:

3.7 Debate about religious belief or any tangent of religion"




That's what they WANT you to think...
Bizar Guy
20
Years of Service
User Offline
Joined: 20th Apr 2005
Location: Bostonland
Posted: 18th Apr 2009 21:15
All of the objects in the game already use SET OBJECT AMBIENT num,RGB(255,255,255). You see, there's no lighting. I tried SET OBJECT EMISSIVE num,RGB(255,255,255) on the various ghosted objects, makes no difference, though that's kind of what I suspected. This issue has nothing to do with lighting.

Thanks for the suggestion though. So does anyone know how I can make the white ghosted object consistently appear in front of the black ghosted object without disabling the zdepth?

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 18th Apr 2009 22:13
@Quirkyjim


@Bizar Guy
You probably already know this but, the closer to white the color of the texture is for dark ghosted objects, the more see through it becomes. If it's not totally white, you'll see whatever color is behind the object showing through blended with the texture color. You could try changing those colors that you want to be sure are 100 percent transparent, to white in your dark ghosted object's texture. 16 bit color depth is often the culprit if colors seems not "quite right".

Quote: "So does anyone know how I can make the white ghosted object consistently appear in front of the black ghosted object without disabling the zdepth?"

Does the camera angle change? I mean, could the camera be on either side of the ghosted object in which case, the dark ghosted object would have to be switched to the opposite side of the camera of the white ghosted object?
If not, the simple way is to physically place the dark ghosted object on the opposite side of the white ghosted object. For the sake of perspective, you can scale the dark ghosted object to what looks best if you have to. If the camera angle could change, then you'd have to calculate what side of the white ghosted object the dark ghosted object should be.

Another way, though may require some work, is to build your white ghosted object with a hole in it that the dark ghosted object fills. The dark ghosted object is positioned at the opening so the true background of the scene shows through it's translucent areas without any influence from the white ghosted object.

Enjoy your day.

Login to post a reply

Server time is: 2025-06-08 05:20:55
Your offset time is: 2025-06-08 05:20:55