|
-
May 10th, 2011, 01:36 PM
#1
Are there any 3D graphics support from Java
Hi folks,
I'm doing a project on Ray Tracing. Initially I plan to use some classic algorithm like Turner Whitted's.
Originally, I intended to use Visual C++ 2008 with OpenGL 3.0.
But I am considering alternatives.
As I understand, Java development environment is less complicated compared to using C++/OpenGL.
Therefore I also consider using Java. I've also done some information gathering that Java 3D is an extention for 3D graphics. However, I'm not very sure about its capability.
For example, I can implement vertices of a cube by specifying each vertex's x,y,z coordinates in C++/OpenGL. Can you do the same in Java 3D or should I ask, does Java 3D support this kind of approach?
Your information will be greatly appreciated!
-
May 11th, 2011, 03:24 AM
#2
Re: Are there any 3D graphics support from Java
I'm no 3D expert, but rather than judge Java3D on how similar the coding idioms are to another library in a different language, why not follow a couple of tutorials and see how it is used?
For example, the Sun 3D Tutorial, and this one looks quite good, but there are plenty of others online.
By viewing the old we learn the new...
Chinese proverb
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
May 30th, 2011, 05:15 PM
#3
Re: Are there any 3D graphics support from Java
 Originally Posted by RayTracer2011
Your information will be greatly appreciated!
Don't waste your time learning Java3D (*). It's not supported.
In fact Java has no official support for 3D graphics at all but there are several viable third-party initiatives like,
http://www.lwjgl.com/
http://jogamp.org/
These are OpenGL bindings to Java so it's a way of using OpenGL from Java instead of C++.
But! In principle Ray Tracing is a totally different paradigm from the triangulation based OpenGL (and Direct3D) approach so why do you want to use OpenGL in a Ray Tracing project?
I suggest you have a look at this textbook,
http://www.raytracegroundup.com/index.html
(*) It's history now but I've never felt let down so completely as by Java, Java3D and Sun. My strong view is that anyone who uses Java for desktop developments is a loser. I'd go for C++ anytime. Never use Java for anything but server applications.
Last edited by nuzzle; May 30th, 2011 at 08:18 PM.
-
May 31st, 2011, 08:05 AM
#4
Re: Are there any 3D graphics support from Java
 Originally Posted by nuzzle
My strong view is that anyone who uses Java for desktop developments is a loser.
Opinions are fine, but insulting other people's choices is just uncalled for. Most of us can appreciate the fact that Java isn't the strongest language for desktop applications, but some people would surely dissagree.
-
May 31st, 2011, 12:42 PM
#5
Re: Are there any 3D graphics support from Java
 Originally Posted by ProgramThis
The strongest language is the one most suitable for the task at hand, and even on the desktop, Java can have its moments. Commercially though, language choice is often (usually?) driven by other factors, although it's true the technology is definitely moving away from desktop development in general.
But hey, I've spent a few fun years on Java desktop development, had a generally good time, and made enough to retire comfortably at 55; I guess that makes me a lucky loser 
All truths are easy to understand once they are discovered; the point is to discover them...
G. Galilie
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
June 3rd, 2011, 01:38 PM
#6
Re: Are there any 3D graphics support from Java
 Originally Posted by ProgramThis
