[Closed] How can I use a texture as a controller ?
Hi everyone !
This is probably an easy question, but I wasn’t able to find a tutorial on the web ( maybe because I just don’t know where to look) , so I’m asking here:
I would like to use a Texture as a controller in the graph editor, in order to apply a stronger effect where the texture is white, and no effect where it is black.
The Parameter I’d like to control this way is the Max Height of the ” Greeble ” effect ( http://max.klanky.com/plugins.htm ). The plugin simply extrudes faces of the poly it is applied to.
I’m sorry if this has nothing to do with maxscript, I just could’nt come up with any other ideas.
Thanks in advance for the help, and please excuse my english, I’m from France.
I’m pretty sure this would require this feature be implemented in the greeble plugin itself… max isn’t houdini
I’d love it if someone would tell me I’m wrong
You can do this a couple different ways with a volume select modifier.
The simplest is this:
Set up the object with mapping in the way you want the map to affect the greeble mod. You probably want to use a unique mapping channel so it doesn’t conflict with any mapping used for the material.
Add a Vol.Select mod. Set the Stack Selection Level to Face. Set Select By to Texture Map. Select the map you want to use and be sure set the corisponding Mapping Channel from the UV mapping step above.
Now add the Greeble mod. The pure white areas of the map will have the greeble applied.
Another way is to use a similar method but with a Morpher modifier. Morpher needs every morph target to have the same number of verts and the verts must be in the same order. Look in the help for further explanation.
Create a copy of your object. Add a Greeble to both. On one set the Greeble height to the maximum you want. On the other, set the Greeble height to something very small. Almost but not quite zero. This way both will have the same number of verts for the morpher
On the object with the near zero Greeble height, Add mapping above the Greeble mod in the same way as above.
Then add the Volume select as before. You can copy/paste the mod from the first exercise. This time set it to Vertex instead of Face.
Now add the Morpher mod. Set the first Morph channel to the object with the tall Greeble. Dial up the percentage on that morph channel and you have the result.
In the second case, the volume select will work with the greyscale values of the map.
Another cool affect is to use the volume select with geometry selector instead of the bitmap. Then you can set a falloff
You can see my animated version of this on the greeblelicious.com site.
http://www.greeblelicious.com/thumbnails.php?album=toprated&cat=0
You could lso do this with a displacement modifier. In the greeble mod set the min and max values to the lowest possible and then check Select Tops. Then apply a displacement modifier that uses your map.
As far as using a bitmap as a contoller, this can be done with a scripted controller. But no controller is going to give you varying max heigh values in the greeble plugin like you are thinking. That controller only holds a single floating point value at any point in time. It could change over time according to a bitmap but it would just change the max height for the entire surface.
Search the forums for one of my posts. I needed to use a bitmap as a controller for the rotation of hundreds of objects. Bobo came up with the scripted approach and gave some good examples.