Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by GeeGeePee · Dec 05, 2014 at 08:39 PM · meshimagemappingpanorama

Mapping hi-resolution image to an object

Hello,

I'm developing for Android, but I'm total newbie in Unity and graphics. My final goal is to make a viewer for hi-res panoramic pictures in Unity. I was able to make it partly. I added a sphere with corresponding mesh, applied a material with my image and placed a camera in the center. It works, but it seems that Unity has a 4096-pixels limit on image size. I need to bypass it somehow.

Now my idea is to split an image to multiple smaller images and to map them separately on this spherical object. I dint't find the answer, but maybe I wasn't searching properly.

Can it be done? Or maybe there are another solutions? Could you help me and give an advice at least what direction should I look?

Thank you.

Edit: now I received the panorama image that I should map on the object. It's in two formats: cubic (split into 6 faces, and each of them then split into 16 fragments) and equirectangular (split into multiple fragments). Maybe it will be easier to map it on cube, and then map this cube on the sphere?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sessional · Dec 05, 2014 at 09:01 PM 0
Share

Try looking for UV mapping in a modeling tool. This is what allows you to specific the position of the vertex in the image that you wish to map it too. This will also let you map each sub mesh to its own image.

I don't know if this will have limits like the 4096px one.

avatar image GeeGeePee · Dec 06, 2014 at 04:01 PM 0
Share

O$$anonymous$$ thanks, now I think I understand what I need to do. I need to create my own mesh with submeshes for each panorama segment in some modeling tool and apply some UV mapping to it. But if I get it right, the UV-mapping algorithms should be different for each segment because of different shapes. Does the tool do it automatically or I need to program it by myself?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by SimonTS · Dec 06, 2014 at 04:53 PM

You'll probably want to use a skybox. By using a skybox you can use six textures, one for each side (up, down, left, right, forward, back), instead of only 1 on your custom object.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GeeGeePee · Dec 06, 2014 at 06:36 PM 0
Share

wow, thanks, it works well for cubic format. But is there a way to split each side of skybox to multiple images. For example if I want to implement zoom in the future and set different resolution to different zoom levels?

avatar image SimonTS · Dec 07, 2014 at 10:14 AM 0
Share

No, you can't split a skybox as far as i know.. You'll have to use a custom object in this case. You could use a cube and split each of its six sides into smaller squares (2x2, 3x3, etc.). Then you would apply a material/texture to each little square.

avatar image GeeGeePee · Dec 07, 2014 at 12:32 PM 0
Share

Ok thank you, and the last question I have: how to make custom cube object behave like skybox (I mean look like the sphere from the center)?

avatar image GeeGeePee · Dec 07, 2014 at 12:42 PM 0
Share

Ok, I think I found enough, thanks all again. But I think the cubic option is suitabl for me )

avatar image SimonTS · Dec 07, 2014 at 12:52 PM 0
Share

There are several possibilities, but applying a texture to a sphere or a smoothed cube can be difficult and will most likely look distorted.

You should research transfor$$anonymous$$g your panoramic image into cubemap format. $$anonymous$$ost programs that allow assembling panoramic images support multiple formats, and cubemap should be one of them. This results in either six individual images or one big image containing all six sides arranged in a cross.

Then just load the images into photoshop (or similar) and split them into smaller images, which are then used as textures on the split cube I mentioned above.

edit: Just saw your update to your question. You already seem to have the image in cubemap format with each side split into 16 fragments (4x4). All that is left to do is to create a cube with each of its sides split into 4x4 and then applying the individual fragments to their corresponding face of the cube in Unity. Then place the camera in the center of the cube.

avatar image
1

Answer by robertbu · Dec 05, 2014 at 09:54 PM

You have a couple of choices. You can split your sphere into sections and map a separate image into each section. I've done this. I split the sphere into two half spheres and use 4K x 4K images for each half sphere. I had some artifacts at the boundaries of each half sphere I never worked out but I was just playing and otherwise the approach worked fine.

The second choice is to use the WWW interface to load your images. You are not restricted to 4K x 4K for the images brought in by the WWW interface. They can be loaded either locally or from the web using this interface. I don't know if there is an upper limit, but I successfully brought in images of 4k by 8k and 6k x 12 k (panorama images are 1 : 2 ratio height/width).

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GeeGeePee · Dec 06, 2014 at 01:19 PM 0
Share

Thank you. But now I see in what format is this panorama image (updated my question) and it seems that I should work with the first approach. All these manipulations with object splitting etc. can be done in Unity or I should use modeling tools first?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Applying UV to plane mesh is pixel imperfect. 0 Answers

Mesh building changes in Unity 3.5.6 0 Answers

Make Mesh from Image (Alpha) 0 Answers

Plane pivot point creating 0 Answers

Script rendering Mesh to Image with transparent background 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges