[SOLVED] Questions: Cameras... 3ds Max

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

[SOLVED] Questions: Cameras... 3ds Max

Post by iblues1976 »

Hi,

I have some questions. First, when I export cameras from 3ds max using OgreMax, I never see information about the lookat... I do see the field of view angle, positions, rotations..
do you guys know why? is there a way to set that in 3ds max?

Code: Select all

<node name="Camera02">
            <position x="757.858" y="-1.14201e-005" z="-261.261" />
            <scale x="1" y="1" z="1" />
            <rotation qx="0.628293" qy="0.324419" qz="-0.324419" qw="0.628293" />
            <camera name="Camera02" fov="0.713667">
                <rotation qx="-0.707107" qy="-0" qz="-0" qw="0.707107" />
                <clipping near="1" far="5000" />
            </camera>
            <trackTarget nodeName="Camera02.Target">
                <localDirection x="0" y="-1" z="0" />
            </trackTarget>
        </node>
another question... does it make a difference for ogre if I set the camera in 3ds as "Target" or "Free"

and the last question: What is the difference between

Code: Select all

mCameraMan = new OgreBites::SdkCameraMan(mCamera);
and (setting the camera from the viewport)

Code: Select all

m_pViewport->setCamera(m_Camera);
I read that SDKCameraMan is better?

thanks,
Francisco
Last edited by iblues1976 on Thu Feb 02, 2012 3:56 am, edited 2 times in total.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 535

Re: Questions: Cameras... 3ds Max

Post by Kojack »

Cameras don't have a lookat value.
You can tell an ogre camera to look at a position, but what that actually does is change the orientation (rotation). The actual lookat position you provide is never stored in the camera.

The OgreBites SdkCameraMan is part of the sample browser. It's not part of ogre itself.
Not much more I can say about it, I've never used it.
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

Re: Questions: Cameras... 3ds Max

Post by iblues1976 »

Hi,

how can I use the rotation

Code: Select all

<rotation qx="0.628293" qy="0.324419" qz="-0.324419" qw="0.628293" />
to calculate the look at value then?

thanks,
Francisco
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 535

Re: Questions: Cameras... 3ds Max

Post by Kojack »

That rotation value is a quaternion. If you multiply a quaternion by the vector [0,0,-1] you'll get a vector pointing in the direction of the camera. Somewhere along that vector is where you are looking (there's no explicit lookat point, it could be anywhere along that vector). Ogre's camera knows the direction you are looking, but not how far.
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

Re: Questions: Cameras... 3ds Max

Post by iblues1976 »

Thank you!!!!