Opinions are fine, but insulting other people's choices is just uncalled for. Most of us can appreciate the fact that Java isn't the strongest language for desktop applications, but some people would surely dissagree.
Don't you have any better arguments in favour of Java on the desktop? It's nothing compared to the years of suffering I had to endure.
You're referring to Eclipse but didn't you know they couldn't use AWT/Swing because it was too crappy? It was only after Eclipse introduced their own GUI technology that Sun finally got the message. And what did they do? They attacked Eclipse on formal grounds. The Eclipse approach wasn't portable. Only when developers started leaving the Swing bandwaggon in droves did Sun back off. Things improved but painstakingly slow with Sun dragging their feet for a decade. Eclipse still doesn't use Swing.
Java3D is another sad story. From having been considered core Java it got more and more peripheral until it faded away completely. Developments just stopped leaving everybody out in the cold. Only after several years did Sun finally admit they had lost interest and open sourced it. And, as I told the OP, to this day Java doesn't have any official 3D graphics support. I had high hopes Oracle might change that but no.
Ever heard of Java Grande? It was a very ambitious initiative from the scientific community which was driven to extinction by Java's crappiness on the desktop. The only remaning proof it ever existed is a fossile called BigInteger.
So Java is great on the server side but on the desktop - forget it. Dlorde is the exception that proves that rule. And even he has realized it's time to grab the loot and run. 
But okay, loser may be the wrong word. Let's say I feel sorry for anyone who has to use Java on the desktop.
Last edited by nuzzle; June 4th, 2011 at 02:24 AM.
-
June 4th, 2011, 04:21 AM
#7
Re: Are there any 3D graphics support from Java
 Originally Posted by nuzzle
So Java is great on the server side but on the desktop - forget it. Dlorde is the exception that proves that rule. And even he has realized it's time to grab the loot and run. 
Exception? not in my experience; I know a considerable number of developers working on Java in commercial situations who have developed and maintained desktop apps - and some still do. I agree it's becoming less common, but it still goes on - business software has a long legacy period. Java desktop development may have partly financed my retirement, along with web development, and other things, but wasn't a reason for it 
But okay, loser may be the wrong word. Let's say I feel sorry for anyone who has to use Java on the desktop.
Meh - I remember the team developing desktop workflow systems for Microsoft in C++ in the '90s (when all this was fields) with the early MS Windows APIs and COM - we deserved some sympathy for that - especially when Microsoft pulled out and it all went down the pan. I rescued the incomplete Custom Captions). Happy days - nostalgia ain't wot it used to was... 
There does not now, nor will there ever exist, a programming language in which it is the least bit hard to write bad programs...
L. Flon
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
June 4th, 2011, 09:48 AM
#8
Re: Are there any 3D graphics support from Java
 Originally Posted by dlorde
Exception?
Wherever there's a corpse there are vultures feasting on the carcass. I have no doubt the Java desktop will provide a steady and generous income to consultants/employees/tool providers/authors for years to come. And I'm sure they'll all rise in unison giving the Java desktop a standing ovation.
But those are not the people I'm addressing. My warning is directed towards people who consider using Java to develop a desktop application they care about. Stay away from Java like the plague.
It's deceptive. Java looks very good at first. It's only when you're far into developments with a big investment in time and money you'll realise it's a dead-end. And then it's too late.
The fact that other companies are as bad as Sun doesn't change anything. Maybe Oracle will make a difference. I just don't see any. Don't use Java on the desktop until you know for sure. Java is good for server applications. Use it for that.
Last edited by nuzzle; June 7th, 2011 at 02:38 AM.
-
June 4th, 2011, 06:05 PM
#9
Re: Are there any 3D graphics support from Java
 Originally Posted by nuzzle
Wherever there's a corpse there are vultures feasting on the carcass. I have no doubt the Java desktop will provide a steady and generous income to consultants/employees/tool providers/authors for years to come. I'm sure they'll all stand up in unison giving the Java desktop a standing ovation.
No doubt 
But those are not the people I'm addressing. My warning is directed towards people who consider using Java to develop a desktop application they care about. Stay away from Java.
It's deceptive. Java looks very good at first. It's only when you're far into developments with a big investment in time and money you'll realise it's a dead-end. And then it's too late.
Wow, sounds like you had a really nasty experience... it really doesn't have to be that bad.
Plus, ISTM if you have a decent design based on interfaces, it's really not that difficult to migrate it to the web if the desktop is too limiting. Good design is key.
A great lathe operator commands several times the wage of an average lathe operator, but a great writer of software code is worth 10,000 times the price of an average software writer...
Bill Gates
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
June 7th, 2011, 01:53 AM
#10
Re: Are there any 3D graphics support from Java
 Originally Posted by dlorde
