Search Unity

Unity 5.3.3 Unable to render into cubemap, make sure it's marked as 'Readable'

Discussion in 'Scripting' started by dougdodd, Mar 8, 2016.

  1. dougdodd

    dougdodd

    Joined:
    Apr 18, 2014
    Posts:
    32
    I want to render custom cubemaps for some of my reflection probes. When I attempt to run the Wizard (http://docs.unity3d.com/ScriptReference/Camera.RenderToCubemap.html) and place an existing cubemap into the slot and click Render, I get the error:
    Unable to render into cubemap, make sure it's marked as 'Readable', and it fails

    How so I "make sure it's marked as 'Readable'"? I am on Windows 7 Unity 5.3.3 pro

    I duplicated an existing cubemap, so it would not be "in use", but I still get the error.

    Creating a new cubemap (in Wizard) doesn't fail, but I need to save it to be able to reuse it.
    Do I have to create a new cubemap and save it? How do I save it (in c#)?

    Seems like a configuration issue, but how do I fix this?

    BTW: my files are set for full access

    Thanks,
    Doug
     
  2. dougdodd

    dougdodd

    Joined:
    Apr 18, 2014
    Posts:
    32
    I was able to save my newly created Cubemap via c#. A bonus is I am able to set the readable flag on this one, so now I can use this one without causing the error that necessitated its creation. Irony. It appears that the format changed to Legacy Cubemap. In my newly created cubemap, I can see all six images:

    upload_2016-3-8_12-27-32.png

    Compared to using Unity generated cubemaps from existing reflection probes:
    upload_2016-3-8_12-29-44.png
    upload_2016-3-8_12-30-16.png

    Now I just assign this cubemap to my reflection probe and I have what I want.