Upload
joseph-douglas
View
12
Download
0
Embed Size (px)
DESCRIPTION
Virtual Reality development is taking the world by storm. Follow all 16 Lecture Notes to learn how to build your own VR experiences. -By Ruth Aylett, Prof.Comp Sci. @ Heriot Watt University
Citation preview
Modelling
Ruth Aylett
Overview
Basic issues – Modelling packages – Low polygon modelling – Importing models
Buildings – Photogrammetry – Laser range finders – LIDAR
The great outdoors – Cheap methods
3D Authoring tools
Most models produced with generic 3D modelling packages offline
Some packages derive from film/animation: – Maya, 3DStudioMax, Softimage, Rhino, Blender, AC3D.
– creation of realistic creatures or backgrounds for film or games industries.
– Not designed for creating real-time rendered models
Others from science/technology:
– Matlab, PV-WAVE, AutoCAD.
– Not designed for realistic textures, lighting etc
Integrated with game engine: Unreal Tournament, Never Winter Nights, Unity etc
All packages create objects, give them styles, assign behaviours and place them in 3D Cartesian space.
Other VR Software Tools
DI Guy - Boston Dynamics Poser – Metacreations Simulink - Mathworks Vizard – WorldViz (sits on OSG) CityEngine – ESRI Specialised terrain modelling (many)
3D Studio Max
3D Studio Max (or 3ds max) - Autodesk – Probably biggest selling professional 3D content
creation package.
Many special purpose plugins such as Character Studio.
Still relatively expensive – PC only for a long time Much used in film
Low polygon modelling
Realtime constraints require working to a ‘polygon budget’
– See http://www.webreference.com/3d/lesson52/ for an example
– Also http://cg.tutsplus.com/tutorials/game-art/sculpt-model-and-texture-a-low-poly-skull-in-blender/
Use of texture Make low-poly model look better Normal maps
– Implementation of bump mapping – Fake lighting of bumps and dents – RGB image "
• corresponds to X, Y, and Z coords of a surface normal from more detailed version of object"
True v ‘fake’ bump mapping"– True = perturb geometry (affects
silhouette)"– Fake = apply to normals only"
• Can be calculated in real-time on graphics card"
Using level of detail (LOD)
Produce different versions of same object – Very low polygon versions to be used when distant – 5000 polygons in one view is often plenty – Using texture can help
Obtaining texture images
Libraries from software – 3DS Max, Maya etc
Web – www.3dcafe.com
Camera with Photoshop editing
Texture photography
Orthogonal pictures are best (but physically impossible)
If the camera has a zoom function – zoom in as far as possible – stand well back – this gives photos that are as close as
possible to being orthogonal
Texture photography
If the camera has a manual / automatic control then use it – particularly important for white balance
A series of photos taken on automatic will have a different setting for white balance for each photo and the colours will not balance
Texture photography
Avoid using the flash if you can It is better to have light evenly
distributed across the object you are photographing
Direct flash light is often uneven, particularly if close up
Photo editing in Photoshop
The best tools for texture editing are photo touch up packages like Adobe Photoshop
These packages allow the user to – Distort the texture
• perspective in photos taken at an angle
– Rub out unwanted features in the texture • passing traffic • undesirable reflections
– Create tileable textures The aim is to create a clean, orthogonal,
(maybe repeating) image
Importing models -1
Always an issue – Given use of separate modelling and runtime
software
Some formats are widely imported by runtime systems – 3ds and vrml 1.0
Use of VRML 1.0 – x3D can be exported in VRML syntax – But VRML 2.0 (the ISO standard) added:
• Animation, user interaction etc • So these must be removed
Importing models - 2
Geometry is not the only problem – Textures often problematic – 64 or 128 bit squares often required – Use of texture tiling (see fields of X3D Texture
node)
Games engines may be idiosyncratic – E.g Unreal Tournament had a ‘carve out’
approach to modelling
Scaling up
Hand construction of models is slow – Modelling packages give limited support
Can modelling be automated? How much? – Buildings? – Whole cities? – Terrain?
Games companies need to cut costs
What makes a ‘good’ model?
Trade-off between polygon count, accuracy, and effort
Depends on the application – Virtual heritage: as accurate as possible!
• Low polygon statues?
– City • Effort dominates • Iconic v standard buildingss
– Physically-based models • Model behaviour is key
Modelling buildings
Use architects’ drawings – By hand: slow but accurate?
Photogrammetry – Use cameras on the real thing?
Google earth example: /attach/faedd5360530f7b5/149169.kmz?gda=KMdbB0YAAACy_T8H3t6cdbII2AqXSUBfp4Ui5Sbfi9qzEsC9zM0-w_vtILYQn0OAisJ7OWVTjK1x40jamwa1UURqDcgHarKEE-Ea7GxYMt0t6nY0uV5FIQ&pli=1&part=3
Laser scanning from models LIDAR data
Architects’ drawings
The obvious approach, BUT – Not always available – Require a long manual model construction – As-built not always as-designed
Photogrammetry
Processing the data
Manual identification of approx 12 points in all 3 views – Use of accurate knowledge of focal length and
negative size – Can calculate exact distance of camera from scene – See http://en.wikipedia.org/wiki/Photogrammetry
for software list
Laser rangefinding
Use of laser beam to gather distance information – time-of-flight: the round trip travel time of a single
pulse is measured and distance calculated based on the speed of light
– Can also capture reflectance data
Laser Scanning Range Finder
Real World Capture Conversion of range data
– Range 2.5m - 80+m – Accuracy 2mm - 10+cm
The Liverpool Project
Use laser scanner to scan the physical model
Create VE model of a model
The Process -Build the Model Select area to scan
– 1 overall - 5 perspectives @ 4mm intervals – 4 sections - 4 perspectives each @ 2mm intervals
Nearly 2 million points in the clouds
Segmentation – Hierarchy - areas, buildings, planes – Fit surfaces
10,000 Polygons
The Liverpool Model
Creating the dinosaurs from the BBC TV series using Laser Scanning
Advantages: Fast, Accurate, Can be automated Disadvantage: Expensive, Large output file, Can be hazardous
LIDAR
Light Detection And Ranging – Airbourne laser rangefinding – Using known position, altitude, orientation
of plane
Data collection
Collects position (x,y) and elevation (z) – At pre-determined intervals – Accuracy depend son flying height, laser beam
diameter, GPS quality, post-processing – Accuracy up to +- 15cms elevation – No need to select specific scanning targets
The great outdoors
Human artefacts are the easiest thing to model – Lots of planes, often orthogonal – Thus low-polygon models
But grass? Bushes? Trees? Flowers? – One polygon for each blade of grass? Several for
each leaf?
Water? Clouds? Fire? Flesh? Fur? Hair?
Cheap methods
All involve compromises with appearance Water:
– Use a water texture: of course it doesn’t move • Sunken blue shape
– Create some polygons and a colour animation • This can look like flow
Trees
Billboard with tree texture on it – Looks the same from any angle
Two polygons at 90 degrees with tree texture on them
There are commercially available models And a few free ones: e.g xfrog public plant
• See http://web.inf.tu-dresden.de/ST2/cg/downloads/publicplants/