New Blender Java Port‏

Hello,
I have started a Java port of the Blender 3D software. Currently it is capable of loading/saving files, manipulating UI, rendering, and editing meshes. I am curious to see how much interest there is in this project, so please check it out. More info about Blender Java can be found here: http://blender.dooglamoo.com
Thanks.

Jason LaDere
Dooglamoo Studios
1882 S Espina St
Las Cruces NM 88001

To be honest, there is very little interest in a port or rewrite of Blender (to Java or anything else) from a developer’s perspective. We already have a well establish development team with people that are knowledgeable with the current code base.

Moreover, after a quick look at the class layout (since the source code doesn’t seem to be available yet), it looks more like a direct translation of the code from C to Java (correct me if I’m wrong), which means much of the advantages of an OO language aren’t used at all.

It’s nice if you see it as a learning experience, but I wouldn’t expect much developers enthusiasm, if I were you.

Apologies if I sound a bit harsh, I just don’t when you to set your hopes to high and be disappointed later.

Edit: We’re always happy to see people interested in developing Blender though, but if you want to contribute code back, Java is a no go.

Martin

I pretty much agree with theeth.

haven’t yet read the reply’s but have to ask, just out of principle, why would I want a java port?

I mean the question seriously.

any specific reasons?

eg. would this make it possible to have blender as a web application usable on the to-be googles chrome os?

its not realy usefull, but it is pretty kwl

or just make it slower? Is it just me or is java annoying, I really do not like java…

java is used because it run in a virtual enviroment. you write once run anywhere. it would eliminate many of the platform problems, if a bug was fixed on one platform it would be fixed on every platform. it would make all versions consistant. well that used to be the case. with sun selling out to oracle who knows anymore.

Correct me if I’m wrong, but Java isn’t precompiled like C/C++/… are and so it’s “compiled” on the fly so yeah I think it would be slower, but it’s a guess.

If you could get it to work as a web based app, then it might be worthwhile. But it would have to work on limited hardware. I don’t see that happening.

I did a few short tests on it. I have an older desktop with AMD64 4000+, 2 gigs ram xp-x64.
I tried to load a high rez file, no go a low rez file no go. It froze and I had to kill the process.
I opened it up again and selected and moved a few vertices, that worked. I tried to find the buttons for modifiers so I could subdivide it and they aren’t there yet? Or aren’t being drawn.
I couldn’t find any texture buttons and couldn’t get the S, R,or g shortcuts to operate.
So not sure what is written into it yet but those things didn’t happen.
If someone wanted to do a web based port they might want to try the games in your browser technologies like Quake Live runs on ,again an interesting stunt but it might take a lot of work, and will it run on the new netbooks? Those are my thoughts and a little bit of experience.
JF

Java code is pre-compiled to “bytecode” which can be run by Java virtual machines (i.e. similar to the Python interpreter). When you make the Java VM run some Java app, it will very likely recompile the bytecode to native code to be run on your computer (one of the reasons why Java apps usually take 5-10 seconds to start up). Technically, it is supposed to cache these compiled versions so that your app doesn’t do that everytime, but in reality things really don’t work that way (cache gets cleared out after running other Java apps).

Another point to note is the memory usage of Java apps. By being “managed code” (i.e. the Java VM is used to run apps), most apps will take up more ram than they are actually using, which has downsides as well as a few benefits in limited cases. The benefit is that creating heaps of new stuff quickly won’t take quite as long, but the downside is that the rest of the time, these apps tend to be memory hogs.

Another caveat to be aware of regarding managed code: I have worked with a few Java-based apps in the past where the managed memory management (i.e. instead of the programmer explicitly having to free memory, the VM tries to figure out when to free it - a process known as Garbage Collection) would cause some usability problems. The Garbage Collector back then was pretty yucky, and would cause the application to freeze for up to 10 seconds at a time, at inconvenient intervals while it “freed” unused memory and probably did some other tricks.

