Is OpenGL or Java Great for Real Time Object Shadows?

Started by
7 comments, last by Ronnie Mado Solbakken 10 years, 8 months ago

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

Advertisement

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

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

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.

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.

CEO of Dynamic Realities

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

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)

[size="1"]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!
"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.

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).

- Awl you're base are belong me! -

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

This topic is closed to new replies.

Advertisement