Java-Gaming.org Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (649)
Games in Android Showcase (181)
games submitted by our members
Games in WIP (699)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3] 4 5 ... 10
 21 
 on: 2016-02-09 11:14:03 
Started by DarkCart - Last post by princec
I would rather have liked to do Battledroid in true 3D but I realise now that's the sort of undertaking that needs actual teams of experts working on it for years, and it'd probably make no more actual money than if it were done in 2D. So it remains a pipe dream.

Cas Smiley

 22 
 on: 2016-02-09 09:49:03 
Started by BitShard - Last post by KaiHH
@Roquen mentioned correctly in another thread that if you have already built a matrix with orthogonal column/row vectors in the upper left 3x3 submatrix, then the directions for X, Y and Z can simply be obtained by reading the first, second or third matrix row, respectively. No need to use sin/cos.

So, obtaining the "forward" direction for a built view transformation matrix would simply be:
1  
2  
3  
4  
5  
Matrix4f m = ...; // <- that view matrix
Vector3f forward = new Vector3f();
forward.x = -m.m02;
forward.y = -m.m12;
forward.z = -m.m22;

If you have a normalized quaternion (like in this case) and want to obtain the forward vector from that, you can do:
1  
2  
3  
4  
5  
6  
7  
8  
Quaternionf q = ...; // <- that quaternion
Vector3f forward = new Vector3f();
float dx = q.x + q.x;
float dy = q.y + q.y;
float dz = q.z + q.z;
forward.x =  q.w * dy - q.x * dz;
forward.y = -q.y * dz - q.w * dx;
forward.z =  q.x * dx + q.y * dy - 1.0f;

Or when you use JOML, like in this case, this is neatly packed in the "positiveZ()" method, whose result you then simply negate:
1  
2  
3  
4  
5  
6  
// with a quaternion:
Quaternionf q = ...;
q.positiveZ(forward).negate();
// or with a matrix:
Matrix4f m = ...;
m.positiveZ(forward).negate();

 23 
 on: 2016-02-09 09:17:38 
Started by ags1 - Last post by ags1
How did I miss that? I must have started skimming after the first 140 characters, it was a bit longer than a tweet Smiley

 24 
 on: 2016-02-09 08:49:09 
