Blender game alpha texture




















I can't transparent it, but how do I use this for stuff in Blender Render mode? If it's possible can you tell me what I do with these kind of textures? Enable "Transparency" and turn the Alpha slider down to 0. This means at its most transparent it will have zero visibility. Set the Influence to be Alpha instead of Color. You'll probably want this slider to be at 1, since this controls the total transparency of the texture. If you lower it, even the opaque parts will become somewhat transparent.

Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Learn more. How to use an alpha map in Blender Render? Ask Question. Asked 4 years, 11 months ago. Active 4 years, 11 months ago. Viewed 7k times. Improve this question. Mentalist We could use any of the other channels in an image and tell Blender that we, for instance want to use the Red channel as alpha. But we are getting ahead of ourselves here.

These are the steps we follow to use an image with alpha transparency in Cycles. By the way, if you enjoy this article, I suggest that you look at my E-Book. It has helped many people learn Blender faster and deepen their knowledge in this fantastic software.

If you are interested in an overview of Eevees render settings you can find my guide here that covers most sections from shadows, indirect light to film settings where we find background transparency. Related content: A guide to Blender Eevee render settings.

Related content: Blender: A Cycles render settings guide. This is the final node setup. The key is to use the alpha output of the image texture as the factor, deciding what pixels in the image are transparent and what pixels are not. But the above solution is move universal and will work with other shaders as well. If you are new to nodes you may want to check out my beginners guide on how to create materials in Blender. To test that it works, make sure that you are in Cycles render engine and go to rendered preview mode using the button in the top right corner of the 3D viewport.

If at some point, your transparency becomes black, you probably have more transparent layers on top of each other than your Cycles render settings currently allows. To fix this go to the render tab and find the light path section.

Here you will find transparency bounces. By default, this is set to 8. This is how many transparent layers the ray will allow before it terminates and possibly render black. In certain situations, for instance in trees with leaves that has alpha around them, this may not be enough, and we may need many bounces for the tree to look realistic.

This is where you control this. The easiest way to check if an image has an alpha channel is by using the node wrangler add-on. Enable it by going to Edit and preferences. If you look in the 3D viewport and see both black and white areas it means that you have an alpha channel giving you transparency. When we are using Eevee, the shader setup is the same as when we are using Cycles. But since Eevee is a rasterized render engine it handles transparency a bit different.

By default, we don't have transparency enabled. Instead, we have to first choose the blend mode that we want to use. The blend mode is set on a per material basis. You can find it if you go to the material tab in the properties panel and open the settings section. Here you will see a dropdown labeled Blend mode and by default it is set to opaque. In Eevee we have something called "per object sorting".

This means that the object with its origin the furthest away from the camera will be drawn first. Note however that like most Game Settings options, Backface Culling is applied per-material , not per-face. In other words where culling or other Game Settings property is used, every surface assigned the respective material will take on that property.

Design note : because Backface Culling is applied per-material, in situations where the same texture is required to perform more than one role, where the application of a single texture is used for both single and double-sided assignments for example, an additional duplicate material will need to be created so one can be culled whilst the other can remain double-sided. In other words, it's no longer possible to assign this property to an individual surface face element as a distinct property apart from a Material, as was the case with Blender 2.

For more information on making two-sided meshes read click here. Activating " Backface Culling " forces Blender to draw images assigned to surfaces as single-sided only. In the case of transparency that would mean being able to see 'through' an object nothing appears on the inside. De-activating " Backface Culling " causes Blender to draw the same texture on the reverse side of a face so looking through an object, the inverted images will be seen through the mesh.

So far discussion relates to the use of bitmaps where the degree of surface transparency is determined exclusively by the tonal range of an accompanying alpha-channel component In instances where a more uniform appearance might be needed an alternative approach is to alter a Materials properties, by changing their respective " Alpha " value. Design note : in a nut shell the difference between the two approaches, using images versus materials, has the former facilitating more detailed transparency, they can be patterned, shaped etc.

To change Material alpha create a standard material and assign it to the mesh. This sets the Scene and Material basics. Next, changing transparency. To set a Materials global transparency rather than using an alpha-channel carrying bitmap, activate the " Transparency " property and change the associated " Alpha " value.

From here note the " Alpha: " property, currently at " 1. This single option changes the Materials overall transparency. Click and then drag or type a numerical value between " 0. Design note : "0. Changes to the Materials " Alpha " value directly reflects the transparency level of the material as assigned to an object.

Note that transparency is uniform and not subject to being influenced by the bitmaps alpha-channel when used in this way. In discussing transparency it should be noted there is a significant caveat to its use where objects and surfaces are seen through one another - surface 'B', being transparent, visible through surface 'A', also transparent etc.

Essentially the renderer or game engine cannot properly determine the hierarchical relationship between surface layers and how they are subsequently supposed to be drawn to screen, so a 'fight' for precedence occurs - objects and surfaces will flash, flicker or be appear improperly stacked as their order is incorrectly determined and rendered.

Design note : " sort order " is also referred to as " surface sorting ", " alpha sort ", " draw sort ", " draw order ", " render order ", " render sort ", and other such terms, depending on the exact context of the problem. Generally speaking however they all typically refer to the same basic underlying process used to work out the hierarchical order object surfaces are drawn to screen - calculating and rendering surface order is important because its the primary process used to render three-dimensional depth on a two dimensional surface monitor screen , i.

