Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Major · Aug 15, 2015 at 05:00 PM · c#texture2drendertextureskyboxcubemap

RenderTexutre to Skybox

I have a render texture that is 6 times longer than it is high, and has a valid layout for a cubemap to use in a skybox. But it's a render texture and Unity will not allow me to use that texture as a cubemap for some reason that doesn't really make any sense since it is valid. Gives me the error:

RenderTexture.Create failed: cube maps must be power of two and width must match height.

So I am stuck. I can export the render texture by converting it to a Texture2D and then re-importing the PNG and setting that up as a cubemap with no problems. I would do this to solve my problem, if I didn't want the possibility of everything to be rendered in real time, and that it takes a very long time to do the conversion from rendertexture to texture2D.

So is there anyway that I can take my rendertexture the way it is, and use it as a cubemap straight from my script?

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 Luisdong · Nov 04, 2015 at 11:04 AM 0
Share

I got the same problem, really expecting someone give us a good answer

avatar image Morgenstern_1 · Aug 03, 2016 at 01:07 PM 0
Share

Sorry, I know this is an old question but did you ever find a solution? I'm about to attempt a very similar process.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by helarts · Nov 04, 2015 at 03:53 PM

You could try ( http://docs.unity3d.ru/ScriptReference/RenderTexture-isPowerOfTwo.html )

  myRT.isPowerOfTwo = true;

Also in unity's doc for RenderTexture.isCubemap: "A cubemap render texture must have the same width and height" ( http://docs.unity3d.com/ScriptReference/RenderTexture-isCubemap.html )

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 Major · Nov 05, 2015 at 03:07 AM 0
Share

Already tried. The render texture I am using is a 1aX6a where a is the resolution of each side of the skybox.

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

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Using Render Textures To Create a Cubemap 0 Answers

What is an element in CopyTexture ? 1 Answer

Multiple Cars not working 1 Answer

Rendertexture to texture2d in Unity5 0 Answers


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