Plus, ISTM if you have a decent design based on interfaces, it's really not that difficult to migrate it to the web if the desktop is too limiting. Good design is key.
A great lathe operator commands several times the wage of an average lathe operator, but a great writer of software code is worth 10,000 times the price of an average software writer...
Bill Gates
Are you implying it's a question of whether you're a good Java programmer? That the problem isn't Java but lousy programmers and bad design?
Again lets use Eclipse as an example. In fact one of its main designers is Erich Gamma, member of the Gang of Four and co-author of the Design Pattern classic. Still they had to throw out AWT/Swing. Still Eclipse has had severe performance issues.
No, the problem with Java on the desktop is Java. Or rather the implementation of the Java technology which has been crappy for years and years. Java never caught up with the initial hype. Running everywhere sounds good until you realize the price you pay for that is that it doesn't run properly anywhere.
Note that I'm talking strictly about the Sun years and the desktop. Things may improve with Oracle and be better on other platforms than the PC. But I strongly recommend anyone considering Java for a major desktop programming project - think again!
Last edited by nuzzle; June 7th, 2011 at 02:37 AM.
-
June 8th, 2011, 06:03 AM
#11
Re: Are there any 3D graphics support from Java
 Originally Posted by nuzzle
Are you implying it's a question of whether you're a good Java programmer? That the problem isn't Java but lousy programmers and bad design?
No, not at all. I'm saying that if the application design is good, it's much easier to migrate it from the desktop to the web. That's my personal experience, having migrated both well-designed and poorly-designed applications. I expect it's true of any language, but Java happens to be the language under consideration.
I haven't experienced the difficulties with Java desktop development that you appear to have had; we migrated certain desktop applications to the web to 'add value', and as part of a broader company strategy, not because they were especially problematic per-se.
The Eclipse developers may have decided not to use Swing, but there are IDE developers who have used Swing - for example, JetBrains use Swing for their IntelliJ IDEA IDE.
They've open-sourced the Swing-based IntelliJ platform (which, like Eclipse, is a language-independent development framework) so you can download it and see how it works; including a virtual file system, UI framework (action system, toolwindows, etc.), text editor, lexing, parsing, abstract syntax trees and other language-specific infrastructure, frameworks for implementing navigation, code completion, inspections, intentions, refactorings, version control integration, debugger framework, graphical unit test runner, etc. All in Java with Swing. This would suggest it's more a matter of preference than necessity.
Incidentally, when we're faced with a "prove or disprove," we're usually better off trying first to disprove with a counterexample, for two reasons: A disproof is potentially easier (we need just one counterexample); and nitpicking arouses our creative juices. Even if the given assertion is true, our search for a counterexample often leads to a proof, as soon as we see why a counterexample is impossible. Besides, it's healthy to be skeptical...
R. Graham, D. Knuth and O. Patashnik
Last edited by dlorde; June 8th, 2011 at 09:57 AM.
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
June 8th, 2011, 05:12 PM
#12
Re: Are there any 3D graphics support from Java
 Originally Posted by dlorde
No, not at all.
Well, good design is about anticipating change but it's not at all obvious that change for a desktop application naturally means migration to the web. Easy migration to the web requires an application to have a clean client-server structure. But lack of it doesn't in itself constitute bad design. It's easy for you to judge in hindsight.
It's not difficult to develop in Java. What's difficult is to use the result without suffering a nervous breakdown or heart-attack. Most users of Java technology don't have a choise really. They have to use the in-house application their company has developed. If users had a choise, Java on the desktop would be dead and gone already and not just slowly dying.
Many organizations realize this and that's where the "broader company strategy" you're talking about enters the picture. Migration to the web means splitting the Java application into a client and a server part. The next step is to drop the Java client altogether and use something better. In short, the web offers an excellent exit strategy to finally get rid of Java on the desktop.
And that's what open-sourcing the IntelliJ platform is about too. An exit strategy. Open-sourcing is often the first step for a company to distantiate itself from a product that no longer fits within its core strategy. Just wait and see.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|