Useful%20Tools%20for%20Making%20Video%20Games - PowerPoint PPT Presentation

About This Presentation
Title:

Useful%20Tools%20for%20Making%20Video%20Games

Description:

... bmp, dds, dxt Mesh support: Milkshape3D, 3D Studio Max, Maya, Blender Scene features BSP, Octree plugins, ... Blender, Autodesk 3DS, Milkshape3D, ... – PowerPoint PPT presentation

Number of Views:128
Avg rating:3.0/5.0
Slides: 25
Provided by: brown175
Learn more at: https://cs.brown.edu
Category:

less

Transcript and Presenter's Notes

Title: Useful%20Tools%20for%20Making%20Video%20Games


1
Useful Tools for Making Video Games
  • Part I
  • An overview of Ogre

2
Sample Games
  • Thunder Wheels
  • Kong
  • Masterplan
  • Pacific Storm
  • Trampoline

3
Features
  • Graphics API independent 3D implementation
  • Platform independence
  • Material Shader support
  • Well known texture formats png, jpeg, tga, bmp,
    dds, dxt
  • Mesh support Milkshape3D, 3D Studio Max, Maya,
    Blender
  • Scene features
  • BSP, Octree plugins, hierarchical scene graph
  • Special effects
  • Particle systems, skyboxes, billboarding, HUD,
    cube mapping, bump mapping, post-processing
    effects
  • Easy integration with physics libraries
  • ODE, Tokamak, Newton, OPCODE
  • Open source!

4
Core Objects
5
Startup Sequence
  • ExampleApplication
  • Go()
  • Setup()
  • Configure()
  • setupResources()
  • chooseSceneManager()
  • createCamera()
  • createViewport()
  • createResourceListener()
  • loadResources()
  • createScene()
  • frameStarted/Ended()
  • createFrameListener()
  • destroyScene()

6
Basic Scene
  • Entity, SceneNode
  • Camera, lights, shadows
  • BSP map
  • Integrated ODE physics
  • BSP map
  • Frame listeners

7
Terrain, sky, fog
8
CEGUI
  • Window, panel, scrollbar, listbox, button, static
    text
  • Media/gui/ogregui.layout
  • CEGUIWindow sheet
  • CEGUIWindowManagergetSingleton().loadWindowLay
    out( (CEGUIutf8)"ogregui.layout")
  • mGUISystem-gtsetGUISheet(sheet)

9
Animation
  • Node animation (camera, light sources)
  • Skeletal Animation
  • AnimationState mAnimationState
  • mAnimationState ent-gtgetAnimationState("Idle")
  • mAnimationState-gtsetLoop(true)
  • mAnimationState-gtsetEnabled(true)
  • mAnimationState-gtaddTime(evt.timeSinceLastFrame)
  • mNode-gtrotate(quat)

10
Animation
  • Crowd (instancing vs single entity)
  • InstancedGeometry batch
  • new InstancedGeometry(mCamera-gtgetSceneManager
    (), "robots" )
  • batch-gtaddEntity(ent, Vector3ZERO)
  • batch-gtbuild()
  • Facial animation
  • VertexPoseKeyFrame manualKeyFrame
  • manualKeyFrame-gtaddPoseReference()
  • manualKeyFrame-gtupdatePoseReference
    ( ushort poseIndex, Real influence) 

11
Picking
12
Picking
  • CEGUIPoint mousePos CEGUIMouseCursorgetSi
    ngleton().getPosition()
  • Ray mouseRay
  • mCamera-gtgetCameraToViewportRay(mo
    usePos.d_x/float(arg.state.width),

  • mousePos.d_y/float(arg.state.height))
  • mRaySceneQuery-gtsetRay(mouseRay)
  • mRaySceneQuery-gtsetSortByDistance(fals
    e)
  • RaySceneQueryResult result
    mRaySceneQuery-gtexecute()
  • RaySceneQueryResultiterator
    mouseRayItr
  • Vector3 nodePos
  • for (mouseRayItr result.begin()
    mouseRayItr ! result.end() mouseRayItr)
  • if (mouseRayItr-gtworldFragment)
  • nodePos mouseRayItr-gtworldFr
    agment-gtsingleIntersection
  • break
  • // if

13
Particle Effects
  • mSceneMgr-gtgetRootSceneNode()-gtcreateChildSceneNod
    e()-gtattachObject(
  • mSceneMgr-gtcreateParticleSystem("s
    il", "Examples/sil"))
  • Examples/sil
  • material Examples/Flare2
  • particle_width 75
  • particle_height 100
  • cull_each false
  • quota 1000
  • billboard_type oriented_self
  • // Area emitter
  • emitter Point
  • angle 30
  • emission_rate 75
  • time_to_live 2
  • direction 0 1 0

14
Particle Effects
Particle system attributes quota material particle_width particle_height cull_each billboard_type billboard_origin billboard_rotation_type common_direction common_up_vector renderer sorted local_space point_rendering accurate_facing iteration_interval nonvisible_update_timeout Emitter attributes (point, box, clyinder, ellipsoid, hollow ellipsoid, ring) angle colour colour_range_start colour_range_end direction emission_rate position velocity velocity_min velocity_max time_to_live time_to_live_min time_to_live_max duration duration_min duration_max repeat_delay repeat_delay_min repeat_delay_max Affectors (LinearForce, ColorFader) Linear Force Affector ColourFader Affector ColourFader2 Affector Scaler Affector Rotator Affector ColourInterpolator Affector ColourImage Affector DeflectorPlane Affector DirectionRandomiser Affector
15
Fire and Smoke
  • affector Rotator
  • rotation_range_start 0
  • rotation_range_end 360
  • rotation_speed_range_start -60
  • rotation_speed_range_end 200

16
Cel Shading
  • vertex_program Ogre/CelShadingVP cg
  • source Example_CelShading.cg
  • entry_point main_vp
  • default_params
  • material Examples/CelShading
  • vertex_program_ref Ogre/CelShadingVP
  • fragment_program_ref Ogre/CelShadingFP

17
Cube Mapping
  • With Perlin noise to distort vertices
  • void morningcubemap_fp (
  • float3 uv TEXCOORD0,
  • out float4 colour COLOR,
  • uniform samplerCUBE tex register(s0) )
  • colour texCUBE(tex, uv)
  • // blow out the light a bit
  • colour 1.7

18
Bump Mapping


19
Reflections Refractions
  • // Noise
  • texture_unit
  • // Perlin noise volume
  • texture waves2.dds
  • // min / mag filtering, no mip
  • filtering linear linear none
  • // Reflection
  • texture_unit
  • // Will be filled in at runtime
  • texture Reflection
  • tex_address_mode clamp
  • // needed by ps.1.4
  • tex_coord_set 1
  • // Refraction
  • texture_unit

20
Reflections Refractions
21
Grass
  • Each grass section is 3 planes at 60 degrees to
    each other
  • Normals point straight up to simulate correct
    lighting

22
Post-Processing Effects
23
Supporting tools (add-ons)
  • Blender, Autodesk 3DS, Milkshape3D, Softimage XSI
    importers/exporters
  • Particle editors, mesh viewers
  • GUI editors
  • Physics bindings
  • Scene exporters and lots more
  • Add-on site

24
References
  • http//www.ogre3d.org/
Write a Comment
User Comments (0)
About PowerShow.com