Started by DarkCart - Last post by ShadedVertex
I'd really like to be able to a breathtakingly beautiful island using LWJGL, but as of now I'm unable to realise this dream as I simply lack the skill to do so. Of course, I'm still learning OpenGL, so I hope I'll eventually be able to accomplish this feat (it's a feat to me, but probably not to certain people on this forum *ahem* theagentd *ahem*).
Well, your first mistake is shading vertices. You have to do lighting per pixel nowadays. =PPP

Yeah, I know, I do the final lighting calculations in my fragment shader (which I'm pretty sure is also known as the per-pixel shader...right?).

Oh wait. OH SORRY, you were making a joke, weren't you? Yeah, yeah: I get it. ShadedVertex.

I lack a sense of humour, sorry.

EDIT: No, I actually don't lack a sense of humour.

 25 
 on: 2016-02-09 08:45:19 
Started by BurntPizza - Last post by ShadedVertex
Here's a bunch of links I collected (they're all related to computer graphics):

https://gist.github.com/AbstractAlgorithm/d0194f477adf829822ff (Riven shared this link not long ago)

https://www.opengl.org/resources/

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-837-computer-graphics-fall-2012/

http://learnopengl.com/

http://openglinsights.com/

http://people.inf.elte.hu/plisaai/pdf/David%20Wolff%20-%20OpenGL%204.0%20Shading%20Language%20Cookbook%20(2).pdf

https://www.youtube.com/playlist?list=PLRIWtICgwaX0u7Rf9zkZhLoLuZVfUksDP

https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_pref01.html

http://john-chapman-graphics.blogspot.sg/2013/01/ssao-tutorial.html

http://www.paulboxley.com/blog/2011/03/terrain-generation-mark-one

http://gamedev.stackexchange.com/questions/1068/opengl-optimization-tips

http://www.mesa3d.org/brianp/sig97/perfopt.htm

http://www.inf.pucrs.br/flash/tcg/aulas/opt/perfogl.pdf

http://ptgmedia.pearsoncmg.com/images/9780321399526/samplepages/0321399528.pdf

https://www.opengl.org/documentation/

https://www.youtube.com/watch?v=HauN98naZ9U

http://notch.tumblr.com/post/8386977075/its-a-scam

https://mediatech.aalto.fi/~samuli/publications/laine2010i3d_paper.pdf

https://www.youtube.com/watch?v=Gshc8GMTa1Y

https://www.youtube.com/watch?v=oB1eMC9Jdsw

https://www.youtube.com/watch?v=m3K4Txg_jH0

https://www.youtube.com/watch?v=E6wyeVmjxk0

 26 
 on: 2016-02-09 08:44:20 
Started by DarkCart - Last post by Rayvolution
My dream game isn't limited by technical problems, more so by time problems.

I want to make a top down open world survival game that's mostly centered around Harvest Moon style game play but with Diablo-style dungeon crawling. The world would be full of randomly generated content, and to gather things for your home/farm you have to delve into nearby dungeons and abandoned buildings.

The problem is, while I can code something like that, the sheer volume of content I'd need would prevent me from ever finishing the project. Wink

 27 
 on: 2016-02-09 08:38:08 
Started by DarkCart - Last post by ShadedVertex
I'd really like to be able to a breathtakingly beautiful island using LWJGL, but as of now I'm unable to realise this dream as I simply lack the skill to do so. Of course, I'm still learning OpenGL, so I hope I'll eventually be able to accomplish this feat (it's a feat to me, but probably not to certain people on this forum *ahem* theagentd *ahem*).
Well, your first mistake is shading vertices. You have to do lighting per pixel nowadays. =PPP

Yeah, I know, I do the final lighting calculations in my fragment shader (which I'm pretty sure is also known as the per-pixel shader...right?).

 28 
 on: 2016-02-09 07:54:27 
Started by DarkCart - Last post by theagentd
I'd really like to be able to a breathtakingly beautiful island using LWJGL, but as of now I'm unable to realise this dream as I simply lack the skill to do so. Of course, I'm still learning OpenGL, so I hope I'll eventually be able to accomplish this feat (it's a feat to me, but probably not to certain people on this forum *ahem* theagentd *ahem*).
Well, your first mistake is shading vertices. You have to do lighting per pixel nowadays. =PPP

 29 
 on: 2016-02-09 07:39:27 
Started by DarkCart - Last post by CommanderKeith
Thanks liquidnitrogen, yes that's a good idea to make them procedural. I didn't think of that, that's why I made many different versions of the same thing.
It might be nice to also animate everything individually, such as the leaves blowing aroind when a gust of wind sweeps through.

 30 
 on: 2016-02-09 06:57:03 
Started by DarkCart - Last post by LiquidNitrogen
@CommanderKeith that looks really cool, you could even procedurally generate and animate the plants, and probably other scenery too.

Pages: 1 2 [3] 4 5 ... 10
 
KaiHH (117 views)
2016-01-31 23:15:29

sci4me (144 views)
2016-01-23 21:47:05

sci4me (130 views)
2016-01-23 21:46:58

KaiHH (162 views)
2016-01-19 13:26:42

theagentd (249 views)
2016-01-05 17:10:00

ClaasJG (264 views)
2016-01-03 16:58:36

chrisdalke (255 views)
2015-12-28 06:31:21

Guerra2442 (259 views)
2015-12-25 03:42:55

Guerra2442 (262 views)
2015-12-25 03:27:21

theagentd (288 views)
2015-12-21 14:43:24
List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48
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!