[SOLVED] (Blender) camera follow path

Can I export a camera follow path animation?
Just found out about it, looks pretty handy for cutscenes

Yeah, use curves. Not sure if Chicken fully supports exporting curves though.

Um, how exactly?
In Blender I select the camera, then curve, Ctr+P -> Follow Path

No, just export it as normal curve, and convert it into a motion path in Panda.

Chicken does export Curves, so you can do it - there are some restrictions however, so I’ld go read the relevant section of chickens manual. Personally I’ld be inclined to animate an armature, expose the bone, and glue a camera to that myself - gives you more control, especially as with a bit of magic you can rig another bone to control the cameras zoom. That is quite a complicated trick though, so I’ld see if you can get paths to do what you want before taking that route.


I don’t see why it’s better. Maybe I will after reading the manual

Only Nurbs curves?

Yup - nurbs only. You don’t lose anything because of this.

The reason I said a bones rig might be better is due to the interface when animating the camera - curves are very limited, and can only do one style of movement, plus they have only a single interface. Great for flyovers, but little else really. A bone based system is far more amenable to custom controls, due to getting all the tools used for character animation, which allows for many styles of camera shot (You can rig controls identical to a real camera on a boom for instance, add in shake, and get very realistic camera shots. And then do this in parallel with several other control systems, which could even include tracking a curve.). Also, you can’t really do camera zoom with curves. Of course, to do this requires full use of complex character animation skills, hence its not for the faint of heart.

Thats an interesting approach, I never thought of trying anything like that. But yeah right now I need a simple old-school RPG battle camera: youtube.com/watch?v=rXt0OTPj1z0&feature=fvsr
As you can see it’s static cameras with lookAt and moving cameras (curve) with lookAt. I have added emptys for static camera locations and nurbs curves for moving cameras in Blender. Now I have some scripting questions, I guess I shouldn’t post them here?

You can if you want - they naturally follow on from the conversation so far so it makes sense to do so, and I’ll probably know the answer. (Though I can’t watch the video right now - muppets in support at my work screwed up installing flash on my computer. Not for any good reason either - they seem to have a phobia against using this silly distributions packaging system. Grrr.)

The video is from one of the old FF games… it shows what I want to achieve
OK, I’ll try to ask here:
Is this how you assign model’s properties to empty’s?:

import direct.directbase.DirectStart

empty = loader.loadModel('empty')
model = loader.loadModel('model')


How about using 1 file for the battle screen, curves and emptys?:

battlescreen = loader.loadModel('battlescreen')

playerempty = battlescreen.find("**/playerempty")

player = loader.loadModel('player')

Doesn’t seem to work…

Both code snippets look fine to me - I don’t see any problem. Most likely the issue is elsewhere - I’ld check that a ‘playerempty’ actually exists in the egg file, and that nothing else is going wrong, i.e. player object otherwise renders etc.

Youre right. I made another model with empty and it rendered as expected. I’m guessing my other model is either too small or too big

I wonder how I can do the same with mopaths?
The only way I know of loading a mopath is

mopath = Mopath.Mopath()

What if I have my mopath is in the same file as my visible geometry?

mopath = Mopath.Mopath()

surely not

I don’t know to be honest, though your example code couldn’t work as loadFile expects a file or filename, not a nodepath. I notice however that the Mopath class has a method with the name loadNodePath, so I’ld investigate that:-)

I know…

When did the reference go pythony?

model = loader.loadModel('model')

mopathNP = model.find("**/curve")

mopath = Mopath.Mopath()


Reference was redone some time ago, for the 1.7.0 release - there is now a python version and a c++ version. But your code looks plausible, but I can’t say if it would actually work. I would try it and see - quicker and easier than asking on the forum!

I did try it and got an Assertion error:

Well, that would imply that the passed in node path is empty, unsurprisingly - I’ld verify that it has actually found your curve.

That means?