Tutorial Introduction
Ogre Tutorial Head

In this tutorial you will be introduced to a few more Ogre/Mogre constructs, expanding on what you have already learned.
This tutorial will deal mainly with Light objects and how they are used to create shadows in Ogre/Mogre.
It will also cover the absolute basics about Cameras.


If you find any errors in this tutorial please send a private message to amirabiri.

Prerequisites

  • This tutorial assumes you have knowledge of C# programming and are able to setup and compile a Mogre application.
  • This tutorial also assumes that you have created a project using the Mogre Wiki Tutorial Framework.
  • This tutorial builds on the first tutorial, and it assumes you have already worked through it.


Getting Started

As with the last tutorial, we will be using the Mogre Wiki Tutorial Framework as our starting point. We will add two more methods to our Tutorial class: CreateViewport and CreateCamera. These two methods are virtual methods of the tutorial framework, but in this tutorial we will now look at them to see how Cameras and Viewports are actually created and used.

Add overrides of these methods to your tutorial class:

protected override void CreateCamera()
{
}

protected override void CreateViewports()
{
}

Cameras

A Camera is used to view the scene. A Camera is a special object which works somewhat like a SceneNode does. The Camera object has a Position property, as well as Yaw, Roll, and Pitch methods, and you can optionally attach it to any SceneNode. Just like SceneNodes, a Camera's position is relative to its parents (it's nice to respect one's elders). For all movement and rotation, you can basically consider a Camera a SceneNode.

One thing about Ogre Cameras that is different from what you might expect, is that you should only be using one Camera at a time (for now). In other words, we don't create multiple cameras for viewing different portions of the scene and then enabling or disabling to switch between them. Instead the way to accomplish this is to create SceneNodes which act as "camera holders". These SceneNodes simply sit in the scene and point at what the Camera might want to look at. When it is time to display a portion of the Scene, the Camera is simply attached to the appropriate SceneNode. We will revisit this technique in the FrameListener tutorial.

Finally, note that we are overriding the tutorial framework's default creation of the camera. If we didn't do that the framework would have created one for us by default.

Creating a camera

First we will be overriding the default camera creation of the framework. Since Cameras are tied to the SceneManager which they reside in, we use the SceneManager object to create them. Find or add an override of the CreateCamera method and add the following code to it:

protected override void CreateCamera()
{
    mCamera    = mSceneMgr.CreateCamera("PlayerCam");
    mCameraMan = new CameraMan(mCamera);
}


This creates a Camera with the name "PlayerCam". You can use SceneManager's GetCamera method to get a Camera by its name if you decide not to hold a reference to it. Note that the framework's BaseApplication class provides a property called mCamera that holds the current camera, which is where we assigned the newly created camera object.

The next thing we are going to do is set the position of the Camera and the direction that it's facing. We will be placing objects around the origin, so we'll put the Camera a good distance in the +z direction and have the Camera face the origin. Add the following code to your CreateCamera method:

mCamera.Position = new Vector3(0, 10, 500);
mCamera.LookAt(Vector3.ZERO);


The LookAt method is pretty nifty. You can have the Camera face any position you want to instead of having to Yaw, Rotate, and Pitch your way there. SceneNodes have this function as well, which can make setting Entities facing the right direction much easier in many cases.

Finally we will set a near clipping distance of 5 units. The clipping distance of a Camera specifies how close or far something can be before you no longer see it. Setting the near clipping distance makes it easier to see through Entities on the screen when you are very close to them. The alternative is being so close to an object that it fills the screen and you can't see anything but a tiny portion of it. You can also set the far clipping distance as well. This will stop the engine from rendering anything farther away than the given value. This is primarily used to increase the framerate if you are rendering large amounts of things on the screen for very long distances. To set the near clipping distance, add the following line to your CreateCamera method:

mCamera.NearClipDistance = 5;


You can also change the far clipping distance by setting the FarClipDistance property (though you should not use a far clip distance with Stencil Shadows, which we will be using in this tutorial).

Now, since we are overriding the framework's CreateCamera method, we need to construct a CameraMan object (camera controller) using our newly constructed camera:

