unity load equirectangular into texture from StreamingAssets
I have images taken on a Ricoh Theta s that outputs equirectangular jpeg files. If I drag these into Unity manually and apply to a material/texture they appear in my photosphere perfectly.
However I need to dynamically load them and so am using StreamingAssets but all I get is a purple texture even though manually Unity displays the same image correctly.
Once I have obtained the image file and it is in www.texture is there some other setting I need to apply to make the image import/display correctly?
Thanks
I have the same exact issue with android as my build target. I've been looking around endlessly, trying to see if there is a different format, or if it is a size issue. Importing the www.texture for some reason only works when building to WebGL for me. The Theta S's images are over 5k width and 2k height. And I read somewhere that Unity has a 4k limitation. But I have yet to find a way to set the texture to read/writable so I can scale it down to test my theory. So, if you find out anything, please update, it would be very much appreciated. And if you need any more information from me, I will be more than willing to tell you my scenario to see if we can pinpoint a source.
Good luck.
Yeah was thinking was it a size thing, but the fact when dragging the same image into the project manually Unity obviously knows how to handle it so surely there must be a way to apply the same technique to the image when loading from the strea$$anonymous$$gassets via www
Doing my head in, surely there is a way to do this?
Interesting, I resized the image from the Ricoh from 5376x2688 to 4096x2048 and it works!
Looks like it is size related, even though the editor says max size 8192...but maybe I am misunderstanding that.
But for now I have it working like this once the image is in www
Texture2D texture = new Texture2D(5376, 2688, TextureFormat.DXT5,true);
www.LoadImageIntoTexture (texture);
photoSphere.GetComponent<Renderer> ().material.mainTexture = texture;
EDIT> using the same size as original image works so looks like it may be the mipmap true setting that resolves it?
Answer by NickHobgood · Apr 09, 2016 at 08:39 PM
@elpuerco63 - Greetings ! I am researching on how to make a tour such as this one https://round.me/tour/13074/view/32334/ in Unity and I noticed your post on uploading equirectangular photos. Before I invest in learning how to use Unity, I would like to know if you have experience in doing this. Thanks much - Nick
I have developed an app that dynamically loads images and video from the Ricoh Theta s camera and have placed targets inside the sphere that are actioned by gaze.
$$anonymous$$y app is a VR one that runs on Android and iOS not in a web browser as I develop for mobiles.
Sounds great. Will it take any equirectangular photos ? Is the app out yet on Google Play ?
Thanks Nick
this is the camera I have which I use to import pictures and video from: link text
The app is a demonstrator that I created for work, so not not on any Store.
Your answer

Follow this Question
Related Questions
getfiles() works in editor but not in the Game Build 0 Answers
How can I have access to the variables of a script in the StreamingsAssets folder ? 0 Answers
IOS crashing on UnityWebRequest calls 1 Answer
Loading .mp3 files from StreamingAssets folder to Application 0 Answers
Why it is impossible to create an asset in "StreamingAsset" folder? 0 Answers