Skip to content
Snippets Groups Projects
Commit 6b8a0590 authored by stendler's avatar stendler
Browse files

Merge branch 'antje/recordings+materials' into demo

parents 02ebaae7 4140d9d6
No related branches found
No related tags found
No related merge requests found
Showing
with 455 additions and 49 deletions
File added
......@@ -41,7 +41,7 @@ Material:
- _IndexOfRefraction: 2.14
- _ReflectionStrength: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.9805855, b: 0.03703501, a: 1}
- _MainTex_ST: {r: 1, g: 1, b: 0, a: 0}
- _ReflectTex_ST: {r: 1, g: 1, b: 0, a: 0}
- _RefractTex_ST: {r: 1, g: 1, b: 0, a: 0}
......
......@@ -74,14 +74,14 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Shininess: 1
- _Shininess: 0.1
- _SmoothnessTextureChannel: 1
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.22014068, g: 0.20436852, b: 0.66176474, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectColor: {r: 1, g: 1, b: 1, a: 0.5}
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
- _ReflectColor: {r: 0.36607915, g: 0.3664011, b: 0.8161765, a: 0.941}
- _SpecColor: {r: 1, g: 1, b: 0, a: 1}
......@@ -78,6 +78,6 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0.865}
- _Color: {r: 0.35294116, g: 0.044117644, b: 0.044117644, a: 0.865}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: alm
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.026, g: 0.5564, b: 0.65, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
fileFormatVersion: 2
guid: e07b44ac52764ac4cabd021331b4e685
timeCreated: 1517421549
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
......@@ -73,7 +73,7 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0.59}
- _Color: {r: 0.19326863, g: 0.3602941, b: 0.07947663, a: 0.59}
- _Emission: {r: 0.064655155, g: 0.08430525, b: 0.086206876, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 1, g: 1, b: 1, a: 0}
......@@ -8,11 +8,11 @@ TextureImporter:
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
borderMipMap: 1
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
......@@ -22,7 +22,7 @@ TextureImporter:
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
isReadable: 1
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
......@@ -32,25 +32,25 @@ TextureImporter:
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
aniso: 1
mipBias: -1
wrapU: -1
wrapV: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
spriteMode: 2
spriteExtrude: 12
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spritePixelsToUnits: 1000
alphaUsage: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
......@@ -65,6 +65,17 @@ TextureImporter:
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
......
......@@ -51,7 +51,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 06d5e09f171bb4147967727b2ba1979b, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
......@@ -73,7 +73,7 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0.785}
- _Color: {r: 0.24372835, g: 0.30043247, b: 0.6764706, a: 0.785}
- _Emission: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.94827586, g: 0.94827586, b: 0.94827586, a: 0}
- _SpecColor: {r: 0.34450695, g: 0.86764705, b: 0.86764705, a: 0}
......@@ -71,9 +71,9 @@ Material:
- _DstBlend: 10
- _EnableExternalAlpha: 0
- _GlossMapScale: 1
- _Glossiness: 0.361
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0.128
- _Metallic: 0
- _Mode: 2
- _OcclusionStrength: 1
- _Parallax: 0.02
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: GreenScreen
m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 1, b: 0.006896496, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
fileFormatVersion: 2
guid: a5e3f4150d4d84392ba7b8349ab3a043
timeCreated: 1517152351
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
Assets/MemoryBox/arScene/Materials/demoPicture.jpg

817 KiB

