Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (612)
Games in Android Showcase (172)
games submitted by our members
Games in WIP (659)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Xith3D feature question  (Read 1239 times)
0 Members and 1 Guest are viewing this topic.
Offline DavidYazel

Junior Devvie

Java games rock!

« Posted 2003-07-31 16:38:03 »

I got Magicosm's overlays working last night in Xith3D and am trying to decide what sort of overlay support to put in the base scenegraph.  Overlays are really complicated if you want to do them correctly and with good performance, but everyone has different needs.  Rasters do not perform very well and image aligned triangles can perform very fast.  The texture management and power-of-2 restriction on textures makes building overlay's more complicated because you really have to carve up your overlay into pieces.  Our overlay system is working right on top of Xith3D's regular scenegraph, so it can be done without any special support from the scenegraph.  But I know this is a feature everyone wants and I am trying to figure out the base set of capabilities which would be useful.

1) The first thing I thought about was the issue of having to match the view's transform inorder to align the image plate.  There are no other choices in a scenegraph.  But if I added a Node called ScreenAlignedGroup, which is guarenteed that the children can use geometry in the XY plane guarenteed that coordinate 0,0 is in the upper left of the screen and W,H maps to the bottom right most pixel in the screen.  Then the renderer can actually set the view matrix to the identity and push the image plate transform matrix before rendering the geometry.  This has the advantage of removing the jiggle that effects view transformed overlays when the view is > 6000.

2) The next thing I thought about was creating a Foreground leaf, similar to the background leaf except the scenegraph in the Foreground is drawn last, guarenteed, even if there are transparent objects in the sub-scene.  This way you can be absolutely sure that your overlays, hud, etc is always drawn on top of the screen.

3) Another enhancement is to give the programmer finer control on how a transparet object is sorted in relation to ordered groups.  Option 1: render transparent object sorted with all unordered transparent objects.  Option 2: render the transparent object sorted with other transparent objects inside the same ordered group.  

4) Finally an overlay node which you would generally attach under a Foreground Node -> ScreenAlignedGroup -> (Overlay, Overlay, Overlay).  The overlay would act very much like a raster in that you could set its dimensions and location and update its image whenever you wanted (except during rendering of course).  It could either be translucent or opaque.  

I think these tools would be all anyone would need to build a GUI for their game, without dictating to them exactly how they would do it.

Could I get comments?

David Yazel
Xith3D Project Founder

It may look complicated, but in the end it is just a bunch of triangles
Offline endolf

JGO Coder

Medals: 7
Exp: 15 years

Current project release date: sometime in 3003

« Reply #1 - Posted 2003-07-31 17:09:32 »

 HUD wise it looks good to me, I guess my HUD code is pretty similar in the way it works to the stuff you submitted to The only thing I could *never* get working in properly was a layered hud, If i used an ordered group to redner the hud components back to front then it messed up when the hud got rendered in relation to all the other transparent objects in the scene. with out it the HUD is always at the front but there isn't any layers to the hud. So I guess that would be my bigest request beyond what you have, so you can have a static image that is a dials background for example, and then just redraw a counter in it each time. That and 'any size' components (my hud code did this by returning a section of the texture and adjusting the texture coordinates, to give the illusion of it, that would be enough Smiley)



Offline DavidYazel

Junior Devvie

Java games rock!

« Reply #2 - Posted 2003-08-01 00:30:52 »

Thats the exact problem I also had.  These features would completly eliminate that problem since you would be able to flag the transparency attributes to stay within the ordered group, thus you can control overlapping windows, something which has always elluded us in Java3D.

Anyone else want to weigh in?  I will be implementing this in the next 2 days.

David Yazel
Xith3D Project Founder

It may look complicated, but in the end it is just a bunch of triangles
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Andrew_3ds (19 views)
2015-09-01 19:08:10

afikri (15 views)
2015-08-31 09:30:22

afikri (23 views)
2015-08-31 09:30:07

afikri (11 views)
2015-08-31 09:27:24

afikri (15 views)
2015-08-31 09:26:40

Roquen (20 views)
2015-08-29 11:30:54

GamerC4 (33 views)
2015-08-22 20:38:50

GamerC4 (29 views)
2015-08-22 20:37:18

GamerC4 (34 views)
2015-08-22 20:37:01

Kefwar (43 views)
2015-08-22 18:07:24
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!