Jump to content

  • Log In with Google      Sign In   
  • Create Account


Is OpenGL or Java Great for Real Time Object Shadows?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 3Ddreamer   Crossbones+   -  Reputation: 2902

Like
-2Likes
Like

Posted 25 July 2013 - 04:04 AM

Hi,

 

 

I want to incite a debate, which is why I started this thread here.

 

So, does Java or OpenGL get a "bad rap" in the real time rendering of shadows or is this not right, especially in regard to any performance hit imagined by the coders who try real time, nice shadow rendering while using them?

 

I am suspicious and believe that there surely must be a way to render real time shadows with excellent performance using Java and/or OpenGL coding. What is the strategy to get that great performance of shadows?

 

 

 

Clinton


Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


Sponsor:

#2 TheChubu   Crossbones+   -  Reputation: 3631

Like
0Likes
Like

Posted 25 July 2013 - 04:57 AM

I don't quite get what has Java to do with stuff that will end in a GLSL shader wacko.png


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#3 3Ddreamer   Crossbones+   -  Reputation: 2902

Like
1Likes
Like

Posted 25 July 2013 - 05:03 AM

I hear or read both Java and OpenGL getting criticized for a performance hit in using them (together or exclusively) for real time shadows.  Is this justified?

 

 

Clinton


Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#4 Six222   Members   -  Reputation: 439

Like
0Likes
Like

Posted 25 July 2013 - 05:28 AM

What TheChubu is saying is that Java doesn't have much to do with OpenGL, Java can be used to make OpenGL calls. OpenGL is used in many high quality/performance applications so I wouldn't worry about it.

 

You are right about Java, it isn't as fast as others (C++ etc.) but it will be more than enough to support what you will want to do.


Edited by Six222, 25 July 2013 - 05:29 AM.


#5 vipar   Members   -  Reputation: 170

Like
0Likes
Like

Posted 25 July 2013 - 05:48 AM

Not entirely true.

 

It seems to be a common misconception that Java is a slow language when in truth it's not really slow compared to so many other languages. A poorly made C++ program can perform many times worse than a decent Java program.

 

Games like Runescape by Jagex was made in Java and is now transitioning into HTML5 after many years of running in Java. That is a very successful, casual, MMORPG in your browser. And that game worked pretty much perfectly.

Sure, if you want to work real magic with graphics, processing and so on, C++ is what you need as it gives you much power and control. But the bias against Java is a bit old now.

 

OpenGL is just an open standard for graphic applications. It works as interface to provide OpenGL Bindings between the hardware and your application. It is not bound to one single language. You can look at a framework like SFML which got Java bindings. Combined with the Artemis Framework (Component Framework for games) you can make excellent games in Java too.


Edited by vipar, 25 July 2013 - 05:49 AM.

CEO of Dynamic Realities


#6 3Ddreamer   Crossbones+   -  Reputation: 2902

Like
0Likes
Like

Posted 25 July 2013 - 06:18 AM

Long term, I am going to use Java and OpenGL.

 

I specifically want to get at what seems to me is a myth about a significant performance hit when implementing real time shadows in Java or OpenGL.  Most of the other issues I probably already know.

 

 

Clinton


Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#7 SimonForsman   Crossbones+   -  Reputation: 5720

Like
2Likes
Like

Posted 25 July 2013 - 06:22 AM

I hear or read both Java and OpenGL getting criticized for a performance hit in using them (together or exclusively) for real time shadows.  Is this justified?

 

 

Clinton

 

No,

 

OpenGL gives you roughly the same performance as Direct3D10/11 on nvidia and AMD GPUs (Intel is a different matter, their OpenGL drivers on Windows have been fairly poor in the past and might still be poor(i havn't bothered testing them in the last couple of years) and sometimes significantly better performance than D3D9 (primarily due to a lower drawcall overhead).

 

Java adds a bit of overhead on OpenGL calls though since you have to go through the native interface to access a native library but it shouldn't be enough to cause problems unless you are making insane amounts of native calls or if you're allready pushing the limits of the hardware.

 

If you get performance issues with Java it is far more likely that it is memory related (It is quite difficult to write cache and garbage collector friendly code in Java), for well written code however Java can perform just as well and sometimes even better than C++.

 

There are basically three areas where Java really falls short of C++ performance wise.

 

1) Control over memory (This makes some cache related issues difficult to solve and cache misses are very expensive, + the GC can be a pain in the ass, C++ provides better tools such as custom allocators, placement new, etc to deal with these issues in a reasonably sane way)

2) Native call overhead (For a game its not just rendering that may require native calls, you might also need it for sound and physics for example and while the overhead isn't that big it does add up)

3) No manual SIMD support. (manual SIMD support is missing in C++ as well but most modern C++ compilers provide extensions for it on the platforms that can use such instructions making it less of an issue, for 3D games there is often quite alot of code that benefits greatly from using SIMD)


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#8 Hodgman   Moderators   -  Reputation: 27055

Like
8Likes
Like

Posted 25 July 2013 - 07:55 AM

"Good real time shadows" is an algorithmic problem. The languages and APIs used are completely irrelevant, so the answer is mu.
 
There's reasons to criticize GL, and reasons to criticize Java, just as there's reasons to criticize anything... but no, these tools will in no way impact your ability to implement good shadowing algorithms.


What is the strategy to get that great performance of shadows?

What have you tried?

does Java or OpenGL get a "bad rap" in the real time rendering of shadows
...
I hear or read both Java and OpenGL getting criticized for a performance hit in using them (together or exclusively) for real time shadows.
...
I specifically want to get at what seems to me is a myth about a significant performance hit when implementing real time shadows in Java or OpenGL

Start with telling us where you got this myth from.

Edited by Hodgman, 25 July 2013 - 07:57 AM.


#9 Malabyte   Members   -  Reputation: 583

Like
0Likes
Like

Posted 27 July 2013 - 12:41 AM

One of the first things I really tried to understand as I introduced myself to programming, was the whole methodology aspect of it and how you approach a given problem. After all, if you're gonna spend a lot of time doing top down programming, you better learn how to generally solve problems that way too. This isn't just something a programmer does, but anyone problemsolver.

 

As I understand it, the programming language you use is rarely, if ever, a major factor as to why things don't work properly. Language has more to do with ease of use and the overall range of what you can do (and not how well you can do them).


Edited by Malabyte, 27 July 2013 - 12:41 AM.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS