indexunknown
|
 |
«
Posted
2009-11-09 23:49:18 » |
|
Hi, i've been trying to learn a bit opengl and i've put together a basic demo that uses lights and textured objects with materials and specular. It hasn't got many fancy techniques, only display lists for the objects. I got tackled down with trying to port different shadow mapping code from c++ cause the matrix calculations get me confused. I hope someone will find it interesting to test. W,A,S,D,mouse - move Lights can be turned on/off with keys 1 - 4 : http://www.hot.ee/testgame/appletloader.html
|
|
|
|
|
CommanderKeith
|
 |
«
Reply #1 - Posted
2009-11-12 18:20:26 » |
|
Cool demo. I just started learning openGL too. I can appreciate how hard it must have been to make! Nice work.
I'm more interested in openGL for fast 2d stuff, and I've been browsing the 2 libraries LWJGL and JOGL. LWJGL seems easier and there's more help out there in terms of tutorials and actually getting started. The JOGL API must have changed a lot over from version to version since most of the examples and tutorials on the net don't work. Also it's hard to figure out how to actually build a JOGL app. I don't understand anything about glugen etc. LWJGL was way easier in that regard. But LWJGL doesn't have anything from 'GLU' which provides polygon tesselation and resizing of windows which is annoying.
What are your ambitions for learning openGL?
Keith
|
|
|
|
princec
|
 |
«
Reply #2 - Posted
2009-11-12 18:38:48 » |
|
LWJGL has GLU. Cas 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
CommanderKeith
|
 |
«
Reply #3 - Posted
2009-11-12 19:10:34 » |
|
Hmm ok, shows how much I know.
By the way it's a nice library, very neat and simple.
I found blog and forum posts saying that in LWJGL you can't drag the edge of a window to expand it and it doesn't do polygon tesselation so you can't draw concave polygons without tesselating it yourself. Maybe that's not the case in the latest version, I'm still learning.
|
|
|
|
kappa
|
 |
«
Reply #4 - Posted
2009-11-12 21:03:51 » |
|
Hmm ok, shows how much I know.
By the way it's a nice library, very neat and simple.
I found blog and forum posts saying that in LWJGL you can't drag the edge of a window to expand it and it doesn't do polygon tesselation so you can't draw concave polygons without tesselating it yourself. Maybe that's not the case in the latest version, I'm still learning.
wrong again  1) lwjgl does have polygon tesselation, see lwjgl_util package. 2) although the default lwjgl Dispaly doesn't allow resizing, resizable lwjgl window is pretty easy to achieve using a JFrame with Display.setParent() function.
|
|
|
|
|
CommanderKeith
|
 |
«
Reply #5 - Posted
2009-11-13 05:13:07 » |
|
Cool, thanks for the tips. I'll try and figure it out. 
|
|
|
|
indexunknown
|
 |
«
Reply #6 - Posted
2009-11-13 13:36:55 » |
|
Thanks Keith i've always wanted to create my own little 3d game. I can send you the source of this demo and tell how to set it up in eclipse to get an applet together if you like.
|
|
|
|
|
CommanderKeith
|
 |
«
Reply #7 - Posted
2009-11-13 19:10:26 » |
|
Hey thanks, that would be sensational. my email's keithphw at hotmail.com I'm very interested to see how you did your demo.
|
|
|
|
indexunknown
|
 |
«
Reply #8 - Posted
2009-11-30 22:02:02 » |
|
Bump i've changed my demo to a more game like demo, it's looks like a fake minecraft and the physics are kind of unstable cause i haven't been able to implement simple AA collision detection properly but i think it's way cooler now.
|
|
|
|
|
TheAnalogKid
|
 |
«
Reply #9 - Posted
2009-11-30 22:30:10 » |
|
Pretty neat! 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
kappa
|
 |
«
Reply #10 - Posted
2009-12-01 17:19:33 » |
|
thats is pretty cool, works and runs really well.
however do get a crash/error dialog on exit, but it appears and disappears so fast that its hard to tell what it is.
|
|
|
|
|
indexunknown
|
 |
«
Reply #11 - Posted
2009-12-01 21:06:32 » |
|
even more new stuff, didn't actually plan to make it similar to minecraft but i added ability to build, destroy blocks it's quite fun to make something like that the building is kind of awkard cause im still bad at maths but it works opengl house lol 
|
|
|
|
|
indexunknown
|
 |