mCameraMan = new CameraMan(mCamera);


Your final CreateCamera method should look something like this:

protected override void CreateCamera()
{
    mCamera = mSceneMgr.CreateCamera("PlayerCam");
    mCamera.Position = new Vector3(0, 10, 500);
    mCamera.LookAt(Vector3.ZERO);
    mCamera.NearClipDistance = 5;
    mCameraMan = new CameraMan(mCamera);
}

Viewports

When you start dealing with multiple Cameras, the concept of a Viewport class will become much more useful to you. However, we are bringing this topic up now because it is important for you to understand how Ogre decides which Camera to use when rendering a scene. It is possible to have multiple SceneManagers running at the same time or to split the screen up into multiple areas, and have separate cameras render to separate areas on the screen (think of a split view for 2 players in a console game, for example). While it is possible to do these things, we will not be covering how to do them until the advanced tutorials.

To understand how Ogre renders a scene, consider three of Ogre's constructs: the Camera, the SceneManager, and the RenderWindow. The RenderWindow we have not covered, but it is basically the window in which everything is displayed. The SceneManager object creates Cameras to view the scene. You must tell the RenderWindow which Cameras to display on the screen, and what portion of the window to render it in. The area in which you tell the RenderWindow to display the Camera is your Viewport. Under most typical uses of Ogre, you will generally create only one Camera, register the Camera to use the entire RenderWindow, and thus only have one Viewport object.

In this tutorial we will go over how to register the Camera to create the Viewport. We can then use this Viewport object to set the background color of the scene we are rendering.

Creating the viewport

We will be overriding the framework's creation of the viewport. To create the Viewport we simply call the AddViewport method of RenderWindow and supply it with the Camera we are using. Find or add an override of the CreateViewports method and add the following code to it:

Viewport viewport = mWindow.AddViewport(mCamera);


Now that we have our Viewport, what can we do with it? The answer is: not much. The most important thing we can do with it is set the BackgroundColour property to set the background to whatever color we choose. Since we are dealing with lighting in this tutorial we will set the color to black:

viewport.BackgroundColour = ColourValue.Black;


Note that ColourValue expects a red, green, and blue color value for its parameters between the values of 0 and 1.

The last, and most important thing we need to do is to set the aspect ratio of our Camera. If you are using something other than the standard full-window viewport, then failing to set this can result in a very strange looking scene. We will go ahead and set it even though we are using the default aspect ratio:

mCamera.AspectRatio = (float)viewport.ActualWidth / viewport.ActualHeight;


That's all that has to be done for our simple use of the Viewport class.

Your final CreateViewports method should look something like this:

protected override void CreateViewports()
{
    Viewport viewport         = mWindow.AddViewport(mCamera);
    viewport.BackgroundColour = ColourValue.Black;
    mCamera.AspectRatio       = (float)viewport.ActualWidth / viewport.ActualHeight;
}


At this point you should be able to compile and run the application, though nothing will appear but a blank scene (use the Escape key to exit). Be sure you can run the application without it crashing before continuing.

Lights and Shadows

Ogre currently supports three types of Shadows:

  1. Modulative Texture Shadows (ShadowTechnique.SHADOWTYPE_TEXTURE_MODULATIVE) - The least computationally expensive of the three. This creates a black and white render-to-texture of shadow casters, which is then applied to the scene.
  2. Modulative Stencil Shadows (ShadowTechnique.SHADOWTYPE_STENCIL_MODULATIVE) - This technique renders all shadow volumes as a modulation after all non-transparent objects have been rendered to the scene. This is not as intensive as Additive Stencil Shadows, but it is also not as accurate.
  3. Additive Stencil Shadows (ShadowTechnique.SHADOWTYPE_STENCIL_ADDITIVE) - This technique renders each light as a separate additive pass on the scene. This is very hard on the graphics card because each additional light requires an additional pass at rendering the scene.


Ogre does not support soft shadows as part of the engine. If you want soft shadows you will need to write your own vertex and fragment programs. Note that this is just a quick introduction here - the Ogre manual fully describes shadows in Ogre and the implications of using them.

Using shadows in Ogre/Mogre