fileFormatVersion: 2
guid: 06daaaff06cf03a4d86ad98c8f43ebf1
timeCreated: 1517528082
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: demoPicture
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 06daaaff06cf03a4d86ad98c8f43ebf1, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
fileFormatVersion: 2
guid: 4e9d986b7da5dd64babb81463ef2dd7c
timeCreated: 1517528798
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
......@@ -30,7 +30,7 @@ namespace MemoryBox.arScene.Scripts
// Update is called once per frame
private void Update () {
// move relative to player gps
transform.position = Vector3.MoveTowards(transform.position, _transformLocation, 0.1f);
transform.localPosition = Vector3.MoveTowards(transform.position, _transformLocation, 0.1f);
}
/**
......@@ -72,7 +72,7 @@ namespace MemoryBox.arScene.Scripts
public void UpdatePosition(GpSdata userGps)
{
var newPos = _positionInWorldSpace(userGps);
Logger.AddDebug(newPos.x+"/"+newPos.y+"/"+newPos.z);
//Logger.AddDebug(newPos.x+"/"+newPos.y+"/"+newPos.z);
_transformLocation = newPos;
}
......
using System;
using UnityEngine;
namespace MemoryBox.arScene.Scripts
......@@ -7,11 +6,16 @@ namespace MemoryBox.arScene.Scripts
{
public UserGps UserGps;
public DebugText Logger;
public GameObject VisibleAreaContainer;
public void AddMemstone(string name, float latitude, float longitude, Mesh mesh, Material material)
public Memstone AddMemstone(string name, float latitude, float longitude, Mesh mesh, Material material)
{
// todo maybe just use a constructor for this part?
// then the init would be done with the correct User instance already assigned and goto gps location should be updated in initial step
// main game object
var memObject = new GameObject(name);
//memObject.transform.SetParent(VisibleAreaContainer.transform);
var memComponent = memObject.AddComponent<Memstone>();
memComponent.Latitude = latitude;
memComponent.Longitude = longitude;
......@@ -21,6 +25,7 @@ namespace MemoryBox.arScene.Scripts
// child object holding geometry and 3D information
var memChild = new GameObject("mesh");
memChild.transform.SetParent(memObject.transform);
// add mesh filter and assign its mesh
var meshFilter = memChild.AddComponent<MeshFilter>();
meshFilter.mesh = mesh;
......@@ -29,16 +34,13 @@ namespace MemoryBox.arScene.Scripts
meshRenderer.material = material;
// todo maybe change some default settings ?
return memComponent;
}
private void Start()
{
var s = SystemInfo.operatingSystemFamily == OperatingSystemFamily.Windows ? "\\": "/";
var path = ".." + s + "Memoryox" + s + "arScene" + s + "testobjects" + s;
var mesh = Resources.Load<Mesh>(path + "20.wav");
var material = Resources.Load<Material>(path + "20.wav");
AddMemstone("01", 52.52625f, 13.40070f, mesh, material);
Logger.AddDebug("test memstone added");
}
}
}
using System;
using System.Collections.Generic;
using UnityEngine;
using Zios;
namespace MemoryBox.arScene.Scripts
{
......@@ -12,9 +13,24 @@ namespace MemoryBox.arScene.Scripts
*/
public class UserGps : MonoBehaviour
{
public GpSdata GpSdata;
public float Latitude = 52.52629f;
public float Longitude = 13.40061f;
private Boolean _gpsStarted;
private GpSdata _gpSdata;
private GpSdata GpSdata
{
get { return _gpSdata; }
set
{
_gpSdata = value;
Longitude = _gpSdata.Longitude;
Latitude = _gpSdata.Latitude;
}
}
public Camera MainCamera; // thought was to move the objects relative to the camera orientation
private bool _gpsStarted;
internal List<Memstone> MemoryObjects = new List<Memstone>(); // list of objects that need gps updates
private readonly LocationService _locationService = new LocationService();
......@@ -25,21 +41,52 @@ namespace MemoryBox.arScene.Scripts
{
_gpsStarted = StartGps();
InvokeRepeating("_startGPS", 30f, 30f);
GpSdata = new GpSdata(52.52623f, 13.40068f, 0); // fake gps
GpSdata = new GpSdata(Latitude, Longitude, 0); // fake gps @cluster
UpdateGps(true);
}
// Update is called once per frame
void Update () {
if (SystemInfo.supportsLocationService)
{
UpdateGps(); // todo maybe don't do this every frame - InvokeRepeating maybe? depending on how annoying this is
}
else
{
// keyboard controls
var newLocation = GpSdata;
const float unit = 0.00001f;
// keyboard movement not tied to camera rotation
if (Input.GetKey("w"))
{
newLocation.Latitude += unit;
}
if (Input.GetKey("s"))
{
newLocation.Latitude -= unit;
}
if (Input.GetKey("a"))
{
newLocation.Longitude += unit;
}
if (Input.GetKey("d"))
{
newLocation.Longitude -= unit;
}
UpdateGps(newLocation);
}
}
private void _startGPS()
{
_gpsStarted = StartGps();
}
Boolean StartGps()
private bool StartGps()
{
Input.location.Start(1f,0.1f);
var maxWait = 20;
......@@ -81,6 +128,19 @@ namespace MemoryBox.arScene.Scripts
GpSdata prevLocation = GpSdata;
GpSdata = GetLocationInfo();
if (notifyObservers && !prevLocation.Equals(GpSdata) || force)
{
NotifyObservers();
}
}
public void UpdateGps(GpSdata newLocation)
{
GpSdata = newLocation;
NotifyObservers();
}
public void NotifyObservers()
{
// notify observers if wanted and location has changed
foreach (var memoryObject in MemoryObjects)
......@@ -88,15 +148,13 @@ namespace MemoryBox.arScene.Scripts
memoryObject.UpdatePosition(GpSdata);
}
}
}
}
public struct GpSdata
{
public readonly float Latitude;
public readonly float Longitude;
public readonly float Altitude;
public float Latitude;
public float Longitude;
public float Altitude;
public GpSdata(float latitude, float longitude, float altitude)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment