PDA

View Full Version : Maybe Someone be willing to make this camera tool?


Levitateme
12-13-2003, 05:14 PM
I just had to ask if someone out there would be willing to make a tool like what mirai/Wings3d has. you press a key and your camera starts rotating around your framed object. i just always try to mimick this in maya. but it is not helpful unless i could be able to watch my model over and over while the camera is rotating. if anyone could make this that would be extremly helpful. im sure lots of people would like to use such a tool.

galactor
12-15-2003, 02:10 PM
I also wanted to be able to do just that.
That's why i've made that feature a while ago.
You will notice that i've build an interface for it.
This way you can tell the camera to turn Clock- or CounterClockwards. And you can control the speed.

I might re-script this version so it will be able to work without an inteface, and can be directly called with mel. So it would be easier to attach a hotKey.

:: Galactor ::

Levitateme
12-15-2003, 03:24 PM
galactor i sware when i read your reply my jaw dropped...im...unfantasmically happy! wow you...wow im happy. i cant wait to try this out. if you ever need a favor...i dont know what it could be but...wow thanks so much.

Levitateme
12-15-2003, 03:29 PM
Hey galactor, i just tried your script and i was thinking you should leave this UI you ahve for it. i think that makes sense to have it. but my only thing i dont get...maybe i have to change something. the camera is moving about...30 frames? and starts over. is there a way to make it just rotate forever i guess? until im done looking? also when i click go back to maya it puts in me in the Top view is that normal?

and do you think there is a way you could set it up so maybe there could be a + _ sign on your UI? so you can speed up or slow down? sorry if im asking all this. but i think a lot of people would love this script. and i think somethign to make it speed up or down would be great. ugh anyway as is im extremly happy. but i didnt know if you were ever planning on doing more work with this.

galactor
12-15-2003, 05:53 PM
* The amount of time the camera is orbiting, is dependent on the length of the timeline.
* The script automaticly graps the perspective camera. It then duplicates it. And when the button "go back to maya" is pressed, the duplicated camera is deleted. I can look for a way to better control what happens there.
* And yes, the interface could be improved, I agree.

I try to improve the script this week. If you have some more ideas, let me know!

:: Galactor ::

Levitateme
12-15-2003, 06:46 PM
wow thats so neat you figured out how to make this i have used this on almost every scene i have on mypc. just so neat to look at my stuff and figure out what i should change. my friend i sent him this link. he got your script and we both agreed on a few things. but i think i said them already.

1. is there a way to make the time it takes to rotate just go on forever. so we dont have to open out timeline everytime. cause both of us are mostly modelers.

2. maybe somekinda + - so we can speed up or slow down?

thats all i can think of. the only other thing that i have noticed is a little weird is when its rotating i can zoom in fine and pan but if i rotate it rotates in like the opposite direction. and i truly hope you work on this more cause its so great. and i think lots of people would love to have this. i have it as a hotkey already. you really made a great tool i think.

galactor
12-16-2003, 10:17 AM
Hello, here i'm again.

* The interface is now better implemented.
* You can now increase or decrease the orbiting speed.
* And i menaged to have a better control over the rotation of the user. It may still be a bit odd to rotate, but i don't know how to get that right.

:: Galactor ::

galactor
12-16-2003, 10:30 AM
I have some problems with making a call to the procedure "turnTable".
This is because the script pjTurnTable.mel is not sourced correctly on my computer.
Is this the same on your computer Levitateme ??

:: Galactor ::

Levitateme
12-16-2003, 12:02 PM
This is because the script pjTurnTable.mel is not sourced correctly on my computer.

No galactor, i put in the text to call the script from my script folder. i have it set in my hot key editor. it works fine everytime. i am about to download your latest version of it. maybe thats the one your having probelms with? every thing was working fine for me so far. man i cant wait to try it out. are you going to be able to make it so it can rotate forever?

Levitateme
12-16-2003, 12:18 PM
Hey galactor, i tried your newest script. it worked the first time. i had no probelms with it. also the camera does not go nuts anymore when trying to rotate. the only thing i saw was it is reversed? if i wanna rotate up it rotates down. if it had to stay like that that would be fine i have no peoblem with it. i also like how you trimmed down your UI. are you going to try to add anything new to it yet or are you done. cause i was thinking what else could be done to it but...i cant think of anything, i think it works perfect right now. maybe could you have it so there is a button for clockwise? and counter? cause if i want to go the opposite way i have to click the other back keys like 15 times. i just think that would save people trouble is all.