«
Reply #12 - Posted
2009-12-05 12:46:15 » |
|
i got normal mapping shader working from a tutorial, don't know if i should put it into demo cause it requires gl2.0 and lots of low end integrated chips don't support it.  EDIT: actually its easy to determine the capabilities with (GL11.glGetString(GL11.GL_VERSION).split("\\."))[0] and if its 2, then shaders will probably work.
|
|
|
|
|
Orangy Tang
|
 |
«
Reply #13 - Posted
2009-12-05 15:05:02 » |
|
EDIT: actually its easy to determine the capabilities with (GL11.glGetString(GL11.GL_VERSION).split("\\."))[0] and if its 2, then shaders will probably work.
Or use GLContext.getCapabilities() to get a ContextCapabilities object, then check the ContextCapabilities.OpenGL20 flag. This has the advantage of not breaking on the more non-standard version strings that your simple split() probably won't handle well.
|
|
|
|
TheAnalogKid
|
 |
«
Reply #14 - Posted
2009-12-05 16:27:34 » |
|
cause im still bad at maths but it works You're not alone.  Many many years have past since I made math and I forgot a lot of things in this domain, but I manage to do with it when there's a need. Thanks to google, wikipedia, etc. I know this is off topic but just wanted to share it.
|
|
|
|
CommanderKeith
|
 |
«
Reply #15 - Posted
2009-12-05 19:15:35 » |
|
Pretty cool. I like the openGL hut  I'm still plugging away learning LWJGL too. I keep on getting caught up on snags. Like I just spent 5hrs trying to draw a texture in orthographic mode. Damn textures, Grr! For some reason when the image is converted to a texture its height and width change...  At least I know now, lol.
|
|
|
|
indexunknown
|
 |
«
Reply #16 - Posted
2009-12-05 22:57:25 » |
|
Added the normalmapping shader into the demo, with key "t" you can change between shader and non-shader mode.
|
|
|
|
|
indexunknown
|
 |
«
Reply #17 - Posted
2009-12-11 14:13:46 » |
|
Intel graphics is just amazing, brand new laptop with intel x3100 runs at 0.9 fps and my over 5 years old pc at 50 fps.
|
|
|
|
|
xinaesthetic
|
 |
«
Reply #18 - Posted
2009-12-14 15:03:48 » |
|
It pauses intermittently on my system; Chrome / Vista / 8600m GT / T7250 CPU...
|
|
|
|
|
indexunknown
|
 |
«
Reply #19 - Posted
2009-12-14 17:28:10 » |
|
I havent tried under Chrome, maybe it's java plugin acts differently.
|
|
|
|
|
xinaesthetic
|
 |
«
Reply #20 - Posted
2009-12-14 17:36:59 » |
|
I just tried in FF and it seems ok.
Chrome is a great browser, generally, btw...
|
|
|
|
|
indexunknown
|
 |
«
Reply #21 - Posted
2009-12-23 14:22:59 » |
|
That ninja should be careful Leon has a gun (this is not in the demo, don't want to upload these copyrighted thingies, they don't do anything but pose anyway) 
|
|
|
|
|
CommanderKeith
|
 |
«
Reply #22 - Posted
2009-12-23 16:01:57 » |
|
Looking good, how did you load the models?
|
|
|
|
indexunknown
|
 |
«
Reply #23 - Posted
2009-12-23 16:11:29 » |
|
I used the mri.v3ds loader that can parse .3ds files http://www.multi.fi/~mbc/v3ds/Decode3dsApplet.html, although it has a big mistake in it currently and i had to write some reverse engineering code for the decoded text to get textures working properly because it currently acts like material name = texture file name but that's not true, materials can have texture's attached to them and the texture file name is in the decoded text under material property MAT_TEXMAP but it's in hexademical.
|
|
|
|
|
CommanderKeith
|
 |
«
Reply #24 - Posted
2009-12-24 04:02:36 » |
|
Nice job, that's pretty annoying when it just doesn't work. I usually give up. Did you consider ripping out the model loading code from jmonkeyengine or ardor3d? http://www.ardor3d.com
|
|
|
|
indexunknown
|
 |
«
Reply #25 - Posted
2009-12-24 13:45:43 » |
|
nop. Wanted to use a separate loading library.
|
|
|
|
|
|