transparent images - pdf tutorial made/posted by scott at

Upload: petrut2580

Post on 29-May-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    1/12

    Alpha Map Lesson

    I have to say first off, that materials in the Game Engine aren't exactly tied in with thmaterials for the normal Blender Modeling Mode...

    Example..

    Add a plane in Blender, facing along the Y-axis..

    Switch back to 'Object' mode.. then press 'F' to enter the 'UV Face Select Mode'...

    http://www.blender3dclub.com/
  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    2/12

    In the view port to the right, switch to 'UV Image Editor'. You'll see a blue squarerepresenting your plane. Click on 'Image, Open' and select an image that already ha

    an alpha map (IE. png, .tga formats can contain an alpha map within the same file).Alpha map, referring to an image with transparent parts.

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    3/12

    I need to rotate mine, so, I'll put my mouse cursor over my '3D View' window to theleft, and press 'R' until the image on my plane to the left, is facing the same directionas the image to the right in the "UV Image Edit" window. Click on 'UV Coordinates'when asked after pressing 'R'. Finally, in the 'Buttons' view port at the bottom, undethe 'Texture Face" tab, click the 'Alpha' button to make your plane transparent wherit should be based on the image's alpha map. Also, click 'Twosided' so your plane wishow the image on each side.

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    4/12

    Also, with the vertex color set on white, you may want to click 'set VertCol' so thetrue colors show on your plane.

    What we have above will work for a transparent game object, however, it won'trender correctly if we wish to use this in an image or animation. (Image Below)

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    5/12

    If we press 'P' to start the game, it looks great for a transparent object. (Below)

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    6/12

    To create a transparent image for rendering, we'll need to create a new Material forour Plane. With our plane selected, click the "Shading" button (or press 'F5') thenclick 'Add New' under the 'Link to Object' tab...

    Go over and click the 'Add New' under the Texture tab. Click the Textures button(F6), Texture Type, select image.. Go over to the 'Image Tab' which just has a loadbutton at this time and a scroll arrow. Click the scroll arrow and select your imagewhich should still be listed. If not, reload it by pressing the load button and findingyour file.

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    7/12

    Since the image were using contains it's own Alpha Map, simply click the 'Use Alphabutton under the 'Map Image' tab. Under the 'Preview Tab', click the 'Alpha' buttonto see a preview of your image with it's transparent background...

    Pressing 'F12' now for a quick render, you'll see we need to make a couple moreadjustments before we get the desired results...

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    8/12

    Click the "Material" button.

    Under the 'Map To' tab, make sure you have the 'Alpha' button pressed.

    Under the 'Material' tab, the bottom right slider bar is labeled 'A'. Scrolling over it,you'll see it stands for 'Alpha'. Sliding this down to 0, will allow the sky material toshow through our plane..

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    9/12

    The next button we need to push, is the 'Ztrans' button under the 'Links and Pipelinetab. This will allow everything else in our project to show through our plane...

    Pressing 'F12' now for a test render of our plane, will show our plane with the resultbelow...

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    10/12

    There's still 2 problems with our plane. First is, the slight shading where thetransparent parts of our image is. This can be corrected under the 'Shaders' tab.Slide the "Ref" slider all the way over to 1.0. Turn the "Spec" all the way down to0.00 and the "Hard" slider all the way down as well to 1.

    That takes care of our plane. The last problem we have to deal with is the fact thatthe shadow of our plane is still a square and not a shadow of our splatter image. Tofix this, we'll need to create a new material for our ground plane. Under the'Shaders' tab of our new material, press the 'TraShad' button to allow transparentshadows to be rendered on our ground plane. Any object that you wish to haveTransparent shadows rendered on will need to have this button pressed.

    Our final result looks like this.

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    11/12

    It is possible to achieve the result using 2 different images. For example, one colorimage of a brick wall and a second image, Black and White, black being thetransparent parts, white being the solid parts. Use this image as the alpha map foryour brick wall to add windows.

    Playing with these options some, you can easily create stain glass windows.

  • 8/9/2019 Transparent Images - PDF tutorial made/posted by Scott at http://www.tutorialized.com

    12/12

    It took me a long time to figure these out with blender. Hope this helps.

    Feel free to email me with any questions.

    Scott

    Blender3Dclub.com

    mailto:[email protected]://www.blender3dclub.com/http://www.blender3dclub.com/mailto:[email protected]