The solution to this problem is to 'sort' surfaces, to selectively force their render order using Blenders " Sort Mesh Elements " options. Design note : the flashing and flickering is similar to, but not to be confused with, typical " z-fighting ", another type of sort-order error which occurs for a slightly different reason - surface proximity. A simulation of what should be seen when multiple layers of transparency are drawn to screen correctly - any other suitably treated surface should be visible though others and drawn relative to their relationship with one another and how that then represents scene depth on screen.

To force sort order, in Edit mode make individual or group selections of vertexes, edges or faces and then press the " W " key to access " Specials " not otherwise currently accessible as a menu option from the 3D View Header.

From the list of options click " Selected " to assign the property. Design note : several aspects of this feature to note; 1 even though properly applied, Blender may continue to incorrectly render surfaces and their relative relationships to one another; 2 the exact order surfaces should be arranged is not always obvious so a certain degree of trail and error may be required; 3 the orientation of objects within a scene may also have an affect on sort order - whilst the hierarchy may be correct when looking at a scene front-on, it might not be when viewed from the side, and so on; 4 the feature may not be supported where content is to be used outside Blender; 5 sort order issues are not a problem specific to Blender but the way graphics processing generally handles transparency - the reason why it occurs in other 3D applications and games; 6 sort order issues in Blender tend to occur regardless as to whether transparency is based on the presence of bitmap alpha-channels or Blender generated material properties.

To access " Sort Mesh Elements ", in Edit mode with a selection made press the " W " key, the " Specials " menu appears, which is not otherwise accessible directly as a menu option. From the " Sort Mesh Elements " options, select " Selected " to force re-order surfaces; selection and application should be done in reverse order so 'front' faces should be selected last to ensure the render on top of previous selections.

For the former, " Texture Face ", this means image assigned directly to surfaces with alpha but not necessarily with an underlying Material. Design note : as with the above, although textures with alpha-channels can be applied directly without Materials, if treated items are to be exported for use in a game engine this may cause problems as there is usually an expectation of a proper Material assignment being present.

In the " File Browser " that appears choose an image with an accompanying alpha-channel component and click the " Open Image " button top-right to load. This applies the image to the selected surfaces but is not yet transparent. For that " Texture Face " properties need to be used. With a face selected click the " Editing " button " F9 " and find the " Texture Face " panel should be grouped with " UV Calculation " and " Multires ". Here a collection of properties and options are shown, including the " Active Face Alpha Blending Transp " subsection, which controls the way surfaces are displayed in the 3D View.

By default " Opaque " is selected. Design note : when viewed in " Textured " shading mode " Draw type: " , surfaces display white in the 3D View absent a Material or image assignment. To use the alpha-channel component of the UV mapped and assigned image, click either the " Alpha " or " Clip Alpha " button depending upon the desired outcome, i. Immediately upon doing this the selected surface in the 3D View will update to match the property set.

Design note : " Clip Alpha " interprets alpha-channel data as simple black and white stencil maps - tones colour other than 'white' are seen as 'black' and shown as clipped transparency. When textures with alpha-channels are applied directly to surfaces without Materials " Texture Face " properties are used to manage surface characteristics and the way transparency behaves - " Clip Alpha " clip mask , " Alpha ", " Opaque " etc. Where additional surfaces need to use the same property as another surface, make a group selection which includes the surface from which a particular property is to be copied, then click the " Copy " button in " Texture Face " properties.

The group will immediately update with the same property as the 'active' element the last selected face carrying the desired property. This is why Materials are used in combination with Texture Face properties - Materials are assigned to surfaces, textures to Materials, making the latter, when UV mapped, selectable based on the formers application.

Design note : Materials basically contain three individual components; a Material slot, a Texture slot and an Image block. Each can be used for different purposes inclusive of exclusive the other slots. So whilst there are many other reasons for using Materials, data management, i. If a Material is not available, click the " Material " properties button " F5 " for " Shading " properties and in the " Links and Pipeline " panel click the double-headed arrow under " Link to Object " and click " Add New ".

A new datablock will appear. Next click the " Texture " properties button to the right of Material properties. In the " Texture " panel click the double-headed arrow to select and available slot or create a new one. To the right, in the " Image " panel, click the " Load " button to open the " File Browser ".

Choose an image with alpha to assign then click " Open Image " top-right. Next the image needs to be assigned with an appropriate "Texture Face" property. Assigning an alpha-channelled image to the Texture properties of a Material, allowing better easier management of surfaces - image applied directly to objects via UV's without an associated Material reference have to be selected individually; they cannot be group selected by 'type' or assignment.

Whilst Edit mode is still active click the " Editing " properties button " F9 " and find the " Texture Face " panel. Here in the " Active Face Alpha Blending Transp " section click to activate either " Alpha " or " Clip Alpha " depending upon transparency requirements " Copy " to other faces as needed to complete the process.

Design note : it should be pointed out here that without the addition of Texture Face properties, the underlying Material won't display transparent. In essence the Material simply acts as a mean to select images mapped to the mesh, or for adding more complex properties - specular, emission etc.

With a Material assigned, associated surfaces are given a particular " Texture Face " property so when those surfaces are select, based on Material assignment, the alpha-channelled texture is also selected.

Transparency behaves differently depending upon the systems render, or "Game", mode. Using the default " Blender Multitexture Materials ", image alpha ostensibly controls it. In " Blender GLSL Materials " mode, which is required for material transparency, the aforementioned is controlled by a material alpha setting.



0コメント

  • 1000 / 1000