Transparent Textures-Plants

Started by jammarman, March 23, 2016, 07:28:01 AM

Previous topic - Next topic

jammarman

I have been having trouble making exporting a model of a tree that contains faces textured with a transparent branch/leaf texture
I want to export my tree and have the branches opaque and the background transparent however despite my best efforts it always ends up with a white background inside source. I have almost given up so I decided to ask here. If somebody could post a simple step by step of everything that I need to do to make sure my transparent texture displays correctly that would be great.

Also I have been unable to get reflective materials working on any of my models. Could someone explain what parameters I need to enable in the material to get both specular textures, as well as shiny textures that reflect a cube map to work. As in a texture that is shiny like a clean metal texture, that reflects the cubemap on all pixels, as well as a texture that has specular and only reflects the specular map.(I'm not sure if I am even understanding this much correctly).

I am asking a lot but I really am lost, any help would be much appreciated.
Thanks :)

Joris Ceoen

About your transparancy, it's really easy but you gotta know how it works.

If you have a translucent material on any of your models, make sure that the bitmap that is now in the diffuse slot is also tied to the opacity slot. This way when exporting Wall Worm will detect that your model needs to be transparant, and it will automatically add the $translucent "1" parameter to the VMT file of the VTF. Then, when exporting the VTF file (your actual texture file), make sure to select it to export with DXT5, DXT1 does not support transluceny, DXT3 and DXT5 do.

I will elaborate on this further when I'm done with dinner!

func_Mathias

I don't know yet if wall worm has settings for adding cubemaps but I'll give you the perameters so you can try it until we figure out anyway.
The text after // is an explanation.

$envmap "env_cubemap" //Tells the texture what cubemap to use, "env_cubemap" means the ones closest to it in the level, but you can have a path to another file here.
$envmaptint "[.5  .5  .5]" //This lets you either adjust the visibility where 1 is visible and 0 is not, each of the tree values represents a color so making them uneven will tint the reflection.
$envmapmask   "models/your_mask" //This is where you can use your specular texture to make some parts of the model reflect more than others.

And of course if you wanna read up on it yourself (theres more) heres a link to the wiki:
https://developer.valvesoftware.com/wiki/$envmap#Additional_Parameters

wallworm

#3
For transparency, the process needed is dependent on a global ww setting in the material settings (see this hint on the global transparency settings). And there is the following video:

https://www.youtube.com/watch?v=WnmEWVo7k18

Cube maps are added to VMTs if you have a specular level bitmap or have turned on the Reflective checkbox in the material. For more advanced settings, you need to add the WW material settings by selecting the object with the materials and clicking Wall Worm > Wall Worm Materials > Give Obj Mats WW Materials. Now there are extra settings in the material, including various cubemap settings.

If your material is for a MODEL (VertexLitGeneric) and has a normal map with the specular map, you must save the specular map in the alpha channel of the normal map texture (or other textures). You can accomplish this with Alpha Spec. For many models, this will work just fine. But you may find that the normal map is darker than you expect when using this, so if the texture it produces isn't exactly what you need, you may need to edit it manually in a bitmap editor like Photo-Paint or Gimp.

SMF spam blocked by CleanTalk