Theta s photo in Unity StreamingAssets

The place to discuss development topics.
Discussions on the RICOH THETA API and SDK, image processing of spherical images, other hardware related topics, introduction of useful libraries, etc.

Theta s photo in Unity StreamingAssets

Postby piginhat » 22 Jan 2016, 15:12

I'm trying to dynamically load my photosphere images via the Unity StreamingAssests folder but all I am getting is a purple display?

If I use any other jpg or png the dynamic loading works as does dragging the a theta image manually into the material component of the photosphere.

Is there so other processing I am missing when dynamically loading the image as a texture into the photospheres material?
piginhat
 
Posts: 12
Joined: 29 Nov 2015, 14:20

Re: Theta s photo in Unity StreamingAssets

Postby piginhat » 24 Jan 2016, 18:10

I figured it out :-)

Code: Select all
 Texture2D texture = new Texture2D(5376, 2688, TextureFormat.DXT5,true);
 
 www.LoadImageIntoTexture (texture);
 
 photoSphere.GetComponent<Renderer> ().material.mainTexture = texture;
piginhat
 
Posts: 12
Joined: 29 Nov 2015, 14:20

Re: Theta s photo in Unity StreamingAssets

Postby codetricity » 28 Jan 2016, 15:19

Thanks for sharing this. I'll aggregate this into a central document. I've never used Unity before and it seems very popular with people on this forum. Why are people using Unity with the images? Is it to edit the image?
codetricity
 
Posts: 612
Joined: 31 Jul 2015, 01:56

Re: Theta s photo in Unity StreamingAssets

Postby piginhat » 30 Jan 2016, 13:50

"Why are people using Unity with the images? Is it to edit the image?"

I use Unity to create 3D VR and AR cross platform applications for Android and iOS. As I bought myself this awesome Theta s camera for myself, but also demonstrated to my colleagues at work, I want to create my own VR immersive app using images and video from the camera.

I am by rights a native iOS developer and so would go for using the SDK, but that is only in Obj-c rather than Swift (bummer) so have not yet looked much into it.

But as Unity is so powerful I can create some pretty cool apps in one go and target out to multiple platforms.

I'm currently working on a fully immersive AR/VR mixed app for which I need to load images and videos dynamically ;-)
piginhat
 
Posts: 12
Joined: 29 Nov 2015, 14:20


Return to Development



All times are UTC