Levitateme
12-16-2003, 04:48 PM
Hey galactor! im looking at these scenes i have and the script is not working on it for somereason, if i look at the time slider it says its working but the camera is not moving...i just tried it on about 5 more scenes and maybe 1 of them the camera would rotate...sorry if im causing you trouble here. also that thing about it not being sourced. when i restarted my pc and opended maya i had to source it. is that what you mean? it says:

// Error: Cannot find procedure "turnTable". //

galactor
12-16-2003, 06:45 PM
Yes, that is the problem i have on my computer. It cannot find the procedure turnTable. I will try to fix it.
And maybe the rotation issue is caused by the action I took to better control the rotation for the user. Maybe it is better to Undo the option to rotate while orbiting. I think that is bugging you.
I'm also busy to reorganize the interface to your needs.

New version Should be online this evening.

:: Galactor ::

galactor
12-16-2003, 09:08 PM
Ok, here is the third version.
Better interface, debugged and hope you like it !!
Sourcing is no problem anymore.

And this version works fine with my scenes. I don't know why it didn't act in the right way on your computer. Maybe it is all fixed in this version.

:: Galactor ::

Levitateme
12-16-2003, 11:13 PM
Hey galactor. i like your new script. although it still wont rotate a bunch of my scenes...do you have any ideas?

galactor
12-17-2003, 11:48 AM
Do you have special panel setup on your scenes?
This scripts will show the orbiting in Pane 4.
And if there is no pane 4, you will not see anything rotating.

I try to find a sollution for it.

:: Galactor ::

Levitateme
12-17-2003, 11:51 AM
hmmm. well when i am in maya its about 95% of the time in one viewport. and thats perspective. and somtimes ill go to the side view or soemthing. i dont know i wish i could figure it out.

galactor
12-17-2003, 03:41 PM
Allright, i think and hope i solved the problem. I now have a clean way to set the right view.
Can you test if it works on your system??

:: Galactor ::

Levitateme
12-17-2003, 04:18 PM
YES galactor i tried the script on like 3 of my scenes that it was not working on. it works on all of them. what did you have to do? and i noticed it says press ESC to stop playback. is there anyway so if you press esc again it will start back up? and when i clicked quit it sent me to the top view i dont know why. but it works on the scenes now.

galactor
12-17-2003, 04:28 PM
1 string $tTpanel = `getPanel -wf`; // this gives me the avtive viewport
2 string $tTcCamera = `modelPanel -q -cam $tTpanel`; // this tells me the camera that is active in that viewport
3 $tTcamera = `duplicate $tTcCamera`; //duplicate the camera that i retrieved with step 2
4 lookThru $tTpanel $tTcamera[0]; //Now i put the duplicated camera in the active viewport.

You just have to call turnTable to get it working again. Else it would be to hard and timetaking for me to script.
I make sure that the right viewport is visible when quiting the tool. That will be easy to do.

:: Galactor ::

galactor
12-17-2003, 05:33 PM
Give it a try !!

If it now puts the right viewport back after QUITING, then this should be the final version (version5).

:: Galactor ::

Levitateme
12-17-2003, 06:31 PM
Yes it works just perfect now...ugh thanks so much galactor. that is the neatest tool. are you going to post on highend 3d or anything?

galactor
12-17-2003, 10:58 PM
Yes, i think i just might do that.
Now it's working i continue my own projects, but if come up with a solution for the rotation. I will update the script.

Have fun with it !!

:: Galactor ::

Levitateme
12-19-2003, 01:04 AM
Hey galactor, i started a new model and have used your script on it several times so far. mainly to check if things are looking right. is there anyway you can make it so it can rotate around components? cause i had a joint on my characters leg that i really needed it to rotate on but i couldnt...like a face or a edge that it could be framed on and rotate?

galactor
12-19-2003, 08:50 AM
Yeah that would not be a problem to script for me.
I will make it work on : vertices, edges and faces.
Any other selection types you wan't ??

:: Galactor ::

Levitateme
12-19-2003, 04:06 PM
OH...well i just assumed it was one thing you had to do...i was just thinking on whatever was framed it could rotate around. but i was thinking joints and stuff...but you just select them i guess those 3 components is all i can think of isnt there? but yah that would be awesome if you could make it do that as well.

galactor
12-19-2003, 08:30 PM
Hi, it is possible now to select the following items:
|
|--All Transform Nodes (camera, light, etc)
|
|-- polygon
| |-- vertices
| |-- edges
| |-- faces
|
|-- subdivision
| |-- vertices
| |-- edges
| |-- faces
|
|-- nurbs
| |-- vertices
|
|-- curves
| |-- vertices
|
|-- joints


Hope this is what you wanted. Else Tell me what should be adjusted!

:: Galactor ::

