Hints, tips and tutorials for 3D modelling & content creation
|
KatsBits
Creating 3D models, meshes &
game content
3D modelling & meshing, level editing and textures makingHints, tips and tutorials for 3D modelling & content creation [back]Making opacity maps for IMvuResources
ContentsIMvu & opacity maps - editing the .xsf material files ^Opacity maps are simple to set up but do require a bit of hand editing to make work with IMvu. Below is a 'raw' XSF file as output when exporting content via the various CAL 3D exporters. If an eventual IMvu product only needed a solid ('flat') texture be applied to a mesh then this is that would be needed in order for that flat texture to display on the mesh in the Previewer and Client. But, note the highlighted red text below, if the product needed some degree of transparency applied to it then those highlighted lines need to be changed. Raw .xsf material file as exported by Blender 2.36's CAL3D exporter, this is all you need to apply images to a mesh in order to 're-skin' it.
The amends that need to be done, shown below, make direct reference to the two textures that are needed for the opacity process to work correctly in IMvu;
Note the 'file path' shown below to the image assets (garden_sheet2.jpg), it indicates that the files are in the same directory as the rest of the project files; where ever possible all the working files should be in imvutools > previewer > examples. Corrected version for opacity maps <?xml version="1.0"?>
In the previewer, simply add the newly edited XSF file and then browse to where the texture assets are, once applied the 3D preview window should update with transparency applied relative to the textures used. Opacity maps, 'real world' examples ^
The first image below shows the most basic of opacity maps - a simple 'mask'. What you see is the basic principle involved in how opacity masks work in IMvu; white is opaque (can't be seen through) and black is fully transparent (can bee seen through and no trace of that part of the image will show up). So for a set of leaves for a tree where only the leaf mass is needed a corresponding 'mask' needs to be created to match what should be visible in IMvu and what shouldn't. ![]() A straightforward 'mask' type set of opacity images ![]() Resulting opacity mask in action on a tree - buy this item? The second image, shown below, illustrates the more complex nature of what can be done with opacity maps and the various levels and tones of grey that can be achieved between the extremes of 'black' and 'white'. As this is water it only needs to be semitransparent, that means using a mid-toned grey which results in the final water, as displayed in IMvu, as partly see through but not completely transparent. Adding the whiter 'caustics' pattern (the white random pattern that light refraction creates on what would be the waters surface) means areas of decreased transparency (less see-through) that follow the pattern made by the texture. ![]() Using levels of grey-scale tone to achieve varying degrees of transparency ![]() Resulting opacity map with levels of greyscale |