Using shadows in Mogre is relatively simple. The SceneManager class has a ShadowTechnique property that we can use to set the type of Shadows we want. Then whenever you create an Entity, set the CastShadows property to set whether or not it casts shadows.

We will now set the ambient light to complete darkness and then set the shadow type. Add the following code to your CreateScene method:

mSceneMgr.AmbientLight    = ColourValue.Black;
mSceneMgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_STENCIL_ADDITIVE;


Now the SceneManager uses additive stencil shadows. Lets create an object on the scene and make it cast shadows.

Entity ent = mSceneMgr.CreateEntity("ninja", "ninja.mesh");
ent.CastShadows = true;
mSceneMgr.RootSceneNode.CreateChildSceneNode().AttachObject(ent);


We also need something for the Ninja to stand on (so that he has something to cast shadows onto). To do this we will create a simple plane. This is not meant to be a tutorial on using MeshManager, but we will go over the very basics since we have to use it to create a plane. First we need to define the Plane object itself, which is done by supplying a normal and the distance from the origin. We could (for example) use planes to make up parts of world geometry, in which case we would need to specify something other than 0 for our origin distance. For now we just want a plane to have the positive y axis as its normal (that means we want it to face up), and no distance from the origin:

Plane plane = new Plane(Vector3.UNIT_Y, 0);


Now we need to register the plane so that we can use it in our application. The MeshManager class keeps track of all the meshes we have loaded into our application (for example, this keeps track of the ogreHead.mesh and the ninja.mesh that we have been using). The createPlane member function takes in a Plane definition and makes a mesh from the parameters. This registers our plane for use:

MeshManager.Singleton.CreatePlane("ground",
    ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane,
    1500, 1500, 20, 20, true, 1, 5, 5, Vector3.UNIT_Z);


Again, we are not going to delve into the specifics of how to use the MeshManager just yet (consult the API reference if you want to see exactly what each parameter is doing). Basically we have registered our plane to be 1500 by 1500 in size and new mesh is called "ground". Now, we can create an Entity from this mesh and place it on the scene:

Entity groundEnt = mSceneMgr.CreateEntity("GroundEntity", "ground");
mSceneMgr.RootSceneNode.CreateChildSceneNode().AttachObject(groundEnt);


Neat huh? There are two more things we need to do with our ground before we are finished with it. The first is to tell the SceneManager that we don't want it to cast shadows since it is what's being used for shadows to project on. The second thing is we need to put a texture on it. Our ogreHead and ninja meshes already have material scripts defined for them. When we manually created our ground mesh, we did not specify what texture to use on it. We will use the "Examples/Rockwall" material script that Ogre includes with its samples:

groundEnt.SetMaterialName("Examples/Rockwall");
groundEnt.CastShadows = false;


This is what the CreateScene method should look like so far:

mSceneMgr.AmbientLight    = ColourValue.Black;
mSceneMgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_STENCIL_ADDITIVE;

Entity ent = mSceneMgr.CreateEntity("ninja", "ninja.mesh");
ent.CastShadows = true;
mSceneMgr.RootSceneNode.CreateChildSceneNode().AttachObject(ent);

Plane plane = new Plane(Vector3.UNIT_Y, 0);

MeshManager.Singleton.CreatePlane("ground",
    ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane,
    1500, 1500, 20, 20, true, 1, 5, 5, Vector3.UNIT_Z);

Entity groundEnt = mSceneMgr.CreateEntity("GroundEntity", "ground");
mSceneMgr.RootSceneNode.CreateChildSceneNode().AttachObject(groundEnt);

groundEnt.SetMaterialName("Examples/Rockwall");
groundEnt.CastShadows = false;


Now that we have a Ninja and ground in the scene, let's compile and run the program. We see... nothing! What's going on? In the previous tutorial we added Ogre heads and they displayed fine. The reason the Ninja doesn't show up is because the scene's ambient light has been set to total darkness. So let's add a light to see what is going on.

Types of Lights

