Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11855 Posts in 1569 Topics- by 3024 Members - Latest Member: floutleMili

07. February 2012, 03:04:22 AM
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)A few little, slim bugs ;-)
Pages: [1]
Print
Author Topic: A few little, slim bugs ;-)  (Read 1052 times)
Hervé
Just dropped in

Offline Offline

Posts: 13


View Profile
« on: 07. May 2007, 11:26:51 AM »

A few little bugs I spotted while exploring the world of Xith:

SkyBox
The SkyBox shows unpleasant lines at the edges of the cube:

The SkyBox.createTexturesArray() method should force the texture boundary modes to CLAMP_TO_EDGE to avoid this:
Code:
        for( Texture t : textures )
        {
            t.setBoundaryModeS( Texture.CLAMP_TO_EDGE );
            t.setBoundaryModeT( Texture.CLAMP_TO_EDGE );
        }
Ah that's looking much better Smiley


SkyGeoHemisphere
The SkyGeoHemisphere shows some really ugly texture mapping when you turn your head back:

I didn't find any workaround for this one, as it seems that you cannot use spherical mapping with one rectangular texture onto a GeoSphere: the texture will wrap the wrong way between 1-d and d in the triangles that cross the texture boundary. Embarrassed
Have a look at the page http://www.vterrain.org/Textures/spherical.html, there are information on how to to texture mapping on an icosahedron, it seems rather simple at first glance (well their solution uses 10 textures, but we are already using 6 for the SkyBox).


RectBillboard
The resize() method inherited from the superclass Rectangle doesn't work. This is because the RectBillboard.zeroVertices attribute is not updated when resize() is called. One solution would be to overwrite the adequate resize() method in RectBillboard to update zeroVertices, but as zeroVertices seems to be a copy of the Rectangle.vertices attribute, there could be maybe a better solution: protected access, getter method... well I'll let the developpers find the best solution.

LODSwitch
For this one, I am not sure if it's a bug. However here's what I did find: when the LODSwitch computes the distance to choose the LOD, it computes the distance between the viewPosition and the world origin at (0;0;0). That's nice in the test example, but if I put the LODSwitch into a TransformGroup to translate/rotate my geometry somewhere far away from the origin, it seems to change LOD according to how far away is my camera from the origin, and not to how far away is my camera from my shape.
To work around this behaviour, I created my own sublass of LODSwitch, where I store the coordinates of the center of my LODSwitch, and where updateWhichChild() is overriden. This works for me but there is maybe a cleaner solution.

Well that's all for now, the post begins to be too long.  Cheesy
Logged

A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #1 on: 07. May 2007, 12:36:49 PM »

Hey hadev, thanks !

Do you have developer access already ? Tell me your sourceforge unixname and I can add you to xith-tk if you want.
Logged
Hervé
Just dropped in

Offline Offline

Posts: 13


View Profile
« Reply #2 on: 07. May 2007, 03:38:29 PM »

Well, I merely reported bugs...

And no, I don't have developer access (anonymous checkout only!), and I don't have a sourceforge unixname. How do you get one?
Anyway, for now, I am only evaluating Xith3D. I followed the XIN document, toyed a bit with the examples, build a very simple map viewer. So I am very far from being a xith contributor!



Hervé

Logged

A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #3 on: 07. May 2007, 06:11:41 PM »

Thanks, Herve for these very good reports. I will apply your suggestions as fast as possible.

Though, I'm not sure, if the LODSwitch is actually buggy.
As you can see from this code snippet:
Code:
this.getLocalToVworld().getTranslation( translation );

final float dist = translation.distance( viewPosition );
The distance is measured between the view's absolute position and the shape's localtovworld (absolute) position. So I don't really understand, what you're doing differently. Could you maybe paste or attach your extension?

For the hemisphere: The used texture is not made for spherical projection. So all you have to do to use the skyhemi, is to prepare a texture for that. And you will get along with only one texture. It just needs to be circularly bulged at the top (like you would do for planetary textures at the top and bottom).

Marvin
Logged
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #4 on: 16. May 2007, 01:17:03 PM »

Well, I merely reported bugs...

And no, I don't have developer access (anonymous checkout only!), and I don't have a sourceforge unixname. How do you get one?
Anyway, for now, I am only evaluating Xith3D. I followed the XIN document, toyed a bit with the examples, build a very simple map viewer. So I am very far from being a xith contributor!
Now come on, it's sure you chose your way of life Smiley

But there's a big difference between "the n00b who comes here, subscribe with an ALL-CAPITAL-LETTERS pseudo and let an ALL-CAPITAL_LE77ERZ why HE CAN'T GET NETBEANZ TO WORK WITH ZITH" and the "guy who, after a few hours of toying with the lib (which he got up and running in minutes) reports his first 4 bugs with detailed descriptions and fixes/suggestions".

So in fact I just wanted to make sure you're aware that we're open (as in "open mind") to contributors. Of course I don't want to push you in this direction, do whatever you feel like  Grin

And to get a Sourceforge unixname/login/account, just register : http://www.sourceforge.net Smiley

Amos
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic