moving vertices based on texture map

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2008   #1
moving vertices based on texture map

I'm trying to figure out a way to "displace" vertices in a polygonal plane using an animated texture map. I don't want to use a shader and a displacement because I need to see geometry actually get moved in the interface. The code below sor tof works although it spits out alot of errors about some objects not being movable in 3d space which is annoying.

I thought I might beable to do this with artisan in some way but the artPuttyCtx command is only for NURBS.. but I might beable to use it if I could figure out how to use it to just load an image and displace it and then convert it to polygons.


 select -r pPlane1; 
$x = `polyEvaluate -uv`;

int $N = 0;

while($N <= $x[0]){ 

select -r pPlane1.vtx[$N];

PolySelectConvert 4;

float $uvPos[] = `polyEditUV -q`;

$color = ` colorAtPoint -o RGBA -u ($uvPos[0]) -v ($uvPos[1]) ramp1`;

select pPlane1.vtx[$N];

move -a -y $color[0]`;

$N++;

}
__________________
blah blah blah
 
Old 01 January 2008   #2
ok this works better without all the annoying warning messages.

 select -r pPlane1; 
$x = `polyEvaluate -uv`;
 int $N = 0;
 while($N <= $x[0]){ 
 select -r pPlane1.vtx[$N];
 PolySelectConvert 4;
 float $uvPos[] = `polyEditUV -q`;
 $color = ` colorAtPoint -o RGBA -u ($uvPos[0]) -v ($uvPos[1]) ramp1`;
 select pPlane1.vtx[$N];
 polyMoveVertex -ty $color[0] pPlane1.vtx[$N];
 
$N++;
 
}
 
__________________
blah blah blah
 
Old 01 January 2008   #3
hmm looks like this command does exactly what I need.. oh well..

textureDisplacePlane

EDIT.. hmm not exatly what I need..
__________________
blah blah blah

Last edited by gmask : 01 January 2008 at 02:31 AM.
 
Old 01 January 2008   #4
EDIT.. hmm not exatly what I need..

How close is it to what you need? I haven't tested it at all, but textureDisplacePlane is a MEL script and not a MEL command...i.e. you could use it as a start for something slightly different.
 
Old 01 January 2008   #5
I was also thinking of this same problem. however, our solution dont seem to work for animation. and using mel commands seem to be rather slow. I guess a custom node is needed to make it faster and animatable?
__________________
"I saw the angel in the stone and carved to set it free." - Michaelangelo

jsneo.com - My humble portfolio site
 
Old 01 January 2008   #6
Yea a custom node would be great.. I'm caching the geometry with the script turned on so that playback is not dead slow.
__________________
blah blah blah
 
Old 01 January 2008   #7
I'm also very interested by this, can't you use a cluster modifier and drive the weight map with a texture channel ?
__________________
maya@reddit r/maya
 
Old 01 January 2008   #8
Originally Posted by mlkdesign: I'm also very interested by this, can't you use a cluster modifier and drive the weight map with a texture channel ?


I dunno... never tried that..
__________________
blah blah blah
 
Old 01 January 2008   #9
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:22 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.