Search Unity

Cubemap Maker

Discussion in 'Assets and Asset Store' started by FlaSh-G, Feb 11, 2011.

  1. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    You need a cubemap?
    You don't have Unity Pro?

    Here's something for you: The extremely simple Cubemap Maker.
    Get the Package, place the prefab, start the game, hit F12 - done.
    You now have a cubemap in your Assets.

    Demo Video:


    Download it here, for free, of course.

    Constructive criticism is considered appreciateable.

    UPDATE: v1.1
    - Added Camera Options (optional Background color and Far Clipping)
    - Minor InspectorGUI changes
     
    Last edited: Feb 16, 2011
  2. 2dfxman1

    2dfxman1

    Joined:
    Oct 6, 2010
    Posts:
    1,065
    Is useful. Thanks
     
  3. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    676
    Very useful...thank you!
     
  4. drazil austin

    drazil austin

    Joined:
    Dec 16, 2009
    Posts:
    236
    its really usefull. though i would like to suggest offering a bit more controles like i cant figure out how to set a background color other than the default blue background or setting a skybox (which is what i would be using this for anyway)
     
  5. bgivenb

    bgivenb

    Joined:
    Sep 15, 2010
    Posts:
    449
    Doesn't work in 2.6 ( it gives the error: Unknown identifier: 'AssetDatabase')
    Is there a workaround?
     
  6. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    Yeah, I could add control over the properties of the spawned camera.
    I'll do this when I find the time.

    I don't know. Try to find out how one could save things into the Assets folder in 2.6 and replace the AssetDatabase-line with that.
    I'm not going to do a 2.6 version, sorry.
     
  7. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    Version 1.1 is out.

    You may now set some Camera Options - an optional Background color and the Far Clipping Plane.

    Btw, to use a skybox, simply use the Render Settings for it - it will be Rendered by any Camera then - including the Cubemap Maker Camera.
     
    Last edited: Feb 16, 2011
  8. bgivenb

    bgivenb

    Joined:
    Sep 15, 2010
    Posts:
    449
    If I figure it out, ill be sure to let you know how I did it.
     
    Last edited: May 6, 2014
  9. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    Thanks! I'll have a look then.
     
  10. MarkPixel

    MarkPixel

    Joined:
    Apr 15, 2010
    Posts:
    39
    Dank Dir! :)
     
  11. alletsator

    alletsator

    Joined:
    Apr 11, 2009
    Posts:
    3
    Wonderfull! Great idea. Danke!
     
  12. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,736
    Awesome - now I don't need to finish my own sloppy scripting job any more ;) :p

    Seriously: thanks :)
     
  13. kinetiknz

    kinetiknz

    Joined:
    May 5, 2010
    Posts:
    173
    Hi, I see it's gone from your site. I can't find it on the asset store. Is it redundant now?
    Thanks
     
  14. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    I wanted to upload it to the Asset Store but I'm not willing to reinstall Unity 3.4.x for it, so I reuploaded it to my site.

    Have fun!
     
  15. moctezumagames

    moctezumagames

    Joined:
    Jun 9, 2009
    Posts:
    395
    checking, looks really interesting.
     
  16. kinetiknz

    kinetiknz

    Joined:
    May 5, 2010
    Posts:
    173
    Thanks a bunch Flash. I'll try it out on the 3.5 dev release.
     
  17. moctezumagames

    moctezumagames

    Joined:
    Jun 9, 2009
    Posts:
    395
    Checked. It's awesome. Must have IMO
     
  18. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    Thanks :)

    Let me know if you have any suggestions to make it better!
     
  19. Loard

    Loard

    Joined:
    Oct 5, 2010
    Posts:
    14
    Awesome!!! incredibly useful
     
  20. felix7991

    felix7991

    Joined:
    Sep 5, 2010
    Posts:
    1
    Thanx for the tool! It works great!

    I have question: Where are the individual generated image files stored? I couldn't find them in my project. I wanted to bring those files into photoshop to tune.

    Cheers
     
  21. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    They're not, since that isn't needed to generate the cubemap and storing the six images would be redundant.
    Fine tuning is a good idea though - I'll implement something for that if I find the time.
     
  22. Chyna

    Chyna

    Joined:
    Apr 26, 2013
    Posts:
    1
    Thank you very much!!!!!!!!!!!! very very useful... :) Rahmat
     
  23. Foxxya

    Foxxya

    Joined:
    Apr 23, 2013
    Posts:
    2
    Awesome and really fast.
    I have try it with an interior room.
    Work fine to make cubemap, but the cubemap reflection tecnique on extensive area have some angle deformation (work without angle deformation only on the point where prefab make the cubemap).
    I have also a little pixelled curved line into reflected wall, but probably this this is due to low bitrare of image into maps.
     
  24. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    732
    you can get rid of the dodgy edges, by not using compressed textures.
     
  25. Sillan

    Sillan

    Joined:
    Feb 12, 2013
    Posts:
    2
    I have no criticism, you have made an excellent tool that does a perfect job! Thankyou very much for allowing us to download it for free.
    You're awesome.
     
  26. bgivenb

    bgivenb

    Joined:
    Sep 15, 2010
    Posts:
    449
    Three years later and I still use this thing. Thanks again :)
     
  27. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    732
    I still use it too :)
     
  28. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,869
    @FlaSh.G: Happen to still be around? mind if I use parts of this for a lighting system? :)
     
    Last edited: Sep 11, 2014
  29. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    Feel free to use it any way you want (as long as you don't sell my code ;)).
     
  30. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,869
    @FlaSh.G: Cool! good to see you still visit your old theads!

    Once I finish the system for my game, I might as well showcase it here once it's done. Also, a bit off-topic, but... who's up for better shadow attenuation? :p
     
  31. TheShadyColombian

    TheShadyColombian

    Joined:
    Jun 24, 2014
    Posts:
    6
    Great, Dude! thanks
     
  32. TheShadyColombian

    TheShadyColombian

    Joined:
    Jun 24, 2014
    Posts:
    6
    but it's ok if i use it in a game i'll sell, right (the generated cube map, not the cube map generator)
     
  33. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    Yes, you may use the generated Cubemaps any way you like.
     
  34. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,869
    @_xXJuanXx_:
    This also makes sense, because technically, the only element you really need is the cubemap, this is just the tool that generates them! :) Just don't accidentally include this with some asset you built, and it should be all good! ;)
     
  35. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,869
    Oh, and I can also add the option of saving cubemap images: I actually built this feature into your code, as I was sick of Unity littering my console with IndexOutOfRage exceptions! (This is because your script generates the images, but the images aren't actually saved, and this means Unity just starts winching every time I select a cubemap... :D)

    And such a feature would come in handy for when you need to blur the images for Diffuse IBL maps! ;)
     
  36. inianbharathi

    inianbharathi

    Joined:
    Sep 26, 2013
    Posts:
    6
    ;);):)thanks man great work!
     
  37. ytaha

    ytaha

    Joined:
    Mar 21, 2015
    Posts:
    6
    Why my skybox seems to be black?
    What am I doing wrong?
     
  38. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    I just tested the tool with Unity 5, and it works fine. Can you maybe upload a screenshot that shows both the position of the Cubemap Maker in the Scene and its settings in the inspector?
     
  39. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    732
    Do you have a camera in the scene ? do you have a light ?
     
  40. creatlore

    creatlore

    Joined:
    Jul 14, 2015
    Posts:
    26
    Using unity 5 pressing F12 and nothing is happening, any ideas?
     
  41. creatlore

    creatlore

    Joined:
    Jul 14, 2015
    Posts:
    26
    Never mind I actually the problem out but now Im wondering where I can find the image location after it creates the cube map?
     
  42. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,869
    Do you mean the images of the cubemap or the cubemap itself? Either way, it should be in the folder "CreatedCubemap"

    If you want a version that also saves the images (say, you want to use the cubemap with the skybox shader that takes separate textures) I might be able to dig out the one I modified for that purpose.

    EDIT: I can also upload the snippet I modified, and FlaSh.G could integrate it. :) Not sure if Unity 5 had the same annoying errors like what I got before.

    EDIT2: Corrected OP's name... :D
     
  43. creatlore

    creatlore

    Joined:
    Jul 14, 2015
    Posts:
    26
    Yes that would be great if I could get the modified version which also saves the images. :)
    In addition I am relatively new to unity 5 and Unity itself but I am having issues with creating lightmaps in my scene. Is this a known thing for bugs because from what Ive read it seems like many are having problems?
     
  44. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,869
    What sort of lightmap issues are you having?
     
  45. creatlore

    creatlore

    Joined:
    Jul 14, 2015
    Posts:
    26
    When I assign the object to static it acts like its baking something out but when it finishes the bake it says there are no directional lightmaps and many maps ao things like that are just missing?
     
  46. ritterli

    ritterli

    Joined:
    Jul 14, 2017
    Posts:
    3
    I tried to create a cubemap, but without success :-(
    1. I downloaded the package
    2. imported it in Asset Folder -> Folder CubemapMaker is created
    3. Then I don't know exactly what to do?

    -> I placed the cubemapMaker.prefab in the Scene Window
    -> Then I placed a 360 degree image into Source Folder
    -> Then I pressed play and F12

    but there was no Folder created with CubemapMaker/CreatedCubemap and a cubemap. What I am doing wrong.

    Would you be so kind and describe me the steps to do? I do not understand the video.

    I am using unity 5.6 (downloaded last week, I am new to unity)

    Thanks a lot!
     
  47. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    The script doesn't create a folder, it seems. In the first option of the script, chose a folder that exists already.
     
  48. ritterli

    ritterli

    Joined:
    Jul 14, 2017
    Posts:
    3
    Thanks for the hint! I created now manually the folder "CreatedCubemap". Now it generates a file named "CreatedCubemap". I pressed play and F12 and then the message: "Display 1 No cameras rendering" appeared.

    So I added a camera to the hierarchy and tried again. But the created cubemap.cubemap is only a blue circle in front of a black background. What I am doing wrong? Do I need to put the photosphere-image on an Gameobject or somewhere else? It would be very great to get this running, I would invite you for a pizza!
     
  49. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    194
    You can ignore the message. The script turns off all other cameras and then doesn't turn them back on afterwards.

    I just ran the script and the results were as expected. I'm not sure why you seem to have a wrong result. It should kinda look like this:
    Cubemap.png

    To use it, you need a shader that actually works with cubemaps. These are a bit harder to find these days, since from today's point of view, this tool creates "legacy cubemaps". For most purposes, you now use reflection probes. One of the shaders that still use legacy cubemaps would be Skybox/Cubemap.
     
  50. ritterli

    ritterli

    Joined:
    Jul 14, 2017
    Posts:
    3
    Now it works and thanks a lot for this great tool. If you like, I would give you a donation for the great tool, just send me your E-Mail!