View Full Version : Dynamical texture creation
01-10-2011, 10:49 AM
I want a white spot to be created on a black texture right at the point where a (Maya) particle hits the object...but I don't know how to get that done.
I used the CollisionU/ CollisionV properties of the Maya particles, this gives me the UV coordinate of the particle impact, but I don't know what to do with this information, now.
How can I say "paint a white spot right at this point" or somethinkg the like. It was nice if anybody had a hint or idea for me?
01-10-2011, 12:10 PM
feed it to python ? http://www.pythonware.com/products/pil/
or imagemagick ? http://www.imagemagick.org/script/index.php
I can't see it being done dynamically (short of using Shipkov's SOuP plugin?) or maybe artisan can be used ? :arteest: I remember a similar thread to this one, but cgtalk won't let me search.
01-10-2011, 12:41 PM
Thanks man! Looks like PIL is the way to go.
01-10-2011, 01:57 PM
A few thoughts...
You could use a fluidTexture2d or fluidTexture3d node. Grab the UV position of the hit, find out it's current world space and set the value of the fluidTexture. This would be the most dynamic in that you could then apply fluid dynamics to the point after it's hit - for example so that it fades away. Resolution might be an issue here.
Use a texture projection. Grab the UV position, then the world space and point a projection that point. Actually there is a bit in this Renderman paper about using magic lights (in particular the "bullet hit" example) which might help you out in your using renderman...
Use occlusion. Set the occlusion distance to a reasonably small value so it only appears when the particle is right next to the object. Bake out the occlusion as an animated sequence, process it in a compositing application or something like PIL so once a particle hits the object and creates an image then it stays for the rest of the sequence. So the frames would add up like so...
newframe1 = newframe1 + frame1 / 1
newframe2 = newframe1 + frame2 / 2
newframe3 = newframe2 + frame3 / 3
I hope that makes sense.
01-12-2011, 07:36 PM
Thak you very much. I am still experimenting with that matter. SOuP's looking as complex as interesting, so I am trying to figure out how things are to be done with that one.
In earlyworm's answers, it says: "Grab the UV position of the hit, find out it's current world space(...)"...er...yes. I am fine with Part I (Getting the UV Pos) but I don't have the slightest idea how I can calculate a worldSpace position out of that information. At least, I couldn't find an appropiate MEL command for doing so.
01-12-2011, 07:36 PM
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-2013, Jelsoft Enterprises Ltd.