Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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  
  Link.setSharedGroup()  (Read 2867 times)
0 Members and 1 Guest are viewing this topic.
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Posted 2006-11-01 18:34:35 »

Link.setSharedGroup() doesn't work properly, when rendering it throws a NullPointerException on the RenderBinProvider of the Shape3Ds contained in the Shared group.

The workaround I use is :
1  
2  
3  
removeChild(link);
link.setSharedGroup(group);
addChild(link);


though it's not particularly elegant.

Marvin, how can we fix that ?

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #1 - Posted 2006-11-01 19:18:43 »

Link.setSharedGroup() doesn't work properly, when rendering it throws a NullPointerException on the RenderBinProvider of the Shape3Ds contained in the Shared group.

The workaround I use is :
1  
2  
3  
removeChild(link);
link.setSharedGroup(group);
addChild(link);


though it's not particularly elegant.

Marvin, how can we fix that ?

I'm not at home at the moment. I'll investigate it later. But does this happen in ShaderGroupTest?

Marvin
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #2 - Posted 2006-11-01 20:18:31 »

I don't know I'll investigate it tomorrow.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #3 - Posted 2006-11-03 02:09:44 »

Link.setSharedGroup() doesn't work properly, when rendering it throws a NullPointerException on the RenderBinProvider of the Shape3Ds contained in the Shared group.

The workaround I use is :
1  
2  
3  
removeChild(link);
link.setSharedGroup(group);
addChild(link);


though it's not particularly elegant.

Marvin, how can we fix that ?

I checked that. SharedGroupTest works properly. Please check, if it does for you. If it does, please provide me an example where it doesn't (or modify SharedGroupTest).

Marvin
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #4 - Posted 2006-11-03 16:54:32 »

Hi,

Several things done at once :
- The Cal3D loader has now a test, with a bowman model from the game project I'm working on (I got special permissions from my art team).
- In PrecomputedAnimatedModel.java line 115 you can see the workaround I talked about shared groups
1  
2  
3  
4  
            // FIXME : hackish
           this.removeChild(link); // COMMENT THESE LINES TO SEE THE BUG
           link.setSharedGroup(group);
            this.addChild(link); // COMMENT THESE LINES TO SEE THE BUG

- in CalTest.java you can see how the "Transform" class is used... really, really neat.
- light bug in CalTest : lighting is correctly rendered on the first frame, then it's no longer active.

When all that's fixed, that will be fine.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #5 - Posted 2006-11-03 18:45:54 »

Hi,

Several things done at once :
- The Cal3D loader has now a test, with a bowman model from the game project I'm working on (I got special permissions from my art team).
- In PrecomputedAnimatedModel.java line 115 you can see the workaround I talked about shared groups
1  
2  
3  
4  
            // FIXME : hackish
           this.removeChild(link); // COMMENT THESE LINES TO SEE THE BUG
           link.setSharedGroup(group);
            this.addChild(link); // COMMENT THESE LINES TO SEE THE BUG

- in CalTest.java you can see how the "Transform" class is used... really, really neat.
- light bug in CalTest : lighting is correctly rendered on the first frame, then it's no longer active.

When all that's fixed, that will be fine.

I'll have a look.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #6 - Posted 2006-11-04 03:03:10 »

- In PrecomputedAnimatedModel.java line 115 you can see the workaround I talked about shared groups
1  
2  
3  
4  
            // FIXME : hackish
           this.removeChild(link); // COMMENT THESE LINES TO SEE THE BUG
           link.setSharedGroup(group);
            this.addChild(link); // COMMENT THESE LINES TO SEE THE BUG


Fixed.
Look at this place in the code. I've added a comment.

- light bug in CalTest : lighting is correctly rendered on the first frame, then it's no longer active.

Fixed.
But the lighting is not rendered very nicely. But I believe this is due to the angularity of the model and not due to the engine.

Marvin
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #7 - Posted 2006-11-04 15:39:59 »