There are three types of lighting that Ogre provides.

  1. Point (Light.LightTypes.LT_POINT) - Point light sources emit light from them in every direction.
  2. Spotlight (Light.LightTypes.LT_SPOTLIGHT) - A spotlight works exactly like a flashlight does. You have a position where the light starts, and then light heads out in a direction. You can also tell the light how large of an angle to use for the inner circle of light and the outer circle of light (you know how flashlights are brighter in the center, then lighter after a certain point?).
  3. Directional (Light.LightTypes.LT_DIRECTIONAL) - Directional light simulates far-away light that hits everything in the scene from a direction. Let's say you have a night time scene and you want to simulate moonlight. You could do this by setting the ambient light for the scene, but that's not exactly realistic since the moon does not light everything equally (neither does the sun). One way to do this would be to set a directional light and point in the direction the moon would be shining.


Lights have a wide range of properties that describes how the light looks. Two of the most important properties of a light are its DiffuseColour and SpecularColour color. Each material script defines how much diffuse and specular lighting the material reflects, which we will learn how to control in a later tutorial.

Creating the Lights

To create a Light in Ogre we call SceneManager's CreateLight method and supply the light's name, very much like how we create an Entity or Camera. After we create a Light, we can either set the position of it manually or attach it to a SceneNode for movement. Unlike the Camera object, light only has Position and Direction and not the full suite of movement functions like Translate, Pitch, Yaw, Roll, etc. So if you need to create a stationary light, you should use the Position property. If you need the light to move (such as creating a light that follows a character), then you should attach it to a SceneNode instead.

So, let's start with a basic point Light. The first thing we will do is create the light, set its type, and set its position:

Light pointLight = mSceneMgr.CreateLight("pointLight");
pointLight.Type     = Light.LightTypes.LT_POINT;
pointLight.Position = new Vector3(0, 150, 250);


Now that we have created the light, we can set its Diffuse and Specular color. Let's make it red:

pointLight.DiffuseColour  = ColourValue.Red;
pointLight.SpecularColour = ColourValue.Red;


Now compile and run the application. Success! We can now see the Ninja and he casts a shadow. Be sure to also look at him from the front, a complete silhouette. One thing to notice is that you do not "see" the light source. You see the light it generates but not the actual light object itself. Many of Ogre's tutorials add a simple entity to show where the light is being emitted from. If you are having trouble with lights in your application you should consider creating something similar to what they do so you can see exactly where your light is.

Next, let's try out directional light. Notice how the front of the ninja is pitch black? Let's add a small amount of yellow directional light that is shining towards the front of his body. We create the light and set the color just like we do for a point light:

Light directionalLight = mSceneMgr.CreateLight("directionalLight");
directionalLight.Type           = Light.LightTypes.LT_DIRECTIONAL;
directionalLight.DiffuseColour  = new ColourValue(.25f, .25f, 0);
directionalLight.SpecularColour = new ColourValue(.25f, .25f, 0);


Since directional light is supposed to come from a far-off distance, we do not have to set its position, only its direction. We'll set the direction of the light to be in the positive z and negative y direction (like it is coming from 45 degrees in front and above the ninja):

directionalLight.Direction = new Vector3(0, -1, 1);


Compile and run the application. We now have two shadows on the screen, though since the directional light is so faint, the shadow is also faint. The last type of light we are going to play with is the spotlight. We will now create a blue spotlight:

Light spotLight = mSceneMgr.CreateLight("spotLight");
spotLight.Type           = Light.LightTypes.LT_SPOTLIGHT;
spotLight.DiffuseColour  = ColourValue.Blue;
spotLight.SpecularColour = ColourValue.Blue;


We also need to set both the position and the direction that the spotlight shines in. We will create a spotlight that hovers above the Ninja's right shoulder, and shines down directly on him:

spotLight.Direction = new Vector3(-1, -1, 0);
spotLight.Position  = new Vector3(300, 300, 0);


Spotlights also allow us to specify how wide the beam of the light is. Imagine a flashlight beam for a second. There is a core beam in the center that is brighter than the surrounding light. We can set the width of both of these beams by calling the SetSpotlightRange method:

spotLight.SetSpotlightRange(new Degree(35), new Degree(50));


Compile and run the application. Purple Ninja...dangerous!

This is how our createScene function looks like:

