Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

2D interface using RB3D problems (Real Studio games Mailinglist archive)

Back to the thread list
Previous thread: SuperSpriteSurface examples
Next thread: cell phone GPS


[ANN] Preview of RBD 2.4   -   Marc Zeedar
  2D interface using RB3D problems   -   William Shank
   Re: 2D interface using RB3D problems   -   William Shank
   Re: 2D interface using RB3D problems   -   Frank Condello
   Re: 2D interface using RB3D problems   -   William Shank
   Re: 2D interface using RB3D problems   -   Joseph J. Strout
   Re: 2D interface using RB3D problems   -   Tim Dykes
   Re: 2D interface using RB3D problems   -   Asher Dunn

2D interface using RB3D problems
Date: 04.09.05 03:45 (Sat, 3 Sep 2005 21:45:30 -0500)
From: William Shank
I made a program that draws 2D shapes but used an RB3DSpace because
it's really fast at full screen. It's coming along well (on my
system), but school recently started and I had a chance to test my app
out on several different mac computers. Half of them didn't work :(

Most of the shapes just don't show, and those that do are off color
and aliased (I effect anti-aliasing with alphad textures). My app did
work on some computers, but I'm excited to toy with it on the dualG5s
at school where it doesn't.

I tried 3 different versions of quesa on the non working systems with
no effect. Something I did notice is changing the flood light
direction made invisible shapes show up. In my setup the camera is
always looking straight along the -Z axis, the light direction has the
same vector (0,0,-1).

Why would shapes dissappear when the light is perpendicular to the
faces, whereas on my computer it works as expected (ie texture color
not modified by 3D rendering)?

I remember seeing a RB code library that does this same type of thing
(2D interface). The example with it was for a HUD in a game. I can't
find reference to this again to see if it has my problem also.

I only briefly tested my app on the other systems. I'm at a loss as to
why it's working totally different on the G5s compared to my iBook G3.
I'm guessing some 3D card thing but then I still have no idea how to
fix this. Will I be able to have my app work on all macs? Suggestions
for tests to narrow it down? I don't know what's relavent from my app
to this problem. I have several subclasses of group3D and TriMesh3D.
All shapes are built using declares but I sidestep some of the
quesawrapper methods, mainly when I modify the vert and face count of
a mesh (which I don't see how to do using the wrapper). To all the
shapes a texture with alpha is applied. Compiled as PEF.

I can post some example pics tomorrow if it will help. I really want
to run this on the G5s. Oh wait, also I'm still using 5.5.5, OS
10.3.9, not sure of the G5 OS. peas help
-William
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: 2D interface using RB3D problems
Date: 05.09.05 00:43 (Sun, 4 Sep 2005 16:43:00 -0700)
From: William Shank
Today I got to fiddle some more and I at least got my app working on
those systems it wasn't before but I don't know why. What I stumbled
across is changing the floodlight direction...

To simulate 2D all triangles are built in the z=0 plane. The camera's
x,y is (0,0) and it's z is always positive and set from the size of
the RB3DSpace (so shapes stay same size). The flooddirecion is
(0,0,-1.0), same vector as how camera is looking. Turns out, if I
change the flooddirection vector to most anything else, even (0,0,0)
or (2,-7,1) then it looks correct on these previously nonworking
systems. By looking at directions of (0.25,0,-1), (0.5,0,-1),
(0.75,0,-1) the dissappeared shapes fade in, it's like a glare wipes
them out with a perpendicular light, but a glancing light isn't
affecting. Any ideas. Shoot labs closing.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: 2D interface using RB3D problems
Date: 05.09.05 04:23 (Sun, 4 Sep 2005 23:23:57 -0400)
From: Frank Condello
On 4-Sep-05, at 7:43 PM, William Shank wrote:

> ... it's like a glare wipes them out with a perpendicular light,
> but a glancing light isn't affecting. Any ideas.

Sounds like a specular reflection... If you're dealing strictly with
2D shapes you probably don't want any lighting, so the solution is to
set Nullshader = True for all your objects.

As for why you saw different results on different machines, that's
likely due to missing hardware support for a secondary specular
colour extension on certain (older) cards.

Frank.
–––––––––––––––––––––––––––––––––
Open Source RB Goodies and Shareware
<http://developer.chaoticbox.com/>
<http://www.chaoticbox.com/>
–––––––––––––––––––––––––––––––––

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: 2D interface using RB3D problems
Date: 06.09.05 02:19 (Mon, 5 Sep 2005 20:19:26 -0500)
From: William Shank
On 9/4/05, Frank Condello <<email address removed>> wrote:
> Sounds like a specular reflection... If you're dealing strictly with
> 2D shapes you probably don't want any lighting, so the solution is to
> set Nullshader = True for all your objects.

Oh yes. Very good, thanks. I thought without 'light' everything would be dark.

> As for why you saw different results on different machines, that's
> likely due to missing hardware support for a secondary specular
> colour extension on certain (older) cards.
OK, I follow, my older G3 wasn't doing these extra calculations that
wiped out the shapes on the G5s. I'll test it tomorrow but I'm sure my
problem is solved. Thanks much.
-willyd
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: 2D interface using RB3D problems
Date: 09.09.05 15:21 (Fri, 9 Sep 2005 08:21:23 -0600)
From: Joseph J. Strout
At 9:45 PM -0500 9/3/05, William Shank wrote:

>I tried 3 different versions of quesa on the non working systems with
>no effect. Something I did notice is changing the flood light
>direction made invisible shapes show up. In my setup the camera is
>always looking straight along the -Z axis, the light direction has the
>same vector (0,0,-1).

In an app like this, I wouldn't expect you to be using directional
lights at all. Set FloodLight to 0 and AmbientLight to 100; that
will avoid any specular effects. You can also set NullShader=True on
all your objects.

As for the differences on the various machines: I suppose it would
depend on what video card they have, and/or what version of OpenGL
they have. You might download Armageddon
<http://www.codenautics.com/armageddon/> and see whether it works
properly on those machines -- I've gotten a lot of downloads and no
reports of problems with it.

Best,
- Joe

Re: 2D interface using RB3D problems
Date: 05.09.05 11:37 (Mon, 5 Sep 2005 20:37:21 +1000)
From: Tim Dykes
Message: 1
> Subject: 2D interface using RB3D problems
> From: William Shank <<email address removed>>
> Date: Sat, 3 Sep 2005 21:45:30 -0500

it could be the mac dubble buffer system, u might have to call
self.updatenow to force the buffer to clear.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: 2D interface using RB3D problems
Date: 05.09.05 17:24 (Mon, 5 Sep 2005 12:24:48 -0400)
From: Asher Dunn

On Sep 5, 2005, at 6:37 AM, Tim Dykes wrote:

> it could be the mac dubble buffer system, u might have to call
> self.updatenow to force the buffer to clear.

That is completely unrelated to the problem he was experiencing, and
please use proper English :-)

Asher Dunn
--------------------------------------------------------
President and Head Developer of Fireye Software
<http://www.fireyesoftware.com/>
AIM, Yahoo, MSN: crazedglkid

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>