Howto

From Code43 Urban Warefare Wiki wiki.code43.net

Jump to: navigation, search

HOW TOs - art division

Here you can find various art tutorials.


Cubemap strip from panoramic using PS and HDRshop v1.0

This is a basic tutorial on creating a standard 6 image cubemap from panoramic photograph - be it a sky or environment panorama!

You need:

Part I:

  • 1.) Make a 360° panoramic image (or get it from cgtextures.com). Search the web for info on creating panoramic images.
  • 2.) Open your panoramic image in image editing software (PhotoShop for example) select it with Rectangular Marquee Tool and copy it (Ctrl +C). Then create NEW canvas of appropriate size with transparent background. Paste your panoramic image in it.
  • 3.) GoTo: Image->Canvas Size (or press Ctrl+Alt+C); In Canvas size window tick Relative and in Height text box type a value that is a bit less than the original pixel height of the panoramic image (if image height is 2066px then type 2000px in the box). Press Ok.
  • 4.) Select Move tool (or press V) and move the image to top of the canvas. Make sure that you have Snap enabled (View->Snap)
  • 5.) Select Paint bucket tool, set tolerance to 1, then select a color similar to lower part of the panoramic image (hold Alt + click on the image)
  • 6.) Left click on the empty part of the canvas. Now you should have something like this:
  • 7.) Save the image (Not as JPEG!!!)

Part II:

  • 1.) Run HDRshop v1.0
  • 2.) Open your tweaked panoramic image (made using instructions in Part I)
  • 3.) GoTo: Image->Panorama->Panoramic Transform
  • 4.) In Source image box select Lattitude/Longitude Format; in Destination box select Cubic environment (Vertical cross) Format and 3072 (or any other size, take note that this number has to be 3 x skyshaderSize! For example: 3 x 1024 = 3072 or 3 x 2048 = 6144) width; then press OK
  • 5.) GoTo: Save As-> TGA; save it as YourSkyTextureName_cubemap.tga

Part III:

  • 1.) Open your brand newYourSkyTextureName.tga in PhotoShop
  • 2.) Create rulers on seams - like this: [[1]]
  • 3.) Make sure that the rulers are placed correctly! they should be 1024px (or other skyshader size! eg. 2048px for example) apart from each other!
  • 4.) Select Rectangular Marquee Tool and select, copy and paste on new 1024x1024px canvas each cubemap image (one by one), so that you will get 6 cubemap images. Name them accordingly (_forward, _back, _up, _down, _left, _right). Make double sure that your 6image cubemaps are precisely 1024x1024px big!
  • 5.) Optional - you can save the cubemaps as DDS cubemap file. Save them as nVidias horizontal strip
Personal tools