PDA

View Full Version : Plugin developing for a regular coder.


ThePriest
06-02-2008, 05:03 AM
Do you think somebody who works primarily in game development/programming would have an incredibly difficult time transitioning to and then coding in the COFFEE environment? Given that they have a minimal understanding of 3d.

LucentDreams
06-02-2008, 05:10 AM
not relaly since its highly unlikely they'd use COFFEE they woudl just use C++ which should already be pretty standard to them.

Darter
06-02-2008, 05:54 AM
A game programmer lacking experience with 3D apps would still be conversant with the mathematics behind a 3D environment.

Transitioning to working with Cinema 4D's excellent C++ SDK as a client programmer would be relatively easy.

soccerrprp
06-02-2008, 07:56 AM
Someone please explain why a universally portable code such as Java is not being used or supported in plugin development? It would seem to me that doing so would eliminate the whole MAC/PC versions issue, etc.


Richard

lllab
06-02-2008, 08:12 AM
a c++ plugin is for both working operating systems, java is also not comparable to c++.

cheers
stefan

JamesMK
06-02-2008, 08:19 AM
Well, the Mac vs. PC problem only happens when you're using C++ plugins because such plugins are meant to run as efficiently as the native tools, which means they have to be compiled separately on each target platform. Developers these days also have to factor in the 32 vs. 64 bit flavours, bringing the total up to four different compilations.

Running Java code on the other hand, while theoretically platform independent, has several complications that makes it less of a practical choice in this context, and it would not be as efficient in terms of performance. It would probably perform more or less on par with COFFEE, and since that already is platform neutral (a COFFEE plugin will run on both Mac and PC without any sort of changes needed) it would seem somewhat pointless to introduce Java only to end up with a net effect that's already available anyway.

soccerrprp
06-02-2008, 08:41 AM
That will do. I didn't think about Coffee as already being the "portable" option.

Thanks.

Katachi
06-02-2008, 09:46 AM
bringing the total up to four different compilations.

Now multiply this by the amount of versions to compile for, i.e. 9.6, R10 (load of code to change if not taken care of earlier to make it compile due to changed classes and function calls) and R10.5 (necessary recompile because some things simply do not work with R10 compiling). Now, that makes quite a lot to compile.

and it would not be as efficient in terms of performance. It would probably perform more or less on par with COFFEE

Thatīs not true. Maybe 1995 java was so slow you couldnīt use it, but nowadays? Java is as fast as C++ (and sometimes even faster depending on what you need to do). The myth of Java being slow due to GC and such is not applicable anylonger. It has several benefits over C++ (gc, memory locality etc.).

Anyway, as C++ is the language of Cinema 4D and is very capable and has the right performance, this is not the worse choice. Itīs just one choice.

And in the end a language can be as fast as can be, but if you donīt know how to code, it will be slow anyway. Itīs like graphics, itīs the artist that makes the most out of it, not the app. ;)

soccerrprp
06-02-2008, 09:59 AM
I must admit, I have heard in length about the "myth" that Java is appreciably slower than C++. As Designer has mentioned, Java WAS known to be SLOWER in the past, but recent developments in the language has made it a viable and comparable programming language to C++ in terms of speed and certainly seems "easier" to grasp.

It's funny how old comparisons of things persist. Just like how C4D gets dissed by those who continue to view it as it was "way back then..."

Anyway, Coffee seems to be the answer to the whole portability issue I suppose.


Richard

Suricate
06-02-2008, 10:04 AM
I must say that for all 3D apps that I have developed plugins for (C4D, Lightwave, messiah) I generally prefer using the C/C++ SDK over using script languages. It's true that setting up the compliler for the different versions is a major annoyance. But script languages usually have two problems (apart from the speed):

1. Script languages usally have their own syntax and conventions which need some time to get used to. It's easier to use standard C/C++ where you can expect that things work in a certain way.

2. The major problem is that script languages usually lag behind a few versions (COFFEE is still at v9.5), so the new stuff (and also some crucial old functionality) is not implemented.
It has happened many times to me that I thought: 'Well, this can be done with a script', only to find out later that there is a stumbling block somewhere. In the end I would go back to the SDK.

JamesMK
06-02-2008, 10:29 AM
Well, the Java versus C++ performance discussion is certainly an old one, but still going strong, and I doubt this is neither the time nor place to perpetuate it, since it could go on for very long until the original scope of this thread is entirely lost :D

So, I'll just leave it at that as far as I'm concerned.

Per-Anders
06-02-2008, 09:16 PM
Just to point out that platform issues are in fact far less of an issue with C4D's C++ API which is a cross platform API, Java wouldn't be more cross platform in this case unless you want to use external libraries (but then again many C++ libraries are available for multiple platforms these days or in uncompiled OSS form which makes that somewhat less of an issue unless they're making explicit OS calls).

If you code using the API calls then you can compile on all platforms that Cinema supports using the same code without needing to make changes (though GCC is a more verbose compiler so will give you warnings on things that the MS compiler will not, it's good to compile cross platform to help you clean up your code further even if you only target one platform in the end). The only real issue is that for each platform you must set up the project structure, i.e. you include your .h and .cpp files so that there's something to actually compile which takes no time at all, you have to do it seperately simply because XCode doesn't load VC++ project files and VC++ doesn't load XCode project files (the project settings themselves are already set up in the C++ SDK Project which you should normally be able to open directly with a double click from the plugins folder on either platform, though 64bit requires a small easily made change to configuration that's covered by the SDK docs).

The currently supported commercial platforms are Windows 32, Windows 64 and OSX UB (Linux is only for studios via the production bundle), though plugin developers can still choose to support pre universal binary if they have an older version of C4D sitting around and want to cater to customers still using that version of C4D, typically though for a brand new plugin only 3 versions are required (there is no 64bit version for the Mac as yet) unless you wish to add legacy support for older versions of C4D, the only real code changes would be required when working with legacy versions or occasionally when newer versions come out (though usually older plugins continue to work without needing recompiles).

CGTalk Moderation
06-02-2008, 09:16 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.