Upload
natalia-efimtseva
View
106
Download
2
Embed Size (px)
Citation preview
Google Cardboard: виртуальная реальность для Android приложенийЕфимцева Наталия!
Павлов Стас,
Дополненная реальность (AR)
Google Ingress
Дополненная виртуальность (AV)
EA Sport Games, Nintendo Сайт; http://www.nintendofuse.com/2009/03/13/ea-sports-active-tiger-woods-10-grand-slam-tennis-wii-motion-plus/
Виртуальная реальность (VR)
500K+ cardboard’ов продано
Как это работает
Давайте заглянем внутрь
NFC тэг
Линзы
Магнит
Глаза
Глаза
Линзы
Экран
Глаза
Линзы
Эффект дисторсии (Pincushion Distortion)
Отрицательная дисторсия Pincushion Distortion
Положительная дисторсия Barrel Distortion
ОТСЛЕЖИВАНИЕ ПОЛОЖЕНИЯ ТЕЛЕФОНА
Источник2 КАМЕРЫ
Режим телефона
NFC
VR режим
NFC
[возврат]
Самое интересно: создание приложений
g.co/cardboard
Все здесь!
➔VR Toolkit ➔ Примеры
class MyGameActivity extends CardboardActivity
class MyGameActivity extends CardboardActivity
- Экран не отключается - Портретная ориентация экрна - Кнопки управления громкостью отключаются - Скрывает все системные контролы (Все может быть переопределено)
class MyGameRenderer implements CardboardView.StereoRenderer
class MyGameRenderer implements CardboardView.StereoRenderer
- onNewFrame - вызывается каждый раз при рендеринге - onDrawEye - вызывается для рендеринга сцены для каждого глаза, - но с разными параметрами - onFinishFrame - вызывается после рендеринга для обоих глаз
@Override public void onNewFrame(HeadTransform head) { mLastHeadTransform = head; mTime += TIME_DELTA; !
UpdateAI( TIME_DELTA ); UpdatePhysics( TIME_DELTA ); }
MyGameRenderer.java
@Override public void onDrawEye(EyeTransform eye) { Matrix.multiplyMM(view, 0, eye.getEyeView(), 0, camera, 0); Matrix.multiplyMM(mvp, 0, view, 0, model, 0); Matrix.multiplyMM(mvp, 0, eye.getPerspective(), 0, mvp, 0); drawScene(); }
MyGameRenderer.java
@Override public void onCardboardTrigger() { if (isLookingAtTreasure()) { pickupTreasure(); } else { showTreasureMap(); } }
MyGameActivity.java
@Override public void onInsertedIntoCardboard() { this.cardboardView.setVRModeEnabled(true); } !
@Override public void onRemovedFromCardboard() { this.cardboardView.setVRModeEnabled(false); }
MyGameActivity.java
cardboard://com.google/cardboard/1.0.0
Рекомендации
Приложения для виртуальной реальности имеют свои особенности
Физическое движение == визуальное движение
Cвобода движений
Скорость обновления 60 кадров в секунду
Need for Speed: Most Wanted, Criterion Games Image by deadendthrills.com
Бесконечный экран
Выиграйте cardboard! !
Конкурс на стенде Google !
Началов в 16:15
Basic elements Segue slides are sentence
Small caption
HeadingSubheadingBody
Source
Code
All text is set in Roboto and Roboto Condensed.
All code is set in Inconsolata. Download all 3 on google.com/fonts
#FFA000
#00BCD4
Main colorLighter GraysDarker
A
Simple rounded rectangle
Callout Subcaption
Callout Arrows
6px border
Example slides
Full-bleed, photo-only slides are great
Good design is as little design as possible.Dieter Rams
Step 1 Step 2 Step 3
End
Chart title
7%8%
10%
11%
29%
35%AprilMayJuneJulyAugustSeptember
Chart data source info here
Chart data source info here
Chart title
0
25
50
75
100
April May June July
Chart data source info here
Chart title
0
25
50
75
100
April May June July
<paper-button id="go" disabled>Go!</paper-
HTML
.paper-button { background-color: red;
CSS
document.querySelector('.paper-button') .addEventListener('click', function(e) { // your code here
JavaScript
For really short code snippets, use this style, with optional
indication of filename or
Visit j.mp/iohighlighter in Safari and copy + paste into
protected void onTryUpdate(int reason) throws RetryException { // Do some awesome stuff int foo = 15; publishArtwork(new Artwork.Builder() .title(photo.name) .imageUri(Uri.parse(photo.image_url)) .viewIntent(new Intent(Intent.ACTION_VIEW, Uri.parse("http://500px.com/photo/" + photo.id))) .build()); scheduleUpdate(System.currentTimeMillis() + ROTATE_TIME_MILLIS); } Visit j.mp/iohighlighter in
Safari and copy + paste into
MainActivity.j
If your code snippet is over 6 lines, use a full-page slide of code in this style
protected void onTryUpdate(int reason) throws RetryException { // Do some awesome stuff int foo = 15; publishArtwork(new Artwork.Builder() .title(photo.name) .imageUri(Uri.parse(photo.image_url)) .viewIntent(new Intent(Intent.ACTION_VIEW, Uri.parse("http://500px.com/photo/" + photo.id))) .build()); scheduleUpdate(System.currentTimeMillis() + ROTATE_TIME_MILLIS); }
MainActivity.j
Use this style to highlight a particular
// A couple more notes on code slides: // * Use the Inconsolata font available at google.com/fonts // * Set line spacing to 1.2 // * Don’t use font sizes below 40pt
code_slides.tx
Photos make for excellent segue slides
Photo source info here
Use a semitransparent dark gray or black to ensure text is legible
Photo source info here
BIG IDEAPhoto source info here
What’s next?Getting Started with Android Wear developer.android.com/wear
Introduction to Beer-Brewing g.co/beerintro
youtube.com/GoogleDevelopers
+Your Name
Thank you!
#optionalhashtag
Avoid using the following slide types
Avoid using titles
• Also try to avoid bullets · Here’s what sub-bullets look like · But you should generally avoid them, too
• Think about all the awesome visuals you could be showing instead!
• A third bullet (by now, no one’s payingattention to what you’re actually saying)
• DON’T USE 3RD-LEVEL BULLETS!
But when you need to use them, sentence case