Newbie - Help with animation plugin
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/11/2003 at 10:55, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform:
Language(s) : C.O.F.F.E.E ;---------
Hello,I would just like to create an animation plugin that would change the brightness of some lightobjects.
I found out how to create a plugin, that just changes the brightness of a certain object with a slider in a dialog. Next step is to create an animation plugin that would, let's say make a light fade on or off...
If anybody could point me some docs or resources, or even with an example, it would be greatly appreciated!
Thank you very much. If anybody needs more specifications on my problem, write it down and I will inform you untill understood...
Thank you again!! -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/11/2003 at 11:43, xxxxxxxx wrote:
Hello,
You'll have to explain this a bit more. You said you've already made a plugin that changes the brightness of a light object, and now you want a plugin that can fade a light on or off. Well isn't that the same thing?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/11/2003 at 11:55, xxxxxxxx wrote:
Yes, but the first is not an animation, it just changes the brightness property of the lightobject.
What I need, is an animation of a light fading, yes I have a good basis as you probably noticed, but I have no clue how to create keyframes, etc... in an animation.
In other terms, I have a plugin that pops-up a dialog and changes the light brightness of the selected object.
What I want is a plugin that, when used, will create a fade-in or out of a light in an animation, on a certain length of frames. (I have no idea how an animation plugin works).
If anybody needs more clarifications, I will give them because I really need this information.
Thank you very much for your reply! -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/11/2003 at 14:37, xxxxxxxx wrote:
Oh, I see.
How about a simple COFFEE expression:
main(doc,op) { var t = doc->GetTime();; var sec = t->GetSecond(); var bc=op->GetContainer(); bc->SetData(LIGHT_MAIN_HELL,0.5+cos(t)*0.5); op->SetContainer(bc); op->Message(MSG_UPDATE); }
I haven't tested this, but if you put it in a COFFEE tag attached to a light object, it should make it fade on and off every few seconds.
Does that help?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 03:12, xxxxxxxx wrote:
Oops, that should have been "0.5+cos( sec )*0.5"
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 07:10, xxxxxxxx wrote:
M. Ronan,
Thank you for the response. What you have described to me is great, except that the code you gave me is already of knowledge to me.
But, thank god you continued, because you do talk about my problem:
When you say " you put it in a COFFEE tag attached to a light object".
How do I put in a COFFEE tag attached to a light object?
Is this an animation plugin?In the sdk docs they describe different types of plugins:
Expression tags
[URL-REMOVED]Menu plugins
[URL-REMOVED]Filter plugins
[URL-REMOVED]Plugin tags
[URL-REMOVED]Expression plugin tags
[URL-REMOVED]Animation plugins
[URL-REMOVED]Shaders
[URL-REMOVED]
I have only done a menu plugin. I was wondering where I can find examples of animation plugins and others.
Thank you.
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 08:48, xxxxxxxx wrote:
Quote: _How do I put in a COFFEE tag attached to a light object?
>
> * * *
_
Oh, that's easy. Add a light object to your scene, select it in the object manager, and then choose "New Expression"- >"C.O.F.F.E.E. Expression" from the Object manager's menu.
You'll see a small window open with something like this inside it:
main(doc,op) { }
Just fill in the rest of the code, and that's it.
Easy.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 08:52, xxxxxxxx wrote:
Thank you!!
Exactly what I wanted to know.
I have another question I would like to ask, is it possible to take the frequency of a sound at the current frame in an animation?
The reason why, is that I would like to have a console-like list of lights that would react as such a console would according to frequency.
Thank you -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 09:11, xxxxxxxx wrote:
I daresay it is possible, but unless you're familiar with Fourier transforms and have advanced programming experience I wouldn't recommend going ahead with this idea. You would be better off starting with some simpler scripts and working your way up gradually.
If this is just a one-off project, don't bother trying to use COFFEE. Instead, just switch the lights on and off yourself with a parameter track. Read the "Timeline" chapter of the manual.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 11:06, xxxxxxxx wrote:
Thank you for the quick reply.
As for programming, I have many years of experience with C, Java etc... but not COFFEE. COFFEE resembles both these languages in many ways. Want I don't have experience with is C4D's structure, I am a programmer so, all this 3d world is new to me...
I have done some small scripts just to make sure, such as a rewrite of the RotateIt! example with scaling and positionning added to it.
Anyways, this isn't a one off project that is why I would like to develop a plug-in, we are doing a series of animations that need some LED lights that react to the music...
In all, I think I can flicker the lights with no problem, it's just getting the sound... I've read the SDK and found info on BaseSound, SoundTrack, etc... but nothing tells me how to access this for a perticular sound. Is this an object?? Or not?
Anyways, I would greatly appreciate some aide with sounds... I know how to create one and then access it, but to access one that is already implemented is my cul-de-sac
Thank you! -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 12:07, xxxxxxxx wrote:
Then make life easy for yourself -- write a stand-alone application to convert an audio file into a list of instructions for operating the lights and import the resulting list into your plugin. The BaseFile documentation should explain everything you need to know.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 12:17, xxxxxxxx wrote:
GOOD IDEA!!
One question though, if I have a group of objects, is it possible to count how many objects are in this group? Because the numbers of LEDs in this project is dynamic.
So if I understand well, I would have let's say a java application that would create a file in which I would have some time codes with the percentage of birghtness?
Than in my C4D, i would create a tag on a group of lights, that would check the file for the percentage, and, depending on the number of lights, calculate which should be on and which shouldn't. But how do I get the count of the LED lights, especially since I will have other lights in the scene, so a for loop with a check on the instanceof would not work...
You are really helping me progress and thank you very much for that! I am a newbie to all of this 3d realm. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2003 at 14:55, xxxxxxxx wrote:
You can use methods like GetDown() and SearchNext() to iterate through an object's children. Read the description of BaseList4D (all Cinema 4D's object classes are derived from this)
Perhaps you could group all the LEDs in a single column under one Null object, and then group all these Null objects under another Null object to define the array of lights. That way it would be fairly easy to locate a particular light.