User Tools

Site Tools


hpl3:tutorials:material_translucent

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
hpl3:tutorials:material_translucent [2011/11/29 17:27]
thomas [Steps]
hpl3:tutorials:material_translucent [2011/11/29 20:07]
thomas [Steps]
Line 1: Line 1:
-====== ​DDS Texture Export ​======+====== ​Translucent Material ​======
  
 ===== Overview ===== ===== Overview =====
Line 20: Line 20:
 the "​.mat"​-file is generated by the modelviewer and is a solid material based upon the name of the diffuse texture (here "​transbox"​). Modelviewer can add further texture such as normalmaps, specular, etc if the files have the proper prefixes (for a list of those see [[hpl3:​engine:​materials#​solid_diffuse|here]]).\\ the "​.mat"​-file is generated by the modelviewer and is a solid material based upon the name of the diffuse texture (here "​transbox"​). Modelviewer can add further texture such as normalmaps, specular, etc if the files have the proper prefixes (for a list of those see [[hpl3:​engine:​materials#​solid_diffuse|here]]).\\
 The "​msh"​-file is a binary version of the dae file that is much faster to load. No need to worry about that one in this tutorial. The "​msh"​-file is a binary version of the dae file that is much faster to load. No need to worry about that one in this tutorial.
 +
  
 **2) Changing to translucent.**\\ **2) Changing to translucent.**\\
-Now open up MaterialEditor (leave modelviewer open) and open "​transbox.mat"​. Here change the type to "​translucent"​ and the blend mode to "​mul"​ (you can use other blend modes, but mul is often the best when dealing with translucent surfaces).+Now open up MaterialEditor (leave modelviewer open) and open "​transbox.mat"​. Here change the type to "​translucent"​ and the blend mode to "​mul"​ (you can use other blend modes, but mul is often the best when dealing with translucent surfaces).\\
 {{:​hpl3:​tutorials:​material_trans02.jpg?​direct&​300|}}\\ {{:​hpl3:​tutorials:​material_trans02.jpg?​direct&​300|}}\\
 Chose "​Save"​ in the file menu.\\ Chose "​Save"​ in the file menu.\\
-You can now simply task switch to the modelviewer (no need to close and open) and the changes will appear). +You can now simply task switch to the modelviewer (no need to close and open) and the changes will appear).\\ 
-{{:​hpl3:​tutorials:​material_trans03.jpg?​direct&​300|}}+{{:​hpl3:​tutorials:​material_trans03.jpg?​direct&​300|}}\\ 
  
 **3) Adding environment map.**\\ **3) Adding environment map.**\\
 +The material looks a bit more translucent,​ but there is still a lot more that can be done. The next thing is to add a cubemap that will form an environment map for the material.\\
 +
 +First of all a cubemap needs to be created and converted to the dds format. This is best done using ATI's CubeMapGen (found [[http://​developer.amd.com/​archive/​gpu/​cubemapgen/​pages/​default.aspx|here]]) or a similar tool. When creating the normal, just use some environment that looks sort of like what the object can be found in and blur it a lot (as long as it looks good in the modelviewer,​ it does not matter that much). When generating the cubemap it is very, very important to use a an edge fix, and to use an generator that can do this for mipmaps, or else there will be ugly visible lines in the seams between the six faces. Also make sure that the dds file contains mipmaps!\\
 +Cubemaps are placed in "​textures\environment"​ and NOT in the same folder as the dae, mat, etc files! This because one cubemap can be used for many different materials. Name the environment map like this: [environment]_env,​ eg: "​livingroom_env.dds"​\\
 +
 +Now in the MaterialEditor,​ add the cube map
  
hpl3/tutorials/material_translucent.txt · Last modified: 2011/11/29 21:21 by thomas