Personally, I hate Java. I used to hate it more than I currently do, however, having worked with it a bit, I give it a bit more leeway in a few aspects. A major sore point regarding its syntax is that it is like a castrated C++, trying to be a bit more newbie friendly but at the same time doing away with some useful constructs and introducing some inconsistencies.


Anyways, back on topic.

I applaud these latest efforts at implementing Blender in another language if it’s just as an academic exercise. Finally someone who has actually taken the effort of making what looks to be a partially functional port instead of sitting on the sidelines flame-blasting about “why d0n’t u rewrit3 d entir think in an0thr lagnuange” type rants.

Having said that, I second theeth’s comments. As a private tinkering exercise, good on you. But as far as making an official (or otherwise) port of Blender to another language by the development team goes, there is no interest at all.

Aligorith

One of the features of this Java port which enabled me to get a lot done in a short amount of time is its auto generating DNA. I have a small program that reads the DNA from a .blend file and generates all of the proper Java classes. This means that I almost instantly had about 350 classes that I did not have to write by hand. Each of these classes contains all the attributes for the structure it represents, methods for reading and writing itself to file, ability to duplicate itself, and print itself for debugging.

That sounds interesting…

not a good argument at all man ! yeah it might make developing easier (which actually is not true at all, because even when using a VM, you got some special cases) but all that will SLOOOOOWWWW down the application like ever ! and I really mean Slllloooowwwww ddooowwwnn !!
so beside the challenge I don’t get the point though. Maybe a Java based Blend file viewer would make since, but rewriting the entire application. Plus seriously, have you check the entire source code. it would take ever !!
If it’s really to make the developers life easier, you really should ask them if they think that’s a good idea, because I doubt that, and it will save you some pain :s

but in another hand, if it’s only for challenge, I kind of respect that and I wish you good luck !

Hum,

If I were to do such a thing, I’d do it first on paper to get a rough idea of what should be done (first object projection), then in Python to get a quick idea of how good the previous idea was, then back to paper to clear up the ideas (better object projection and prospection), then in C++. And surely not a C to C++ translation (!) but an objectification to see how OOP can serve the blender development.

Doing it in java is certainly a personnal preference question. I have many reasons (some might be valid, others are certainly invalid) I wouldn’t choose Java but that’s not the question. My question is : what do you expect from the port? and how do you plan the port?

EDIT : Congrats for the WebStart version, looks good :slight_smile:

Daniel

well, from the user’s point of view, i can only say i like it. it opens the door to exotic operating systems especially those of portable gadgets which support java. maybe someone can clear things up, if that port could run on a modern mobile phone or PDA for example. or even the blenderplayer / game engine?

of course, i’m ignoring usability problems right now for a reason. but java will not die anytime soon, so keep it up! :slight_smile:

Could be useful to do some kind of Web Applet for Game Engine?

Congratulations on re-using the Blender source code in a different direction - it’s great to see how versatile an open-source project can be in different hands.

This kinda reminds me of Salvatore and his port of Blender to PocketPC ( which could now be redirected to having Blender on iPhone ).

Any new developments in the Blender world are welcome :slight_smile:

> Could be useful to do some kind of Web Applet for Game Engine?

Now that would ROCK!!!
Mal

It couldn’t.

It can only run on platform that have jogl support (linux, os x, solaris, windows, if I’m reading this right), which is even more restrictive than the list of os Blender currently supports.

Martin

I for one find this pretty interesting.

You should add a poll to this post.

Yes a poll, this is definitely a poll kind of thread…good topic BTW, as we are all(me) fairly biased…one way or the other…either way as annoying as it is…I love a little fire every now and then.

I don’t think it would be easy or realistic. It would either duplicate efforts and code to make Blender 100% Java or make deployement a bit more difficult with platform dependent C/C++ Java extensions. How much more work than the browser plugin anyway?

Daniel