Fixed.
But the lighting is not rendered very nicely. But I believe this is due to the angularity of the model and not due to the engine.
Surely, but, you know, it's a bit hard to adjust lighting when it actually doesn't work..  Grin

Thanks for all, Marvin!

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #8 - Posted 2006-11-04 21:38:26 »

Fixed.
But the lighting is not rendered very nicely. But I believe this is due to the angularity of the model and not due to the engine.
Surely, but, you know, it's a bit hard to adjust lighting when it actually doesn't work..  Grin

True... true Tongue
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #9 - Posted 2006-11-06 23:18:05 »

Huh, it seems the lighting problem isn't entirely gone... or I miss something here.. Does it work for you Marvin ?

Also the LWJGL renderer doesn't work on my computer :
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
KEY_0 11=48
KEY_1 2=49
KEY_2 3=50
KEY_3 4=51
KEY_4 5=52
KEY_5 6=53
KEY_6 7=54
KEY_7 8=55
KEY_8 9=56
KEY_9 10=57
KEY_A 30=65
KEY_B 48=66
KEY_C 46=67
KEY_D 32=68
KEY_E 18=69
KEY_F 33=70
KEY_G 34=71
KEY_H 35=72
KEY_I 23=73
KEY_J 36=74
KEY_K 37=75
KEY_L 38=76
KEY_M 50=77
KEY_N 49=78
KEY_O 24=79
KEY_P 25=80
KEY_Q 16=81
KEY_R 19=82
KEY_S 31=83
KEY_T 20=84
KEY_U 22=85
KEY_V 47=86
KEY_W 17=87
KEY_X 45=88
KEY_Y 21=89
KEY_Z 44=90
KEY_SPACE 57=32
No field: KEY_ENTER
KEY_ESCAPE 1=27
KEY_RIGHT 205=39
KEY_LEFT 203=37
KEY_UP 200=38
KEY_DOWN 208=40
No field: KEY_GEST_KEY_CODE
java.lang.NullPointerException
   at org.lwjgl.opengl.GL11.glGetInteger(GL11.java:1217)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.renderStart(CanvasPeerImpl.java:624)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:960)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1061)
   at org.xith3d.render.Renderer.renderOnce(Renderer.java:489)
   at org.xith3d.scenegraph.VirtualUniverse.renderOnce(VirtualUniverse.java:131)
   at org.xith3d.render.base.ExtXith3DEnvironment.render(ExtXith3DEnvironment.java:242)
   at org.xith3d.render.loop.RenderLoop.invokeRendering(RenderLoop.java:670)
   at org.xith3d.render.loop.RenderLoop.loopIteration(RenderLoop.java:686)
   at org.xith3d.render.loop.ExtRenderLoop.loopIteration(ExtRenderLoop.java:308)
   at org.xith3d.test.loaders.Cal3DLoaderTest.loopIteration(Cal3DLoaderTest.java:115)
   at org.xith3d.render.loop.RenderLoop.run(RenderLoop.java:812)
   at java.lang.Thread.run(Thread.java:595)
Exception in thread "Thread-4" java.lang.Error: java.lang.NullPointerException
   at org.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:1024)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1061)
   at org.xith3d.render.Renderer.renderOnce(Renderer.java:489)
   at org.xith3d.scenegraph.VirtualUniverse.renderOnce(VirtualUniverse.java:131)
   at org.xith3d.render.base.ExtXith3DEnvironment.render(ExtXith3DEnvironment.java:242)
   at org.xith3d.render.loop.RenderLoop.invokeRendering(RenderLoop.java:670)
   at org.xith3d.render.loop.RenderLoop.loopIteration(RenderLoop.java:686)
   at org.xith3d.render.loop.ExtRenderLoop.loopIteration(ExtRenderLoop.java:308)
   at org.xith3d.test.loaders.Cal3DLoaderTest.loopIteration(Cal3DLoaderTest.java:115)
   at org.xith3d.render.loop.RenderLoop.run(RenderLoop.java:812)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
   at org.lwjgl.opengl.GL11.glGetInteger(GL11.java:1217)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.renderStart(CanvasPeerImpl.java:624)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:960)
   ... 10 more