Levitateme
12-19-2003, 09:46 PM
wow Galactor...you really suprise me . i never got a message back from you saying soemthing like " christ build your own" which i woulf imagine from some people. but this new version is great i used your tool a lot when modeling my latest creature. i see things i never would unless i could have the camera rotate like it does. thanks again for such a great tool. did you get my PM about the modeling camera/ortho views tool?

galactor
12-19-2003, 10:45 PM
I've read it now, and i installed Wings3d to see what you men't.
I tried to turn the orthographic camera's into perspective camera's, but that gave a strange result. I don't think i can mimic that feature.

:: Galactor ::

Levitateme
12-20-2003, 12:08 AM
nuts. you would agree its a neat feature though right? i have no clue on how it would be done etiher i just finished my first semester in programming. i wish i could give you some ideas.

Levitateme
12-29-2003, 12:46 PM
Hey galactor, i hope your still there. i had a question about your script. sometimes it rotates on what i want it to. but i have this sewere scene. and the tunnel is really long and it rotates the camera from a really weird spot. i thought it was rotating the camera on were my pivot was. and i tried the script on the doors in the scene and it is rotating the camera extrmly far from the doors so i cant actually have it rotate around the doors unless i select one of its edges. am i doing something wrong? i just dont get why its rotating so far away soemtimes.

galactor
12-29-2003, 09:01 PM
The script just Queries the translation of the transform group that is the parent of the mesh.

So i think in this case the Pivot of the doors is not located nearby the door itself. Do I have this right?

:: Galactor ::

Levitateme
12-29-2003, 09:26 PM
Well i have the pivot centered on the doors. so that is why i was not getting what was going on. cause i thought it went off the pivot as well.

galactor
12-30-2003, 01:25 PM
Well, there are two reasons why it won't work correctly.
1 - If you for instance make a cube. And then select all its vertices, and drag it somewhere else. The script will not rotate around the new Cube position, but around the spot where the Cube was origionaly created under Transform Node.
2 - When you perform a Freeze Transformation, your object will have all translation attributes set to ZERO. And therefore you cannot recover its real position in worldspace. In this case the camera will rotate around the Origin (0 0 0).

In these cases you should indeed just select some vertices, edges or faces. At the moment i Use the XFORM command to get the right location of the selected object(s). Right now i use the translation Flag, but i can look if i can find a better way to query the position, maybe with querying the boundingBox.

:: Galactor ::

mhovland
12-30-2003, 02:14 PM
Use the scalePivot flag in your query. This will return the correct ws position of the object. This gets around the whole frozen transform problem.

I believe it is

xform -q -ws -sp;

hope it helps.

galactor
12-31-2003, 06:43 PM
Thanks, i will try this.
I also tried to query the boundingBox, and some other flags that are usable with Xform, but those did not work.

:: Galactor ::

gmask
12-31-2003, 07:16 PM
Okay maybe this is a bit late.. but you can also select the object and hit F on the keyboard and then just rotate around the object using normal camera controls .. this is more practical for modelling

Levitateme
12-31-2003, 09:53 PM
Okay maybe this is a bit late.. but you can also select the object and hit F on the keyboard and then just rotate around the object using normal camera controls .. this is more practical for modelling

That works most the time. but i use the camera rotate command galactor made to just be able to watch my model from all angles, and i find things i dont find with a normal mouse rotate.

galactor
01-05-2004, 06:56 PM
Hello Levitateme!

I changed this part of the script: xform -q -ws -t;
Into this: xform -q -ws -sp;

And this enables to rotate even when a Freeze Transformation is applied to your object. But that's all that has been changed.

:: Galactor ::

Levitateme
01-05-2004, 11:58 PM
awesome! thanks again galactor. going to use it now.

Levitateme
01-09-2004, 07:28 AM
Hey galactor...i have been trying to use your latest script. everytime i do...ummm hard to explain. the camera either goes inside my character, or...way way way far out. i can't tell whats going on. but it has never rotated for me once yet. i was curious if you had any idea whats going on, or if you had similar results?

galactor
01-09-2004, 09:25 AM
yeah, i had it once, it looks awful :)
But after that it has been worked good for me (I don't use it as frequently as you i think).
I suggest to get back to the second last version and do a selection on components while i have no clue what went wrong with the new version.

:: Galactor ::

the_zed_axis
01-13-2004, 10:41 AM
longest chat on a forum with only two members posting get a room u 2 lol
nice script by the way

galactor
01-13-2004, 11:19 PM
Wel i'm happy you like the tool, and yes it was quiete a operation to get it work to the needs of Levitateme. Wich was good, cause he had another look on the usability for this tool.

Well another post is added again :cool: and therfore it is now one of the largest threads on Maya Mel forum :bounce:

:: Galactor ::

CGTalk Moderation
01-16-2006, 10:00 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.