Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22

Thread: [APP] I dug up my old Lightmap extraction application for Mental Ray Lightmapping

  1. #1

    [APP] I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    Due to several requests, I decided to dig through some old back up disks and find that old lightmap extraction tool I started a long time ago and release it to the public. I never finished it. But its in a usable state. I was planning on adding the feature of extracting and placing scenery objects and such on the map for accurate texture baking, as well as setting the shader properties of each surface to reflect the actual bsp itself. I never got around to doing that, so all I have here is just a modded version of my bsp extractor that extracts the bsps with the UVs from the lightmaps.

    Its up to you to figure out what all you can do with this tool.

    Link to file

    Also, read the readme before asking anything.

    Quote Originally Posted by readme.txt
    Hek BSP lightmap extractor
    by Jahrain

    NOTE: THIS TOOL IS UNSUPPORTED AND INCOMPLETE.

    I am releasing due to several requests. What this does is extract the map BSP geometry from BSP tags with the lightmap UVs applied to them after radiosity has already been run. With this, you can import the geometry into an application such as Maya, or 3ds max and use the texture baking feature export your own lightmaps for a map. Lighting can be more customizable with this tool, as well as much high quality and resolution than HEK's radiosity.

    Instructions:

    Extraction:
    Load up your scenario_structure_bsp tag into the app via File -> open.

    Click Convert!

    Wait for it to finish processing the file, then save the .obj file.

    Lightmap baking:

    NOTE: I will not go into detailed instructions for this. I assume the user of this tool already knows how to use the texture baking feature of what ever application this will be baking lightmaps. If you don't know how, google for tutorials.

    First, load up your original lightmap bitmap tag in guerilla.

    Take note of each bitmap size and their index. The obj file is grouped according to its corresponding lightmap index. When you bake the lightmaps, you want the size of each lightmap bitmap to be consistently scaled. If the size of one of the original bitmap is 64x128, in the texture bake options, set it to that same size, or any proportional power of 2 size if you want higher resolution lightmaps. BE SURE TO USE A CONSISTENT SCALE FOR EACH BITMAP!!! Make sure each individual group has its own texture baking set and name them by their its size and lightmap index.

    Next, set up the lighting in the map to be consistent with your skybox. Add individual lights, or illuminated surfaces as well so that they may also emit light onto the map.

    Place any scenery models you have in the map onto the geometry as well so that they may cast shadows.

    Batch bake all your texture bake sets, then apply them to each surface to test how they look.

    Compiling bitmaps:

    Create a large blue (0,0,255 or 0000FF RGB color) sheet document in either mspaint of photoshop (just an empty document, with a pure blue background). Its size should be large enough to have each bitmap placed on the blue sheet with at least 2 pixels in between and around the edges. For example, if you have 4 bitmaps, each of 128x128, your blue sheet should be at least 524x132 to fit all of the bitmaps with a 2 pixel thick border.

    Next copy paste each bitmap file onto the blue sheet. Order them so that the top left most bitmap is the first index, and the bottom right most bitmap is the last index. IT IS VERY IMPORTANT THAT YOU ORDER THEM BY LIGHTMAP INDEX OR ELSE THEY WILL NOT BE APPLIED PROPERTLY TO YOUR BSP!!! Its best to just line the up vertically in on your blue sheet regardless of size. MAKE SURE EACH BITMAP HAS AT LEAST 2 PIXELS OF BLUE INBETWEEN AND AROUND THE BOARDER OF THE BLUE SHEET OR ELSE IT WILL NOT COMPILE PROPERLY!

    Save the blue sheet into what ever bitmaps folder you have for the map.
    Using tool, compile the bitmap. It should create a single bitmap, just like your lightmap bitmaps. You may want to use 16bit uncompressed for the format so you don't have lossy lightmaps. Also, set the usage to Lightmaps. Be sure to recompile the bitmap.

    Replace your old lightmap bitmap tag with your new one, or change the reference in the structure bsp tag.

    Load your map in sapien to test how it looks. If anything is off, back track until you find the issue. The most common mistake is not ordering your bitmaps properly in your blue sheet. Also, ensure that your bitmap count in the bitmap tag matches the old lightmap bitmap. If any is missing, that’s not good. If it crashes sapien, then you probably didn't compile it correctly. If most things look good, but there is a black jaggies or lines on the lightmap texture seams, go back to your baking options and enable color bleeding.


    I WILL NOT PROVIDE ANY FURTHER SUPPORT FOR THIS APPLICATION. DO NOT USE THIS TOOL OR METHOD FOR LIGHTMAPPING UNLESS YOU KNOW WHAT YOU ARE DOING!
    Reply With Quote

  2. #2
    Hates Sucky Comp >:( demonmaster3k's Avatar
    Join Date
    Sep 2006
    Posts
    434

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    idunno jahrain sounds nice, but doesn't this belong in the releases section?
    Reply With Quote

  3. #3

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    Oh yeah, forgot about that section... Anyways, I really wouldn't like to call this an official release. Its just something I dug up. If the mods see it necessary, it can be moved.
    Reply With Quote

  4. #4
    I LOVE mint tea! Bad Waffle's Avatar
    Join Date
    Sep 2006
    Location
    In my house, duh
    Posts
    2,285

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    i think i'll screw around with this tool. Thanks.
    Reply With Quote

  5. #5
    Kid in the Hall Kornman00's Avatar
    Join Date
    Sep 2006
    Location
    ◕‿◕, ┌( ಠ_ಠ)┘
    Posts
    3,126

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    moved w/ redirect
    Reply With Quote

  6. #6

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    Thank you!
    Reply With Quote

  7. #7
    chilango Con's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, BC, Canada
    Posts
    8,397

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    awesome, I was wondering what ever happened to this.
    Reply With Quote

  8. #8
    Senior Member
    Join Date
    Apr 2007
    Location
    Winsconsin
    Posts
    340

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    Oh goody. *happyface*
    Reply With Quote

  9. #9
    not my real name damn-it! kenney001's Avatar
    Join Date
    Feb 2007
    Posts
    1,054

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    this is exactly what I needed. +rep...
    Reply With Quote

  10. #10
    not my real name damn-it! kenney001's Avatar
    Join Date
    Feb 2007
    Posts
    1,054

    Re: I dug up my old Lightmap extraction application for Mental Ray Lightmapping

    I used texture baking for the first time, and within 20 minutes of downloading this:



    raytraced shadows.......this could be exciting to play with...
    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •