Search - User list
Full Version: Metaball and shaders
Root » Technical Discussion » Metaball and shaders
Brownies
i was wondering if you can have two metaballs with different shaders on each.

i tried attaching one shader (ie. blue) to one metaball, and attaching another shader (ie. red) to the other metaball. but when i render it, both of the metaballs are red.

is there a way so that one is red and one is blue?
deecue
You can do it through coloring each of the metaballs through the point sop. After merging, the colors will even mix correctly.

As far as an output goes..you can render at the merge sop and render through the open gl rop (either as shaded or wireframe). If you want to actually render through mantra, you will have to add a shader after the merge. In the diffuse of the shader (i used a vex layered), put Cr,Cg,Cb in the fields. Then render with mantra, and voila, colored metaballs.

As far as having different textured shaders on each of the metaballs, that might be tough. Don't have a solution for that one yet and don't know if there will be one.

Here's an example file, if you're interested..


http://studentpages.scad.edu/~dquiru20/metacolor.hip [studentpages.scad.edu]

Dave
JColdrick
Yah, that would be tough. It's one thing to have a colour attribute that can be associated with a metaball, but the only way a detailed texture could work would be with shader strings via the shader SOP…and how do you “interpolate” between two shader strings?

Cheers.

J.C.
MichaelC
Check this out.

Metaballs with blended shaders



Metaballs with blended textures



Made an attribute for the metaballs and used it as a bias for a layered VOP shader. You can belnd as many as you want, but you have to daisy chain your networks in SOPs and VOPs to do it.

http://s91408461.onlinehome.us/meta.hipnc [s91408461.onlinehome.us]

I'm rendering an animation of the paint version. Will post it later.
JColdrick
Well, yah, if you want to use the method I suggested elsewhere, *sure*…



Cheers,

J.C.
deecue
Well, yah, if you want to use the method I suggested elsewhere, *sure*…

hahahaha..


yeaaaaa.. but now the trick is to have the metaball algorithm decide the blending as opposed to manually blending them by hand. :wink:
MichaelC
http://s91408461.onlinehome.us/junk/painty2.mov [s91408461.onlinehome.us]

Here's a quicktime. It seems to look best in this case if you use lots of larger metaballs with miniscule weights.


What can I say? It was a good idea and it has millions of uses It''s like a whole new world of possibilities for shader creation has been opened to me.

You can really get crazy with this. You can use custom attributes to index shaders, you can blend them based on weight, and you can pass attributes back and forth with attribute transfer, modifiy attributes based on collision…

It's tons of fun to play with!
deecue
here we go.. texture blends based off of the metaball fields. too bad you're limited to three metaballs with this method (just used the rgb channel data as reference for the blending)… still neat none the less.




http://studentpages.scad.edu/~dquiru20/metacolor.hip [studentpages.scad.edu]


Neat blobby stuff Michael. Pretty cool stuff. I'd love to see anything else you adventure in to with this method of texturing. Keep me updated.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB