General GATech Questions
From Moviesandbox
(14 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
+ | allaacellet | ||
We are trying to create two Gatech puppets with the same input device, but when we are trying to assign a value for controler as 1 for both the puppets, it recognises input from only one of them, | We are trying to create two Gatech puppets with the same input device, but when we are trying to assign a value for controler as 1 for both the puppets, it recognises input from only one of them, | ||
Is it feasible to have two puppets running simultaneously from the same input device? | Is it feasible to have two puppets running simultaneously from the same input device? | ||
Line 9: | Line 10: | ||
" supeclass MSBPawn of class GATechCactus not found" | " supeclass MSBPawn of class GATechCactus not found" | ||
its somehow not able to detect MSBPawn class and hence does not create a .U file, we are not able to understand the reason. | its somehow not able to detect MSBPawn class and hence does not create a .U file, we are not able to understand the reason. | ||
+ | |||
+ | The reason is that Moviesandbox uses the -mod structure of Unreal Tournament and thus the compiler needs to know about this. It is quite simple to set this up in UDE and i would generally suggest using UDE for Code changes and not ucc. | ||
+ | [http://udn.epicgames.com/Two/ImprovedModSupport.html| See here for information on how the mod structure works]. | ||
+ | And in order to compile (quick solution), do this: | ||
+ | |||
+ | / running the UnrealScript compiler | ||
+ | ucc.exe make -mod=Moviesandbox | ||
+ | |||
+ | Hope this helps. --[[User:PersonTwoOneEightFour|fiezi]] 10:54, 25 October 2007 (MEST) | ||
+ | |||
+ | Well we figured that one out. The stuff is compiled and runnig the only problem is that the control input class is accepting input only from one arm. We added the respective AnimBlenparams and bonerotation functions which are compiling but they dont reflect when we spawn the puppet. | ||
+ | |||
+ | So you're sending data packets to the udp class and you can read the data input? Can you log what you're receiving? The UDP input class is not limited to the number of data it can receive. So theoretically you can send all your data to the same port. Is that possible with your side of the implementation? | ||
+ | |||
+ | Hi, Yeah Actually we are sending all the data to the same port, but we are having difficulty in identifying the bones in unreal script. like when we try to use more than one bones then it seems like only one of them actually works | ||
+ | |||
+ | The Unreal bones are a bit nasty. What name convention are you using for the bones? Do you have special characters in them? Like spaces or points or something? What function are you using to modify the bones? --[[User:PersonTwoOneEightFour|fiezi]] 23:58, 25 October 2007 (MEST) | ||
+ | |||
+ | Hi, Actually we did not name it in any conventional way, just had JOINT1, JOINT2 and so on... and there arent any special characters. And we used the following fucntions for reading bones | ||
+ | |||
+ | ----------------------------------------------------- | ||
+ | "myPawn.SetBoneRotation(PuppetHead, headRot,, 1.0);" | ||
+ | "binary=udpLink.byteData[0];" | ||
+ | |||
+ | "torsoPitch = udpLink.byteData[3+binary+0]; | ||
+ | torsoPitch = (torsoPitch-128)/128; | ||
+ | torsoYaw = udpLink.byteData[3+binary+1]; | ||
+ | torsoYaw = (torsoYaw-128)/128;" | ||
+ | |||
+ | "torsoRot.Pitch = torsoPitch*12600; | ||
+ | torsoRot.Yaw = torsoYaw*12600;" | ||
+ | |||
+ | for default properties and assigning bones... | ||
+ | "PuppetHead=joint15 | ||
+ | PuppetTorso=joint6" | ||
+ | ----------------------------------------------------- | ||
+ | |||
+ | We just tried to reuse the code which has already been built for gatech cactus here. | ||
+ | |||
+ | Is there anyway that we can log the data and see the parameters that are getting into udpLink.byteData[3+binary+0], so that we can map exactly whats happening with the bones? also if there is any better way to implement rather that using "set bone rotation" would also be helpful | ||
+ | |||
+ | Awaiting for your reply.. | ||
+ | |||
+ | ----------- | ||
+ | |||
+ | Hey there, Unreal bone rotation, as i already mentioned i think, is a beast, especially if you want to rotate around two axis. You are using the right function with SetBoneRotation, but in your code above, you should be careful with things like /128 because Unreal does weird things with '''int''' values. For example: (200-128)/128 equals 72/128 equals 0, as unreal does not do any form of conversion if the end variable is an integer (and Rotations are integer values)! With the code above, the only values you can get for torsoYaw is 0! | ||
+ | |||
+ | To fix this, try doing the following: torsoYaw = float((torsoYaw-128)* 12600/128); | ||
+ | |||
+ | As for the rotation, the bone rotation does not work in the traditional way, but always rotates around the bone axes, which makes it pretty hard to determine what values you need to put into the rotator for the bonerotation. | ||
+ | Also, be aware that each bone has its own coordinate system! You can also try going with locations and use SetBoneLocation, but i don't know how that will treat your vertex weighting... | ||
+ | |||
+ | ----------------------------------------------------- | ||
+ | We wanted to add another 'Spawn Gatech Puppet button' along with the existing one. We added an entry into the MSBButtonconfig. We also created another set of 'GatechCactus.uc' and 'GatechCreateCactus.uc' but it still won't add. Any thing we are doing wrong or missing? | ||
+ | |||
+ | ----------------------------------------------------- | ||
+ | |||
+ | '''Discussion on Animation in moviesandbox :''' | ||
+ | |||
+ | Hi Friefrich, | ||
+ | |||
+ | This is again regarding adding animation to TUI 3D, Character. Actually I | ||
+ | want to accomplish the following, | ||
+ | |||
+ | When ever I say press a button, or move particular sensor (say | ||
+ | accelerometer) I want my character to animate, like blinking eyes. I can | ||
+ | now able to read data from sensor and assign it to bones but could not animate | ||
+ | it. | ||
+ | |||
+ | --------------------------------- | ||
+ | |||
+ | you could send the bone position or rotation with the function | ||
+ | SetBoneRotation and SetBoneLocation respectively. | ||
+ | Where exactly is the problem occuring? do you not see the bone moving? | ||
+ | Blinking eyes are a different thing to do that would require you to set | ||
+ | different textures on an object. | ||
+ | Can you be a bit more specific and post some code on the wiki so we can | ||
+ | discuss? | ||
+ | |||
+ | --------------------------------- | ||
+ | |||
+ | Hi Friedrich, | ||
+ | |||
+ | Here's the problem that I am facing, | ||
+ | I wanted to add a default animation to the virtual character on the scene, | ||
+ | for example say swaying the head. This should go on and on while I place my | ||
+ | character in the moviesandbox scene. | ||
+ | |||
+ | Other bone rotations which acts according to puppet movement are working | ||
+ | well. | ||
+ | |||
+ | For the animation part (For which I don't see any animation playing in the | ||
+ | moviesandbox), what I have done is... | ||
+ | |||
+ | Added an Mesh which has animation set using command, | ||
+ | |||
+ | Mesh=SkeletalMesh'2K8NewChar.ElvisEggRigged' // In a different file | ||
+ | |||
+ | //And for animation : | ||
+ | class GATechEggInputControl extends Actor; | ||
+ | var(InitialAnimation) name AnimName; | ||
+ | var(InitialAnimation) float AnimRate; | ||
+ | var bool TogglePlay; | ||
+ | |||
+ | event PostBeginPlay() | ||
+ | { | ||
+ | LoopAnim( AnimName, AnimRate ); | ||
+ | super.PostBeginPlay(); | ||
+ | --- | ||
+ | --- | ||
+ | } | ||
+ | -- | ||
+ | - | ||
+ | -- | ||
+ | -- | ||
+ | // input controls code | ||
+ | |||
+ | DefaultProperties | ||
+ | { | ||
+ | AnimName='SpecsUp' // Name of the animation set | ||
+ | AnimRate=0.15 | ||
+ | TogglePlay=True | ||
+ | -- | ||
+ | -- | ||
+ | -- | ||
+ | -- | ||
+ | } | ||
+ | |||
+ | I also wanted to know more about how I can manage my own animation (either | ||
+ | bone or mesh), like say I press a button on my Xbox controller and I want a | ||
+ | particular type of animation to play. | ||
+ | |||
+ | ------------------------ | ||
+ | |||
+ | sorry, i was busy on a project and didn't have time to reply sooner. | ||
+ | Playing an animation is a difficult thing with moviesandbox, as it basically uses the skeleton and animations of a different character with the mesh that you provide. | ||
+ | In order to bind your skeleton to moviesandbox, you can do two things: | ||
+ | Either you import and overwrite the default idle animation in the moviesandbox character (you can find the .usk in the Moviesandbox/Animation folder) or you bind your skeleton using the following command: | ||
+ | |||
+ | LinkMesh(yourMeshHere,true); | ||
+ | |||
+ | You have to call this so that unreal links with the correct mesh file after i threw that away through moviesandbox. | ||
+ | |||
+ | If you want to trigger an animation through an event in your inputcontrol, just call the LoopAnim() function depending on the data you read from the udpLink. You can do that directly in your inputcontrol. | ||
+ | |||
+ | Again, sorry for the late answer and i hope this helps. Also, it might be interesting for you to know that i discontinued working on the UT part of moviesandbox and i am now focussing on a standalone version. | ||
+ | Let me know if you have more questions. | ||
+ | All the best, | ||
+ | |||
+ | ------------------------- | ||
+ | |||
+ | Thank you very much for your mail. I am forwarding your mail to Ali Mazalek and Micheal Nitche, to keep them informed about the progress with regards to standalone Moviesandbox application. | ||
+ | |||
+ | With regards to the question, I did the same thing for the animation, first linked up my mesh and animation through unreal editor. And used simple loopanim() in my inputcontrol function. I am herewith attaching my mod, so that you have more information, | ||
+ | |||
+ | I will also upload this discussion onto Moviesandbox wiki as you have proposed earlier. | ||
+ | |||
+ | ------------------------ | ||
+ | |||
+ | Yeah, forgot to mention that, | ||
+ | |||
+ | When I place my animation onto a default map(after linking) and try to play it there, I am able to see the animation, | ||
+ | |||
+ | Just to give you a glimpse of what we want to achieve further, so that you can suggest us if it is possible to do them using Moviesandbox, | ||
+ | |||
+ | 1. Playing default animation over the character, for example blinking of eyes. | ||
+ | 2. We want to trigger some animations over the character as we press a button from the game controller. | ||
+ | 3. Are there any special classes through which I can monitor and change my camera position in moviesandbox/ or should I rely on the ones present in Unreal? | ||
+ | 4. Is it also possible to change the position of the character positioned in moviesandbox, so that say I have a joy stick which can control the position of the character in a moviesandbox room. | ||
+ | |||
+ | -------------------------- |
Current revision
allaacellet We are trying to create two Gatech puppets with the same input device, but when we are trying to assign a value for controler as 1 for both the puppets, it recognises input from only one of them, Is it feasible to have two puppets running simultaneously from the same input device?
It's not supported right now. What you probably want to do is implement that functionality into your processing code, so that you can send the same data to multiple ports. Does that make sense? --fiezi 00:16, 17 October 2007 (MEST)
Thanks, we have another problem, we are trying to compile "gatechpuppet" after making some changes, through "ucc make" but we getting an error saying ---
" supeclass MSBPawn of class GATechCactus not found"
its somehow not able to detect MSBPawn class and hence does not create a .U file, we are not able to understand the reason.
The reason is that Moviesandbox uses the -mod structure of Unreal Tournament and thus the compiler needs to know about this. It is quite simple to set this up in UDE and i would generally suggest using UDE for Code changes and not ucc. See here for information on how the mod structure works. And in order to compile (quick solution), do this:
/ running the UnrealScript compiler ucc.exe make -mod=Moviesandbox
Hope this helps. --fiezi 10:54, 25 October 2007 (MEST)
Well we figured that one out. The stuff is compiled and runnig the only problem is that the control input class is accepting input only from one arm. We added the respective AnimBlenparams and bonerotation functions which are compiling but they dont reflect when we spawn the puppet.
So you're sending data packets to the udp class and you can read the data input? Can you log what you're receiving? The UDP input class is not limited to the number of data it can receive. So theoretically you can send all your data to the same port. Is that possible with your side of the implementation?
Hi, Yeah Actually we are sending all the data to the same port, but we are having difficulty in identifying the bones in unreal script. like when we try to use more than one bones then it seems like only one of them actually works
The Unreal bones are a bit nasty. What name convention are you using for the bones? Do you have special characters in them? Like spaces or points or something? What function are you using to modify the bones? --fiezi 23:58, 25 October 2007 (MEST)
Hi, Actually we did not name it in any conventional way, just had JOINT1, JOINT2 and so on... and there arent any special characters. And we used the following fucntions for reading bones
"myPawn.SetBoneRotation(PuppetHead, headRot,, 1.0);" "binary=udpLink.byteData[0];"
"torsoPitch = udpLink.byteData[3+binary+0]; torsoPitch = (torsoPitch-128)/128; torsoYaw = udpLink.byteData[3+binary+1]; torsoYaw = (torsoYaw-128)/128;"
"torsoRot.Pitch = torsoPitch*12600; torsoRot.Yaw = torsoYaw*12600;"
for default properties and assigning bones... "PuppetHead=joint15 PuppetTorso=joint6"
We just tried to reuse the code which has already been built for gatech cactus here.
Is there anyway that we can log the data and see the parameters that are getting into udpLink.byteData[3+binary+0], so that we can map exactly whats happening with the bones? also if there is any better way to implement rather that using "set bone rotation" would also be helpful
Awaiting for your reply..
Hey there, Unreal bone rotation, as i already mentioned i think, is a beast, especially if you want to rotate around two axis. You are using the right function with SetBoneRotation, but in your code above, you should be careful with things like /128 because Unreal does weird things with int values. For example: (200-128)/128 equals 72/128 equals 0, as unreal does not do any form of conversion if the end variable is an integer (and Rotations are integer values)! With the code above, the only values you can get for torsoYaw is 0!
To fix this, try doing the following: torsoYaw = float((torsoYaw-128)* 12600/128);
As for the rotation, the bone rotation does not work in the traditional way, but always rotates around the bone axes, which makes it pretty hard to determine what values you need to put into the rotator for the bonerotation. Also, be aware that each bone has its own coordinate system! You can also try going with locations and use SetBoneLocation, but i don't know how that will treat your vertex weighting...
We wanted to add another 'Spawn Gatech Puppet button' along with the existing one. We added an entry into the MSBButtonconfig. We also created another set of 'GatechCactus.uc' and 'GatechCreateCactus.uc' but it still won't add. Any thing we are doing wrong or missing?
Discussion on Animation in moviesandbox :
Hi Friefrich,
This is again regarding adding animation to TUI 3D, Character. Actually I want to accomplish the following,
When ever I say press a button, or move particular sensor (say accelerometer) I want my character to animate, like blinking eyes. I can now able to read data from sensor and assign it to bones but could not animate it.
you could send the bone position or rotation with the function SetBoneRotation and SetBoneLocation respectively. Where exactly is the problem occuring? do you not see the bone moving? Blinking eyes are a different thing to do that would require you to set different textures on an object. Can you be a bit more specific and post some code on the wiki so we can discuss?
Hi Friedrich,
Here's the problem that I am facing, I wanted to add a default animation to the virtual character on the scene, for example say swaying the head. This should go on and on while I place my character in the moviesandbox scene.
Other bone rotations which acts according to puppet movement are working well.
For the animation part (For which I don't see any animation playing in the moviesandbox), what I have done is...
Added an Mesh which has animation set using command,
Mesh=SkeletalMesh'2K8NewChar.ElvisEggRigged' // In a different file
//And for animation : class GATechEggInputControl extends Actor; var(InitialAnimation) name AnimName; var(InitialAnimation) float AnimRate; var bool TogglePlay;
event PostBeginPlay() { LoopAnim( AnimName, AnimRate ); super.PostBeginPlay(); --- --- } -- - -- -- // input controls code
DefaultProperties {
AnimName='SpecsUp' // Name of the animation set AnimRate=0.15 TogglePlay=True
-- -- -- -- }
I also wanted to know more about how I can manage my own animation (either bone or mesh), like say I press a button on my Xbox controller and I want a particular type of animation to play.
sorry, i was busy on a project and didn't have time to reply sooner. Playing an animation is a difficult thing with moviesandbox, as it basically uses the skeleton and animations of a different character with the mesh that you provide. In order to bind your skeleton to moviesandbox, you can do two things: Either you import and overwrite the default idle animation in the moviesandbox character (you can find the .usk in the Moviesandbox/Animation folder) or you bind your skeleton using the following command:
LinkMesh(yourMeshHere,true);
You have to call this so that unreal links with the correct mesh file after i threw that away through moviesandbox.
If you want to trigger an animation through an event in your inputcontrol, just call the LoopAnim() function depending on the data you read from the udpLink. You can do that directly in your inputcontrol.
Again, sorry for the late answer and i hope this helps. Also, it might be interesting for you to know that i discontinued working on the UT part of moviesandbox and i am now focussing on a standalone version. Let me know if you have more questions. All the best,
Thank you very much for your mail. I am forwarding your mail to Ali Mazalek and Micheal Nitche, to keep them informed about the progress with regards to standalone Moviesandbox application.
With regards to the question, I did the same thing for the animation, first linked up my mesh and animation through unreal editor. And used simple loopanim() in my inputcontrol function. I am herewith attaching my mod, so that you have more information,
I will also upload this discussion onto Moviesandbox wiki as you have proposed earlier.
Yeah, forgot to mention that,
When I place my animation onto a default map(after linking) and try to play it there, I am able to see the animation,
Just to give you a glimpse of what we want to achieve further, so that you can suggest us if it is possible to do them using Moviesandbox,
1. Playing default animation over the character, for example blinking of eyes. 2. We want to trigger some animations over the character as we press a button from the game controller. 3. Are there any special classes through which I can monitor and change my camera position in moviesandbox/ or should I rely on the ones present in Unreal? 4. Is it also possible to change the position of the character positioned in moviesandbox, so that say I have a joy stick which can control the position of the character in a moviesandbox room.