I'm also investigating how shadows work.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #10 - Posted 2006-11-06 23:45:54 »

Huh, it seems the lighting problem isn't entirely gone... or I miss something here.. Does it work for you Marvin ?

It did. But for some reason, it doesn't anymore. I'll investigate it.

Also the LWJGL renderer doesn't work on my computer :
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
...
java.lang.NullPointerException
   at org.lwjgl.opengl.GL11.glGetInteger(GL11.java:1217)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.renderStart(CanvasPeerImpl.java:624)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:960)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1061)
   at org.xith3d.render.Renderer.renderOnce(Renderer.java:489)
   at org.xith3d.scenegraph.VirtualUniverse.renderOnce(VirtualUniverse.java:131)
   at org.xith3d.render.base.ExtXith3DEnvironment.render(ExtXith3DEnvironment.java:242)
   at org.xith3d.render.loop.RenderLoop.invokeRendering(RenderLoop.java:670)
   at org.xith3d.render.loop.RenderLoop.loopIteration(RenderLoop.java:686)
   at org.xith3d.render.loop.ExtRenderLoop.loopIteration(ExtRenderLoop.java:308)
   at org.xith3d.test.loaders.Cal3DLoaderTest.loopIteration(Cal3DLoaderTest.java:115)
   at org.xith3d.render.loop.RenderLoop.run(RenderLoop.java:812)
   at java.lang.Thread.run(Thread.java:595)
Exception in thread "Thread-4" java.lang.Error: java.lang.NullPointerException
   at org.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:1024)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1061)
   at org.xith3d.render.Renderer.renderOnce(Renderer.java:489)
   at org.xith3d.scenegraph.VirtualUniverse.renderOnce(VirtualUniverse.java:131)
   at org.xith3d.render.base.ExtXith3DEnvironment.render(ExtXith3DEnvironment.java:242)
   at org.xith3d.render.loop.RenderLoop.invokeRendering(RenderLoop.java:670)
   at org.xith3d.render.loop.RenderLoop.loopIteration(RenderLoop.java:686)
   at org.xith3d.render.loop.ExtRenderLoop.loopIteration(ExtRenderLoop.java:308)
   at org.xith3d.test.loaders.Cal3DLoaderTest.loopIteration(Cal3DLoaderTest.java:115)
   at org.xith3d.render.loop.RenderLoop.run(RenderLoop.java:812)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
   at org.lwjgl.opengl.GL11.glGetInteger(GL11.java:1217)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.renderStart(CanvasPeerImpl.java:624)
   at org.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:960)
   ... 10 more


This error appears in some situations (reproducably). But I don't have an idea why. I  have never seen the LWJGL renderer without this problem. Maybe Yuri has an answer on it, when he's back. Or we'll have to deeper investigate it.

I'm also investigating how shadows work.

Good to know. I think, you'll have to add an Occluder to a Shape3D, which can e.g. be a quadrat. In general it is a simplified version of the shape's bounds. Together with lights this should be sufficient to get it working. But I never tried.

Marvin
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #11 - Posted 2006-11-08 18:31:59 »

I get some strange effects with shadow rendering on.

Also, texture rendering has gone... gosh regular users don't checkout now ^^

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #12 - Posted 2006-11-09 02:57:17 »

The problem with lights is fixed Smiley.

Also, texture rendering has gone... gosh regular users don't checkout now ^^

Is there an example, where I can see the effect?

Marvin
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #13 - Posted 2006-11-09 19:33:21 »

Well the Cal3DLoaderTest don't work with textures for me now. (Note : maybe it's not committed properly cause I upgraded my Eclipse from 3.2 to 3.3M3 and my Subclipse SVN plugin is gone so tomorrow it'll be fixed hopefully)

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
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.

Riven (5 views)
2014-07-23 20:17:25

ctomni231 (39 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (38 views)
2014-07-14 16:23:47

Riven (37 views)
2014-07-14 11:51:35

quew8 (33 views)
2014-07-13 13:57:52
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!