View Full Version : New Gradient control for max?
12-13-2008, 10:25 AM
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?
12-13-2008, 12:36 PM
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:
12-13-2008, 01:06 PM
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.
12-16-2008, 12:25 PM
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.
12-16-2008, 02:23 PM
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.
12-16-2008, 02:30 PM
Technically you can't create any points on the Gradient Ramp with Maxscript.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.
12-16-2008, 06:07 PM
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.
12-16-2008, 06:16 PM
sorry to butt into the thread, but did you get my email yesterday?
12-19-2008, 10:09 AM
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?
12-19-2008, 10:09 AM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.