|
|||||||
![]() |
|
|
Thread Tools |
|
||||
![]() Hello fellow Blenderheads! As per the discussions in this thread, I have decided to try my hand at writing a normalization script for managing bone groups. This is my first Blender script, but I am satisfied with the functionality I have been able to achieve with it! The script provides the following capabilities: Normalizes the entire mesh (per vertex) by distributing all weights evenly, or preserving 100% groups based on 3 rules:It is a little confusing to explain in writing, which is why I made a video screencast to demonstrate the basic use of the script. I've also attached a demo file (updated to 1.1) in the rigging thread with a dummy rig to test on (since I just noticed attachments are disabled here!). The latest version of the script will continue to be posted on my 'google pages' page, which is also linked from my blog.1.)If there are no 100% groups, all weights are evenly distributed.It also provides a "mode" which allows you to update the selected/active group and normalize its weights by either preserving the weights entirely, or distributing them evenly. Non-bone groups are left untouched. Again, this is an alpha release, so it likely has bugs to find! Please report any bugs or suggestions to this thread. Thank-you ![]() -Gord Version 1.1 - 2.49 released July 17 2009 -removes weights with 0% influence (instead of assigning with 0 values, keeps weights clean) -normalizeOverlapping() more or less fixed but still not quite right so normalization() left as default
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. Last edited by feelgoodcomics; 18-Jul-09 at 17:00. |
||||
|
#1
|
||||
|
|
|
||||
|
Nice work, I can see myself using this script.
You video tutorial was a bit messy but I think I got it.
............................................
------------ Take a look at HOLMEN FACE RIG it's in this thread. |
||||
|
#2
|
|
||||
|
Quote:
I hope you find the script useful! I look forward to any thoughts you have after using it
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. |
||||
|
#3
|
|
||||
|
Sure I keep you posted on how it works.
BTW, I tipped blender nation about this script just now so you might get allot of feedback.
............................................
------------ Take a look at HOLMEN FACE RIG it's in this thread. |
||||
|
#4
|
|
||||
|
Quote:
Well hopefully someone more knowledgeable with scripting will be able to help fix bugs if there are a lot of them! lol... ![]() Edit: But I shall do my best to fix them myself!
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. Last edited by feelgoodcomics; 09-Jul-09 at 23:59. |
||||
|
#5
|
|
||||
|
I just wanted to tell you that this script is a life saver!
![]() I rig armor for a game, and it requires that each bone has weight of no more than 1. Which would mean, if I didn't have this script, that I would have to edit and triple check every single vertice against all the bones in the vicinity to make sure all the weights added up to exactly one. Rock on man!
............................................
English does not borrow from other languages, English follows other languages down dark alleys, knocks them over, and goes through their pockets for loose grammar. |
||||
|
#6
|
|
||||
|
Awesome Llew!
![]() Thanks for letting me know! I was wondering if anyone was putting it to good use... Cheers!
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. |
||||
|
#7
|
|
||||
|
Oh yeah.
![]() In conjunction with an auto-rigging tool which does the initial rigging, your script allowed me to rig another armor in about 15 minutes because I didn't have to check the weights individually. Invaluable.
............................................
English does not borrow from other languages, English follows other languages down dark alleys, knocks them over, and goes through their pockets for loose grammar. |
||||
|
#8
|
|
||||
|
Isn't there allready a script like this coming with blender called "Normalize/Scale Weight" which you can find under the paint menu in weight paint mode? I have been using that one all the time.
|
||||
|
#9
|
|
||||
|
Quote:
However I have been unable to determine the rules of it. I certainly don't get the same behaviour from it as I do with this script. It can also be a drag to select Paint->Normalize/Scale weight, and re-configure your settings every time you want to use it, instead of just reaching over and clicking a big button with your settings intact. If you use it, can you explain how it is you get the same behaviours with it? What are the settings you use?
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. Last edited by feelgoodcomics; 12-Jul-09 at 14:40. |
||||
|
#10
|
|
||||
|
Tried the script - really nice. This will make things more predictable. Nice, easy to grasp interface.
Something like this should be hard-coded, its seems like such a basic feature.
............................................
www.watchmike.ca "A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort." ---Herm Albright |
||||
|
#11
|
|
||||
|
Thanks mikahl
![]() I appreciate the feedback! I'm glad to hear you find it useful! In my first attempts, I was trying to get the script to be interactive, so that you could turn the mode on and just paint normalized continuously. However I quickly realized it just wasn't feasible for a high-level script, and went for the manual update style instead. The nice thing about that though, I think, is that you aren't forced to have the mode either on or off, you can have both behaviours at the same time. And I agree, if it wasn't basic I don't think I would have been able to write it lol. Having the script be adapted into the program would be cool, if enough users decide they want it. However, I think the nice thing about having the tool as a separate script is that it doesn't have to even appear in the menu to confuse those who don't need to use it... though I guess it also makes it hard to find for those who do!
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. |
||||
|
#12
|
|
||||
|
Quote:
Hopefully this kind of behavior can be achieved in 2.5.
............................................
www.watchmike.ca "A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort." ---Herm Albright |
||||
|
#13
|
|
||||
|
Well understand that if it was updating in realtime, the weights would be jumping around all over the place on you. So you probably wouldn't like it
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. |
||||
|
#14
|
|
||||
|
Might want to move the script away from google pages. Google said they are closing down the service.
............................................
the evil moose
|
||||
|
#15
|
|
||||
|
Quote:
But they also say: Quote:
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. |
||||
|
#16
|
|
||||
|
there have been calls for such a weight normalizing script as this for some time, and now you've come along and saved MANY people a ton of hours of needless tweaking, thank you :-)
|
||||
|
#17
|
|
||||
|
Quote:
So you're most welcome!
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. |
||||
|
#18
|
|
||||
|
Well I'm pleased to see that no one has encountered any bugs so far!
However, I have been aware of a problem with the script that occurs when subtracting weights so I thought I should fix it up before it causes anyone any grief. It actually turned out to be a simple fix with just 2 lines of code in the assignWeights() function.The problem was that the script was assigning all weights to 0... so once a vert was a member of a group, it remained that way. Say you had an influence of 1, and you painted it down to 0.5 and updated it. All the other groups (even with 0 values) would be scaled up. Which can lead to very unpredictable behaviour during long sessions. So now the 0 weights are removed entirely. The script is intended to be used with 'add' in the paint tool anways, but I just wanted to make sure that subtracting didn't cause problems. I think this also fixed the 'double transform' problem I was getting with the normalizeOverlapping() function I mentioned in the video. So that works now too, though it doesn't produce the exact result I was hoping it would. I think the function currently in use is better, so I left it as the default. But in case you want to try the other function you can comment out line 464 and use line 465. The problem is just that it doesn't allow you to paint on the overlapping area, but it will keep the active weight locked. I'll keep thinking about how to do it with the lock, and being able to paint on the opposite side, but I don't think it's urgent. The new version (1.1) is available on my google page. That's all for now.
............................................
Feel-Good Comics Blog The Rigging Repository->Tutorials, Characters, Examples, Scripts, etc... Sharing good ideas is the intelligent way to make brilliant ideas. Last edited by feelgoodcomics; 18-Jul-09 at 04:21. |
||||
|
#19
|
|
|||
|
I tried, but i couldm't get the way to make it function
|
|||
|
#20
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|