Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 1110 times)
0 Members and 1 Guest are viewing this topic.
Offline DavidYazel

Junior Member




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
http://xith3d.dev.java.net

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

JGO Coder


Medals: 7


Current project release date: sometime in 3003


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

Hi
 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 j3d.org. 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)

Cheers

Endolf

Offline DavidYazel

Junior Member




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
http://xith3d.dev.java.net

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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (21 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (66 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (54 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (28 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!