Like I said, it's not real important. If It requires reworking the whole script, don't do it. I'm sure there are much better things for one of our awesome scripters to be doing.I cannot promise nothing but when I have enough time, maybe, I'll take a look...
3D rig!!!
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Mmm, having some trouble at the moment.
I did a complex head with hair and eyes, but I'm having problems setting up the 3D bones. After doing a lot of work, I realized that I needed a couple of extra points to anchor sub-object (mX/mY) rotations. I'm guessing that adding these is why I'm getting 'attempt to index local BRy' errors.
I was hoping that I could get away with this so I wouldn't have to redo the whole side view.
Oh well, I figured it wouldn't work.
Aside from that it's coming along well. I did some simple tests and found out that things like lip-sync should work out pretty easy! Once again, these scripts are awesome!
Would there be anyway to maybe find the points or bones that are causing these kinds of errors? Or maybe even make the lua console print a selected bone/point's internal ID? If I could do this then I could compare changes to see if they'll still work. (I'm assuming that these scripts reference the internal ID)
Just some thoughts.
I did a complex head with hair and eyes, but I'm having problems setting up the 3D bones. After doing a lot of work, I realized that I needed a couple of extra points to anchor sub-object (mX/mY) rotations. I'm guessing that adding these is why I'm getting 'attempt to index local BRy' errors.
I was hoping that I could get away with this so I wouldn't have to redo the whole side view.
Aside from that it's coming along well. I did some simple tests and found out that things like lip-sync should work out pretty easy! Once again, these scripts are awesome!
Would there be anyway to maybe find the points or bones that are causing these kinds of errors? Or maybe even make the lua console print a selected bone/point's internal ID? If I could do this then I could compare changes to see if they'll still work. (I'm assuming that these scripts reference the internal ID)
Just some thoughts.
Please paste here what the console says. Then I can discover in which line is the problem happening and place a debug print line theresynthsin75 wrote:Would there be anyway to maybe find the points or bones that are causing these kinds of errors? Or maybe even make the lua console print a selected bone/point's internal ID? If I could do this then I could compare changes to see if they'll still work. (I'm assuming that these scripts reference the internal ID)
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Code: Select all
...AS\scripts\3Dgrid.lua:146: attempt to index local 'BRy' (a nil value) 3Dgrid.lua but which version? I assume you're using version 10?.synthsin75 wrote:That would be awesome. I'm not sure though if seeing the internal info would tell me which points/bones are the problem. But anything is worth a try.Code: Select all
...AS\scripts\3Dgrid.lua:146: attempt to index local 'BRy' (a nil value)
Try this:
http://www.darthfurby.com/genete/Scripting/3Dgrid11.lua
and tell me if it works.
-G
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Sorry, yeah it's version 10.3Dgrid.lua but which version? I assume you're using version 10?.
Just ran version 11 in a tested and working model. Got lua error "...AS\scripts\3Dgrid11.lua:108: 'then' expected near 'print' "
I went ahead and added a 'then' after " if (BRx == nil) " & " if (BRy == nil) " on lines 107 and 111.
Okay, I had to figure out how to reproduce what I was doing wrong to get the original error( ...AS\scripts\3Dgrid.lua:146: attempt to index local 'BRy' (a nil value)) to test this.
What causes this error is having fewer points selected when running the side view script. Totally user error.
Now it gives the error:
Code: Select all
...AS\scripts\3Dgrid11.lua:112: attempt to concatenate local 'tname' (a table value) But I wouldn't worry too much about all this. Like I said, it was user error. Mmm, maybe just a pop-up alert message for that line 146 error that tells the user they have a different amount of points in their front and side views.
Thanks for all of the attention.
The problem is that if I make a lot of user error debuging then the script does useless things all the time and performance goes down that now is too low.
Sorry for forget the "then" thing but I'm so lazy and didn't check out the script. It would be catched once you load it first time at parsing time.
Lately I have a more C++ mind where there isn't any then sentence
If the number of points in the front and side views are not the same you probably should dump all the model and start it over. Unless you add / remove the different points maintaining the same internal numbers...
The best thing to avoid problems is give named groups to the points you need to locally rig BEFORE duplicate the layer. Then once you make the side view it would be very easy select the correct points for the automatic 3Drig.
-G
Sorry for forget the "then" thing but I'm so lazy and didn't check out the script. It would be catched once you load it first time at parsing time.
Lately I have a more C++ mind where there isn't any then sentence
If the number of points in the front and side views are not the same you probably should dump all the model and start it over. Unless you add / remove the different points maintaining the same internal numbers...
The best thing to avoid problems is give named groups to the points you need to locally rig BEFORE duplicate the layer. Then once you make the side view it would be very easy select the correct points for the automatic 3Drig.
-G
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Oh okay, in that case forget the error message idea. Performance is number one.The problem is that if I make a lot of user error debuging then the script does useless things all the time and performance goes down that now is too low.
No problem. I'm just glad I can do that little bit with scripting.Sorry for forget the "then" thing but I'm so lazy and didn't check out the script. It would be catched once you load it first time at parsing time.
Yeah that's what I've started doing. I must have been missing some points when I was selecting for the side view.The best thing to avoid problems is give named groups to the points you need to locally rig BEFORE duplicate the layer. Then once you make the side view it would be very easy select the correct points for the automatic 3Drig.
The lastest trouble is finding the right bones in a complex model. Is there anyway to reduce the size of the generated bones any more than I can already? What is the initial size (10 in the generation pop-up) determined by?
Code: Select all
ptbone.fLength = diag:Mag()/GE_front3Drig3_2.ptscale
rxbone.fLength = diag:Mag()/GE_front3Drig3_2.ptscale
Perhaps if I change the 'recurring' value of ptscale?
I'm trying, but these are probably dumb scripting questions.
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Genete wrote:The best thing to avoid problems is give named groups to the points you need to locally rig BEFORE duplicate the layer. Then once you make the side view it would be very easy select the correct points for the automatic 3Drig.
if you make the groups before duplicate you don't need to create the groups again!!!! they go with the duplicated one. So if you need to 3D rig the Side view just select the same groups!
Use the original Translate Points form LM!.
-G
PS: regarding the other issues I'll reply this evening.
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
The lastest trouble is finding the right bones in a complex model. Is there anyway to reduce the size of the generated bones any more than I can already? What is the initial size (10 in the generation pop-up) determined by?
Lines 282 & 291 seem to be the scale in the 3Drig front 3.2 script. Bone length equals point scale? Is that what it says? How does it determine point scale?Code: Select all
ptbone.fLength = diag:Mag()/GE_front3Drig3_2.ptscale rxbone.fLength = diag:Mag()/GE_front3Drig3_2.ptscale
Perhaps if I change the 'recurring' value of ptscale?
Code: Select all
function GE_front3Drig3_2Dialog:OnValidate()
local b = true
if (not self:Validate(self.ptscale, 5, 30)) then -- those values (5, 30) can be customized
b = false
end
return b
endNotice that the default value is set once you run the scrip after start AS. It is 10 and comes from this line:
Code: Select all
GE_front3Drig3_2.ptscale = 10 -- dividing scale for the pt, Rx and Ry bonesUnderstanding the lines:
Code: Select all
ptbone.fLength = diag:Mag()/GE_front3Drig3_2.ptscaleCode: Select all
rxbone.fLength = diag:Mag()/GE_front3Drig3_2.ptscaleCode: Select all
mesh:SelectedBounds(min,max)
diag = max - min
if (diag:Mag() == 0) then diag.x = 0.5 endCode: Select all
-- ***************************************************
-- Magnitude of the .pt bone in relation to the diagonal
-- of the selected points boundary.
-- a value of ptscale = 10 is sane 1/10 of the diagonal
-- beyond 30 could be insane.
-- ***************************************************
ptscale = 10Good luck
-G
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Thank you sooo much, Genete!!!
I actually think I understood all of your explaination. It's really too bad that our script writers don't have time to do a scripting tutorial. A section by section break down of what the script does is very educational.
I won't ask for a scripting tutorial though. I'm more than happy to get these little hints now and then.
I was very surprised to see that I had guessed right about the bone length being related to the size (spread) of the selected points.
Let me just make sure I've got this. To change the default dividing factor for bone length in both the front and side scripts, all I have to do is change the 'ptscale=' value? And to change the input range for this, I just change the values before the note 'those values (5,30) can be customized'?
Thanks a lot!!
I actually think I understood all of your explaination. It's really too bad that our script writers don't have time to do a scripting tutorial. A section by section break down of what the script does is very educational.
I won't ask for a scripting tutorial though. I'm more than happy to get these little hints now and then.
I was very surprised to see that I had guessed right about the bone length being related to the size (spread) of the selected points.
Let me just make sure I've got this. To change the default dividing factor for bone length in both the front and side scripts, all I have to do is change the 'ptscale=' value? And to change the input range for this, I just change the values before the note 'those values (5,30) can be customized'?
Thanks a lot!!
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Vern, I had another idea about how to maybe impliment a better way to select constraint bones. I don't know if this can be done.
What if you could assign constraint bones much like you assign point binding? This may be impossible, but I imagine having check boxes in the tool options. With one or more of these checked (one for each constraint) the first, or current, bone selected would be the target bone. The next bone selected would be it's constraining bone according to the option check boxes.
Basically this would get around the hugh list of names all together by doing it all with the actual bones. This may have to be a separate tool. I don't know if it could be added to a current tool, or not.
I imagine that this kind of tool would maybe highlight the constraining bone and show the constraints checked of any bone selected. I could imagine that being useful elsewhere.
Let me know if any of that is doable. Hell, if you can point me in the right direction, I'll try some copy/paste with the scripts to see what I can do.

What if you could assign constraint bones much like you assign point binding? This may be impossible, but I imagine having check boxes in the tool options. With one or more of these checked (one for each constraint) the first, or current, bone selected would be the target bone. The next bone selected would be it's constraining bone according to the option check boxes.
Basically this would get around the hugh list of names all together by doing it all with the actual bones. This may have to be a separate tool. I don't know if it could be added to a current tool, or not.
I imagine that this kind of tool would maybe highlight the constraining bone and show the constraints checked of any bone selected. I could imagine that being useful elsewhere.
Let me know if any of that is doable. Hell, if you can point me in the right direction, I'll try some copy/paste with the scripts to see what I can do.
Unfortunately learning moho interface is a "stand-alone trip". Other thing is learning lua. There are lots of lua manuals out there. Just google them.synthsin75 wrote:Thank you sooo much, Genete!!!![]()
![]()
I actually think I understood all of your explaination. It's really too bad that our script writers don't have time to do a scripting tutorial. A section by section break down of what the script does is very educational.
I won't ask for a scripting tutorial though. I'm more than happy to get these little hints now and then.![]()
I was very surprised to see that I had guessed right about the bone length being related to the size (spread) of the selected points.
Yes but for the SIDE rig script is a constant value. For the FRONT one is the initial value once you run the script for the first time in a AS session. After change it in the dialogue it is remembered in the "recurring values" area.[Let me just make sure I've got this. To change the default dividing factor for bone length in both the front and side scripts, all I have to do is change the 'ptscale=' value?
Yes for the FRONT rig script only.And to change the input range for this, I just change the values before the note 'those values (5,30) can be customized'?
You're welcomeThanks a lot!!