Notifications
Clear all

[Closed] C++ developer needed quickly for small controller / plugin

Hi everyone,

I’m in a need of a C++ plugin developer within the next few days for a project I’m working on next week. I know development on a compiled plugin is significantly longer than a scripted plugin, but depending on the estimate I’m hoping my client will budget for this.

Essentially, I need a recompile / extension of the path controller to take a real world distance input, as opposed to a percentage input. I’ve done some scripted-controller tests and it works well, but I need the stability / ease of use of a compiled plugin.

I don’t need multiple weighted splines supported, just the first one in the list if that makes it any easier.

Any takers, please reply to the thread!

Many thanks,
Dave

14 Replies

I know you’ve asked for a plugin but do you really need one?

I have a script that should do what you need via a floating dialog. A video demo can be downloaded from here: Download Link (only 5.5 meg)
The video demo is in swf format. I strongly recommend using Swiff player to watch it as it works best. Swiff player is free and can be downloaded from here: Link

Hi Joel,

The key thing here is not the units of measurement; it’s the distance along the spline as units not a percentage.

By having everything relative to 0 – 100 % ratio (as it is now), changing a spline’s length results in an object’s derived position changing. Not good when making adjustments to a spline on which there is an object that has already been animated!

If, however, the object’s position along the path is calculated with regards to units along a path, the animator (me, in this case!) is free to adjust the spline’s points after the object’s current position along the spline and NOT have the object move.

Does that make what I want clear?

As I said, I already have a max scene with some wired CAs etc that proves this point – I just want it wrapped in a plugin to make animating easier.

Cheers,
Dave

ah I see. Your idea would be quite useful. Unfortunatly i’m not a C++ dude at this stage though. Best of luck finding someone to help you out

Hi Dave

I”m looking at the code right now. Luckily for you the code is in the public SDK, so anyone can modify it use it. i.e.

…\maxsdk\samples\controllers\path_cnstrnt.cpp

Anyhow, it looks like the underlying SDK already exposes some methods that I’ll need, i.e. getting the Spline Length, interpolated poistions etc… So perhaps what is needed is a radio button that switches from percentage to absolute position along spline. And when switched to absolute position along spline, I think the weighting calculations should be left out.

I’ll have to work on it tonight, since I have to go to work right now. PM me if you want to chat on IM during the day.

Chris Johnson.

Hey Chris,
Nice to hear from ya!

      I was doing some ideas-crunching before and supposed that the toggle thing may not work, as in the track view, the vertical scale would need to to go up as high as there were units in the spline.

Essentially (with regards to percentage) the fcurve is scaled inversely in the vertical axis as the spline is lengthened. Suppose you start with a 100 unit spline and an animation from end to end:

[ul]
[li]Spline length = 100[/li][li]fcurve values = 0 – 100[/li][/ul]Then if you changed the spline length to 200 units:
[ul]
[li]Spline length = 200[/li][li]fcurve values = 0 – 50[/li][/ul]Does that make sense?

 I don't know if you would/could dynamically scale the values with the radio toggle, or if you'd need a separate track (I suspect you would).
    
      Anyway, I really appreciate you taking a look at it, and I can't wait to see what you come up with!
      
      Cheers,
      Dave
 eek

With curve math, your basically asking for a value along the curve to stay at that value even if it changes. This is remarkably easy to do, you take the value you want and divide it by curvelength() of the curve. So:

10/100 = 0.1
10/200 = 0.05

Then take this value and multiply it by 100 – The 10 value could be animated.

Yeah, as I said the maths is pretty straightforward. It’s just the SDK dependancies I’m hoping won’t throw a spanner in the works.

Nice site BTW

Ok, here is the progress so far. I got back pretty late last night, so I had to work on it this morning. I have hooked up the UI, and plugged the options into the parameter block. I have attached an image showing the results. I’ll have to work on it tonight when I get home again, I just have really limited time, but I’ll see if I can’t finish it up tonight again.

Chris J.

Very exciting results Chris!

How does it look in the track view? I’m looking forward to actually editing that fcurve in real units!

One thing I would say is how does it work with a freehand spline when you edit one of the points? Does the object’s position update on the fly, or do you need to scrub the timeslider or such like?

Looking great so far though! Your efforts will be very much appreciated,

Cheers,
Dave

Page 1 / 2