Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 11:24:30 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)TriangleArrayStrip disappearing when too near
Pages: [1] 2
Print
Author Topic: TriangleArrayStrip disappearing when too near  (Read 5761 times)
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« on: 26. November 2006, 04:16:51 pm »

Hi,

I have a selection rectangle, which infact is a textured TriangleArrayStrip which, strangely enough, disappear (= isn't rendered) when the view is near from it.. I don't know why is that, I tried ALWAYS attributes (RenderAttributes), no culling (PolygonAttributes.CULL_NONE) and so on but that won't work..

Marvin, do you have an idea ? How are objects dismissed (culled) in the rendering process ? Is it due to wrong bounds ?

Anyway, you can find the entire game code at http://sourceforge.net/projects/stratagemengine

Run the org.stratagem.apps.Stratagem class

Let it load, then hit and hold the "Page up" key on your keyboard for ~3 seconds. Then do a "drag-and-drop" with your mouse. You should see a blue selection rectangle. Now hold "Page down" you should see it disappear (heh Smiley ) You can alternate page up and page down you will see it disappear and appear each time.

Can you help ?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 27. November 2006, 01:58:19 pm »

The project depends on the "gamut" project, which I wasn't able to checkout. I guess, the GAMUT project on suorceforge is meant. I tried to checkout the CVS repository with my sourceforge username/password and with anonymous/no_password. I tried lower case repository name and upper case. Even a binary jar isn't available for download.

I even tried to comment out the specific calls in strategem, but it seems to highly depend, since movement is done with this lib, isn't it? Which is strange, since gamut seems to be a monitoring tool Huh.

What do I have to do, to get it to work?

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

Posts: 1188



View Profile WWW Email
« Reply #2 on: 27. November 2006, 08:24:27 pm »

The project depends on the "gamut" project, which I wasn't able to checkout. I guess, the GAMUT project on suorceforge is meant. I tried to checkout the CVS repository with my sourceforge username/password and with anonymous/no_password. I tried lower case repository name and upper case. Even a binary jar isn't available for download.

I even tried to comment out the specific calls in strategem, but it seems to highly depend, since movement is done with this lib, isn't it? Which is strange, since gamut seems to be a monitoring tool Huh.

What do I have to do, to get it to work?

Ah sorry gamut is not the one on sourceforge.net
It was one of my custom libraries. Now I've deleted it and included this code in xith-tk. But Stratagem code isn't yet adjusted to take into accout these changes. (You can try and adjust it yourself if you want). New code is in org.xith3d.utility.timing and org.xith3d.behaviors.impl (Adjusters)

EDIT : Now Stratagem works perfect again (well, besides this display bug). I hope you can test it now (Gamut doesn't exist anymore).
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 28. November 2006, 12:27:49 am »

There's still an error in org.strategem.ui.input.Input. The FloatProperties need parameters for the constructor.

And I'm getting the following exceptions, when the game tries to load units:
Quote
Java Heap Space = 66650112
java.lang.NullPointerException
   at org.xith3d.loaders.cal3d.core.CalLoader.getResourceURL(CalLoader.java:1070)
   at org.xith3d.loaders.cal3d.core.CalLoader.loadCoreSkeleton(CalLoader.java:527)
   at org.xith3d.loaders.cal3d.loader.KCal3dLoader.loadCoreModel(KCal3dLoader.java:182)
   at org.xith3d.loaders.cal3d.loader.KCal3dLoader.getCalModel(KCal3dLoader.java:144)
   at org.xith3d.loaders.cal3d.Cal3dLoader.getCal3dModel(Cal3dLoader.java:57)
   at org.xith3d.loaders.precomputed.CalAnimatedModelLoader.loadModel(CalAnimatedModelLoader.java:131)
   at org.xith3d.loaders.precomputed.CalAnimatedModelLoader.load(CalAnimatedModelLoader.java:104)
   at org.stratagem.ui.gfx.CalUnitGFX.loadGFX(CalUnitGFX.java:38)
   at org.stratagem.ui.gfx.GFX.update(GFX.java:98)
   at org.stratagem.ui.UI.update(UI.java:82)
   at org.stratagem.world.World.update(World.java:197)
   at org.stratagem.apps.Stratagem.loopIteration(Stratagem.java:190)
   at org.xith3d.render.loop.RenderLoop.run(RenderLoop.java:882)
   at java.lang.Thread.run(Unknown Source)
java.lang.IllegalArgumentException
   at org.xith3d.loaders.cal3d.core.CalModel.<init>(CalModel.java:76)
   at org.xith3d.loaders.cal3d.loader.KCal3dLoader.getCalModel(KCal3dLoader.java:148)
   at org.xith3d.loaders.cal3d.Cal3dLoader.getCal3dModel(Cal3dLoader.java:57)
   at org.xith3d.loaders.precomputed.CalAnimatedModelLoader.loadModel(CalAnimatedModelLoader.java:131)
   at org.xith3d.loaders.precomputed.CalAnimatedModelLoader.load(CalAnimatedModelLoader.java:104)
   at org.stratagem.ui.gfx.CalUnitGFX.loadGFX(CalUnitGFX.java:38)
   at org.stratagem.ui.gfx.GFX.update(GFX.java:98)
   at org.stratagem.ui.UI.update(UI.java:82)
   at org.stratagem.world.World.update(World.java:197)
   at org.stratagem.apps.Stratagem.loopIteration(Stratagem.java:190)
   at org.xith3d.render.loop.RenderLoop.run(RenderLoop.java:882)
   at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-4" java.lang.NullPointerException
   at org.xith3d.loaders.cal3d.Cal3dNode.initializeNode(Cal3dNode.java:85)
   at org.xith3d.loaders.cal3d.Cal3dNode.<init>(Cal3dNode.java:71)
   at org.xith3d.loaders.cal3d.Cal3dLoader.getCal3dModel(Cal3dLoader.java:58)
   at org.xith3d.loaders.precomputed.CalAnimatedModelLoader.loadModel(CalAnimatedModelLoader.java:131)
   at org.xith3d.loaders.precomputed.CalAnimatedModelLoader.load(CalAnimatedModelLoader.java:104)
   at org.stratagem.ui.gfx.CalUnitGFX.loadGFX(CalUnitGFX.java:38)
   at org.stratagem.ui.gfx.GFX.update(GFX.java:98)
   at org.stratagem.ui.UI.update(UI.java:82)
   at org.stratagem.world.World.update(World.java:197)
   at org.stratagem.apps.Stratagem.loopIteration(Stratagem.java:190)
   at org.xith3d.render.loop.RenderLoop.run(RenderLoop.java:882)
   at java.lang.Thread.run(Unknown Source)

I traced it a little bit and I don't know, if it's an error in the cal loader or in the game. Anyway the reason is, that the sceleton resource is tried to be loaded by simple name and not by full resource name. It is not fould by the class loader and this leads to the above NullPointerException.

Any idea?

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #4 on: 28. November 2006, 04:05:14 am »

OK, I saw you fixed the FloatProperty. But the exceptions remain...
Logged
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #5 on: 28. November 2006, 05:49:29 pm »

Do you have a flavors/classic/ folder in your stratagemengine file structure ? Huh.. maybe the resources aren't uploaded.. I'll check that.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #6 on: 28. November 2006, 06:24:53 pm »

Do you have a flavors/classic/ folder in your stratagemengine file structure ? Huh.. maybe the resources aren't uploaded.. I'll check that.

The resources are all there.
Logged
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #7 on: 30. November 2006, 06:57:55 pm »

I'll check that.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #8 on: 30. November 2006, 07:10:21 pm »

Ah, sorry. I forgot to post here. When it didn't work, I was working on Windows (for a few days). When I returned to Linux, it worked well. You should remove the gamut dependancy from the classpath of the project.

And I see the bug. I'll try to fix it after the model loaders work. OK?

Maybe you should try to run your game on Windows. It doesn't seem to work there.

Marvin
Logged
Patheros
Getting respectable
***
Offline Offline

Posts: 267


Dead Dolphin


View Profile WWW Email
« Reply #9 on: 12. December 2006, 02:14:29 am »

I'm having a problem that sounds similar, all thought possibly unrelated. I'm drawing a line using LineArray and if one end point is off the screen the line does not display.  Is there any chance that they are related?

On a side note I don't see why RenderAttributes.ALWAYS would affect this. My understanding is that ALWAYS is for transparency. Am I mistaken?

 
Logged

"I like my method, what was my method again?" - Jon
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #10 on: 12. December 2006, 02:55:55 am »

I'm having a problem that sounds similar, all thought possibly unrelated. I'm drawing a line using LineArray and if one end point is off the screen the line does not display.  Is there any chance that they are related?

Do you have a small example?

On a side note I don't see why RenderAttributes.ALWAYS would affect this. My understanding is that ALWAYS is for transparency. Am I mistaken?

Hu! Good question. Don't know. Will check that the next days.

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

Posts: 1188



View Profile WWW Email
« Reply #11 on: 12. December 2006, 04:57:53 pm »

I'm having a problem that sounds similar, all thought possibly unrelated. I'm drawing a line using LineArray and if one end point is off the screen the line does not display.  Is there any chance that they are related?
Example is the org.xith3d.geometry.Origin class, which, as long as I can remember, has never worked..
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #12 on: 12. December 2006, 08:02:13 pm »

I'm having a problem that sounds similar, all thought possibly unrelated. I'm drawing a line using LineArray and if one end point is off the screen the line does not display.  Is there any chance that they are related?
Example is the org.xith3d.geometry.Origin class, which, as long as I can remember, has never worked..

Hmmm... It works in the ColorCube example, doesn't it?

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

Posts: 1188



View Profile WWW Email
« Reply #13 on: 12. December 2006, 08:12:37 pm »

IIRC, no.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #14 on: 12. December 2006, 08:23:14 pm »

IIRC, no.

Take a look at the screenshot. The origin lines are visible.
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic