Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (734)
Games in Android Showcase (222)
games submitted by our members
Games in WIP (811)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Xith3D Forums / Re: Help me implementing PS and VS shaders on: 2004-01-24 20:34:24
I sometimes have similar, incidental & strange, compilation errors but in my JBuilder environment.
Exiting JBuilder, then deleting the project's classes directory, and forcing a complete recompile has always
solved these errors for me.

2  Java Game APIs & Engines / Xith3D Forums / Re: Picking enhancement on: 2003-11-22 20:55:14
Thanks for your explanation Yuri; I can see why you'd prefer the picking not to clutter
up the rendering thread.
My particular interest is volume (simply outer hull) and cross-section visualization of lots of
cells, where, after having created the shapes for rendering, the only connection back to the
underlying data structures is really only the index of each primitive in the shape's
geometry array.
Based on a pick result intersection point, and/or closest vertex alone it is very
clumsy and time-consuming to determine the exact primitive by doing all sorts of 'isInside'
tests Sad
Will the programmatic picking you guys are developing support giving back the primitive
index in the pick result? Would solve all my picking issues, and actually there'd
be no need to bother the renderer with custom pick names.

Remains possible gl picking support for DIY jogl drawing in future shape predraw hooks.
It may still be a good idea to alter PickRenderResult as mentioned above, so
to contain a single Node + the pick names, minus the one used for node id.
I like the idea of toying will jogl knowing that the bulk of the transforms is dealt with by
the scene graph.

3  Java Game APIs & Engines / Xith3D Forums / Picking enhancement on: 2003-11-22 12:16:13


I've been tracking/toying with Xith for some time now,
and like it a lot.
I would like to propose to enhance Xith3D picking somewhat.

Currently Xith3D uses the standard OpenGL picking mechanism with a select buffer,
and picking by Node.
PickRenderResult.getNodes() lists the (I think: single) Node picked
and a zmin, zmax value.

This use of OpenGL picking is quite specific to picking Node's and:
- does not allow identification of primitives (which quad of the
 immense quadarray has been picked?)
- does not allow the application to provide (multiple) pick names
 (the cell picked has this cellId, this segmentId, this clusterId etc.
  Admittedly I haven't seen a number of identification codes > 3,
  and we packed them into a single int. Works, but caused a bit of a range
  limitation )
- any future node predraw hooks for DIY OpenGL drawing cannot get
 custom pick results back.

The proposal below attempts to remedy this and keep on using standard OpenGL picking.

- add to Node:
 // when true, the first name on the stack will be the primitive index.
 // this allows getting (close) to the picked coordinates, for applications that do
 // not want to deal with custom names.
 <not thought through>
 // geoArray.getValidVertexCount()/# vertices_per_primitive for normal geometry
 // igeoArray.getValidIndexCount()/# vertices_per_primitive for indexed geometry ???
 </not thought through>
 boolean pickPrimitiveIndex = false;

 // the number of names that this node can use for identifying its pick result
 // value 0 means that only the default node picking is available.
 int customNameStackDepth = 0;

- change PickRenderResult
 private Node node;       // should be just one Node + all of its sub-identification,
 private int[] names;     // so complete contents of name stack at pick time - 1
                          // (the name used to identify the node itself)

- to allow multiple custom names per primitive of a Node, add to GeomContainer
 // array of size nameStackDepth, containing the pick names per primitive
 <not thought through>
 // the pickNames could be java int arrays, subject to GC
 </not thought through>
 GeomDataInterface[] pickNames;

- add GeomNioIntData (similar to GeomNioFloatData) for use as pickNames

The biggest change is with rendering: with custom names per primitive, we can't use
glDrawArrays or glDrawElements for drawing.
When in pick mode && custom picking is enabled, drawing needs to revert to drawing
per primitive:
- if (pickPrimitiveIndex) push current primitive index
- push all custom (customNameStackDepth) names on the stack
- draw primitive, using the appropriate glArrayElement() call
- pop all custom names off the stack
- if (pickPrimitiveIndex) pop

Thus, ShapeAtomPeer needs to be aware of the pickMode.
Additionally proper checking of the pickNames data should be done,
customNameStackDepth + #internal names should be checked to be < GL_NAME_STACK_DEPTH,
(allthough this is not likely to be a problem as GL_NAME_STACK_DEPTH >= 64 ...)
convertSelectBuffer would need to be changed etc...
But in the end this would provide a very flexible (configurable per Node) picking mechanism.

What do you think?
Does this conflict with other developments in the pipeline?

Pages: [1]
cybrmynd (28 views)
2017-08-02 12:28:51

cybrmynd (42 views)
2017-08-02 12:19:43

cybrmynd (56 views)
2017-08-02 12:18:09

Sralse (60 views)
2017-07-25 17:13:48

Archive (492 views)
2017-04-27 17:45:51

buddyBro (639 views)
2017-04-05 03:38:00

CopyableCougar4 (1119 views)
2017-03-24 15:39:42

theagentd (1129 views)
2017-03-24 15:32:08

Rule (1103 views)
2017-03-19 12:43:22

Rule (1082 views)
2017-03-19 12:42:17
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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!