General Category > ASL Scripts
Script: Copy "Source" mesh to "Target" mesh
NickE:
I don't understand your request. The script currently assigns the materials and UV coordinates of the source to all the copies. Are you talking about assigning materials of the source to the target mesh? Or are you talking about the materials of the target mesh being assigned to the copies of the source? Either of these can be done.
If you could explain further, I will see what I can figure out.
hihosilver:
I'm talking about using the target's material and applying it to the copies of the source. So, for example, one face on the target mesh has a green material, so all instances of the source on that face would have the green material. Then whatever was on the red face would have the red material. That's the idea. So I could do things like create great fur for the tennisball I created simply and not have to worry about it all becoming green, or splitting objects, running the script, applying materials, then running again, etc.
Would this be possible?
NickE:
The transferring of the target's material at the point of the copy to the copy of the mesh is possible and I will work at putting out an updated script for that. Keep in mind, though, that textures and UV coordinates will likely not transfer to the mesh copies predictably.
NickE:
It turns out that adding hihosilver's request to the script was more straightforward that I originally thought. Attached below is an updated version of the script. For comprehensive instructions on how to use the script see post above:
http://www.anim8or.com/smf/index.php?topic=906.msg6668#msg6668
plus:
12) Set the copies to use the original source mesh's materials and UV coordinates, or set the copies to use the target's materials. If you choose to use the target's materials then the copy will take on the color of the target at the attachment point. This is also true if the target's material at the attachment point is a texture. It calculates the UV coordinate at the attachment point and assignes that UV coordinate to the whole copy.[usesourcemat].
Below are some examples of this new feature in action. The first picture is simply a plane mesh with a cheetah skin texture on it. The second picture shows the cylinder copied onto the cheetah textured plane. It picks us the color from the texture and copies it to each individual copy of the source. The third picture show how it will pick up simple color material and copy it to the individual copies of the source.
As always, your feedback is welcomed!
headwax:
Hya Nick
I had a play with your script yesterday (not the new version) and it is fantastic!
The possibilities are endless. (Well almost endless)
Thanks again
headwax
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version