Notifications
Clear all

[Closed] New Gradient control for max?

I was thinking of making my own gradient texture map but the problem is the gradients user interface control. I’m not very familiar with windows forms and max UI controls so creating my own from scratch is would probably be too much work. I tried to use the image control but I didn’t manage to catch mouse events so its not really useful either. Ideally I would use the gradient control from Gradient Ramp map but Autodesk doesn’t want anybody touching that.

Ideas how to get around this problem?

  • Jerry
8 Replies

perhaps the GradientEdge developer wouldn’t mind sharing his; http://www.vg2max.spb.ru/GradientEdge.htm

your bitmap troubles make me wonder how the imgtag is implemented in maxscript – that returns click coordinates pretty easily… though unless you want to build a user interface for your plugin with maxscript, that’s probably not an option

as for the gradient ramp… I can only imagine ADSK themselves don’t really want to touch it :argh:

Well since the plugin is comercial I doubt he’ll share the source code but its worth a try, thanks.

Yeah the imgtag does return mouse events. Perhaps there is some parts of it in maxs sdk samples I gotta take a look at it.

Doing scripted UI would be quite troublesome I don’t really feel like doing it that way.

I got reply from Vladislav Gavrilov and he provided me with good examples on how to hook up the custom control into max. Here is how far I’ve gotten so far. The only problem I can think of might be animating it with auto keys on. We’ll see about that when I get there.

Hi,

looks good !!!
I’m just jumping in for a request (!..)
One thing that really is lacking in the current gradient ramp is the very limited Maxscript support. ie: you cannot create more than 4 ot 5 points in the gradient.
So if your plugin could open the world of gradient making with Maxscript, it’d be awesome !
my 2 cents.

Technically you can’t create any points on the Gradient Ramp with Maxscript.[quote=”<Gradient_Ramp>.gradient_ramp”]This subanim contains all flags in the map. Currently, flags are being added dynamically by the UI only and can not be created using MAXScript. Existing flags can be accessed as subanims of the gradient_ramp subanim though.So any kind of flag creation through maxscript will be better than the existing ramp.

-Eric

Yeah I’ll probably look into adding maxscript support, shouldn’t be too hard. However this map is not initially meant to replace current gradient ramp map. Its for random color variation between objects using same material (or map).

Replicating all features of gradient ramp map would be a lot of work and I don’t really feel like taking such a project on my free time.

Hi Jerry,

sorry to butt into the thread, but did you get my email yesterday?

Dave

Okey now I’ve got the gradient control fully working. Blue key has the Checker map in it so you don’t see blue in the render.

Its fully animatable etc. You can edit the keys with maxscript but I haven’t yet implemented adding and deleting them, this should be very easy as I’ve done it before with other plugins.

Still few features like solid interpolation between keys (no blending) and random colors per particle (pflow). After this I’ll do some minor updates on my other maps and release them.

Would people find it useful if I’d convert the gradient into maxscript UI element?