RF2 Camera Design

Discuss the development of Reality Factory 2
Post Reply
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

RF2 Camera Design

Post by paradoxnj »

I want to involve the community in the designing of RF2. I'd like to know your requirements to make your game so that I can make RF2 as generic as possible. This will allow RF2 to be used for anything from a first person shooter to a point and click strategy game to a story driven RPG.

In this post, I would like your requirements for the camera. I will list out what I have so far and you tell me what you require by replying to this post.
Camera Design
-- Shell should be allowed to create multiple cameras and switch between them in the game (e.g. Security Camera)

-- Camera should be attached to the Ogre Compositor framework to allow post-screen shaders (e.g Bloom, Blur)

-- Camera should be able to be attached to other objects so that it follows. A camera not attached to an object is a free-look camera

-- Camera should expose properties to script which allow the users to create their own camera styles and modify the camera in the game. Properties that should be exposed are:
* Offset (Vector3) - Offset of the camera position to the attached object
* Drag (float) - Value for dragging the camera when a player starts moving
* FOV (float) - Field of view in radians

-- Camera should be able to turn collision on and off when needed

-- Camera should be attached to the physics system for realistic movement and reaction.
Last edited by paradoxnj on Wed Jan 06, 2010 8:04 pm, edited 1 time in total.
Reason: Added QoD's suggestions and attaching camera to physics system
Many Bothans died to bring you this signature....
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: RF2 Camera Design

Post by QuestOfDreams »

I think you got the essential properties right there. Maybe the type of projection (orthographic / perspective) and field of view would be nice to configure per camera, though these might just be specified when creating a camera...
Is the drag value just related to translations or also rotations?
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: RF2 Camera Design

Post by Jay »

It would also be nice to be able to change the rotation of the camera by script (I only see the position property in your list, would be a vector3). Other than that, i think you have all the essential properties.
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Re: RF2 Camera Design

Post by paradoxnj »

The following camera functions will be exposed to script:

Code: Select all

                __inline const char *getName()					{ return m_strName.c_str();	}
	__inline void setName(const char *lpszName)		{ m_strName = lpszName; }

	void setPosition(Ogre::Vector3 *pPos);
	Ogre::Vector3 *getPosition();

	void setOrientation(Ogre::Quaternion *pRot);
	Ogre::Quaternion *getOrientation();

	void yaw(float fYaw);
	void pitch(float fPitch);
	void roll(float fRoll);

	void attachObject(RFObject *pObj);
	RFObject *getAttachedObject();

	int getProjectionType();
	void setProjectionType(int t);

	int getPolygonMode();
	void setPolygonMode(int pm);

	void setDirection(Ogre::Vector3 *pDir);
	Ogre::Vector3 *getDirection();

	void lookAt(Ogre::Vector3 *pTarget);

	void setFixedYawAxis(bool bUseFixed, Ogre::Vector3 *pFixedAxis = &Ogre::Vector3::UNIT_Y);
	void setFOV(float fFOV);

	void setNearClipDistance(float fDist);
	float getNearClipDistance();

	void setFarClipDistance(float fDist);
	float getFarClipDistance();

	void setAspectRatio(float fRatio);
	float getAspectRatio();
Many Bothans died to bring you this signature....
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Re: RF2 Camera Design

Post by zany_001 »

Only thing I can think of to add is being able to blend the output of two cameras, for 3D work. Keep up the good work!
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: RF2 Camera Design

Post by Juutis »

Multiple windows on the screen. (Splitscreen)

Projecting the output of a camera to a texture. Like, you could have a security camera and you could see its view on a monitor in the game.
Pain is only psychological.
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Re: RF2 Camera Design

Post by paradoxnj »

@zany - Can you give me an example of what this would be used for?

@Juutis - Render to texture is an expected feature as is multiple on-screen camera views.
Many Bothans died to bring you this signature....
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Re: RF2 Camera Design

Post by zany_001 »

Stereoscopic games, like ubisoft's Avatar game is supposed to be like. It's certainly not a necessity, but would be a really cool feature.
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Re: RF2 Camera Design

Post by paradoxnj »

@zany - Stereoscopic gaming is a very new technology. This will not be available day one but is a good suggestion to incorporate into the shell eventually.
Many Bothans died to bring you this signature....
Post Reply