protected override void CreateScene()
{
    mSceneMgr.AmbientLight    = ColourValue.Black;
    mSceneMgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_STENCIL_ADDITIVE;

    Entity ent = mSceneMgr.CreateEntity("ninja", "ninja.mesh");
    ent.CastShadows = true;
    mSceneMgr.RootSceneNode.CreateChildSceneNode().AttachObject(ent);

    Plane plane = new Plane(Vector3.UNIT_Y, 0);

    MeshManager.Singleton.CreatePlane("ground",
        ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane,
        1500, 1500, 20, 20, true, 1, 5, 5, Vector3.UNIT_Z);

    Entity groundEnt = mSceneMgr.CreateEntity("GroundEntity", "ground");
    mSceneMgr.RootSceneNode.CreateChildSceneNode().AttachObject(groundEnt);

    groundEnt.SetMaterialName("Examples/Rockwall");
    groundEnt.CastShadows = false;

    Light pointLight = mSceneMgr.CreateLight("pointLight");
    pointLight.Type           = Light.LightTypes.LT_POINT;
    pointLight.Position       = new Vector3(0, 150, 250);
    pointLight.DiffuseColour  = ColourValue.Red;
    pointLight.SpecularColour = ColourValue.Red;

    Light directionalLight = mSceneMgr.CreateLight("directionalLight");
    directionalLight.Type           = Light.LightTypes.LT_DIRECTIONAL;
    directionalLight.DiffuseColour  = new ColourValue(.25f, .25f, 0);
    directionalLight.SpecularColour = new ColourValue(.25f, .25f, 0);
    directionalLight.Direction      = new Vector3(0, -1, 1);

    Light spotLight = mSceneMgr.CreateLight("spotLight");
    spotLight.Type           = Light.LightTypes.LT_SPOTLIGHT;
    spotLight.DiffuseColour  = ColourValue.Blue;
    spotLight.SpecularColour = ColourValue.Blue;
    spotLight.Direction      = new Vector3(-1, -1, 0);
    spotLight.Position       = new Vector3(300, 300, 0);

    spotLight.SetSpotlightRange(new Degree(35), new Degree(50));
}


Things to Try

Different Shadow Types

In this demo we only set the shadow type to be SHADOWTYPE_STENCIL_ADDITIVE. Try setting it to the other two types of shadows and see what happens. There are also many other shadow-related functions in the SceneManager class. Try playing with some of them and seeing what you come up with.

Light Attenuation

Lights define an Attenuation property which allows you to control how the light dissipates as you get farther away from it. Add a function call to the Point light that sets the attenuation to different values. How does this affect the light?

SceneManager.AmbientLight

Experiment with the AmbientLight property.

Viewport Background Colour

Change the default ColourValue in the CreateViewport function. While it is not really appropriate to change it to something other than black in this situation, it is a good thing to know how to change.

Camera.FarClipDistance

In CreateCamera we set the near clip distance. Set the FarClipDistance property to be 500, watch what happens when you move from seeing the Ninja and not seeing the Ninja with stencil shadows turned on. Notice the slowup?

Note: You'll need to call mSceneMgr.SetShadowUseInfiniteFarPlane(false), for this to work, and you might get some strange shadows. (See this thread.)

Planes

We did not cover much about Planes in this tutorial (it was not the focus of this article). If you are interested you should look up the CreatePlane function and try playing with some of the inputs to the function.



Proceed to Mogre Basic Tutorial 3 Terrain, Sky, and Fog


<HR>
Creative Commons Copyright -- Some rights reserved.


THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

  • "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
  • "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
  • "Licensor" means the individual or entity that offers the Work under the terms of this License.
  • "Original Author" means the individual or entity who created the Work.
  • "Work" means the copyrightable work of authorship offered under the terms of this License.
  • "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
  • "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.

2. Fair Use Rights

Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant

Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

  • to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
  • to create and reproduce Derivative Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
  • For the avoidance of doubt, where the work is a musical composition:
    • Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
    • Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
    • Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).


The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions

The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

  • You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested.
  • You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.
  • If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability.

EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

  • This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
  • Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

  • Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
  • Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
  • If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
  • No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
  • This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.