Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: zzz on February 16, 2014, 08:32:30 am

Title: Opacity maps issue
Post by: zzz on February 16, 2014, 08:32:30 am
So, from reading the forums black is meant to be transparent and white is solid? Trying to make a transparent canopy and it still turns up solid grey. Texture is converted to BC4 before application.

Diffuse and opacity.

http://s2.postimg.org/d0twi3bbd/3gfi1_t1_d.jpg (http://s2.postimg.org/d0twi3bbd/3gfi1_t1_d.jpg)
http://s14.postimg.org/twx0xgon5/5gfi1_t1_d.jpg (http://s14.postimg.org/twx0xgon5/5gfi1_t1_d.jpg)

Tried removing the grey bit from the diffuse but no dice.
Title: Re: Opacity maps issue
Post by: angrypig on February 16, 2014, 01:54:58 pm
can you show me the mtl file? Btw you cannot combine opaque/transparent material in one mesh...
Title: Re: Opacity maps issue
Post by: zzz on February 16, 2014, 03:02:26 pm
{
   "version" : 512,
   "mats" : [
   {
      "name" : "_1_-_Default",
      "color" : "1.0,1.0,1.0,1.0",
      "f0" : ".04",
      "roughness" : ".12",
      "no_light" : false,
      "alpha_masked" : false,
      "tex_albedo" : "0_3gfi1_t1_d.dds",
      "tex_normal" : "",
      "tex_roughness" : "",
      "tex_opacity" : "tran2.dds",
      "tex_reflectance" : "",
      "tex_environment" : ""
   }]
Title: Re: Opacity maps issue
Post by: angrypig on February 16, 2014, 03:11:13 pm
As i wrote before you can't combine opaque and transparent material in one mesh, so you have to detach window triangles to separate mesh.
Title: Re: Opacity maps issue
Post by: zzz on February 16, 2014, 05:45:33 pm
ah, I see.
Title: Re: Opacity maps issue
Post by: zzz on February 18, 2014, 02:15:34 pm
had another go at it but same result:

Quote
{
   "version" : 512,
   "mats" : [
   {
      "name" : "_1_-_Default",
      "color" : ".725,.725,.725,1.0",
      "f0" : ".027",
      "roughness" : ".498",
      "no_light" : false,
      "alpha_masked" : false,
      "tex_albedo" : "0_3gfi1_t1_d.dds",
      "tex_normal" : "gfi1_t1_n.dds",
      "tex_roughness" : "",
      "tex_opacity" : "",
      "tex_reflectance" : "",
      "tex_environment" : ""
   },
   {
      "name" : "Material__2",
      "color" : ".725,.725,.725,1.0",
      "f0" : ".027",
      "roughness" : ".498",
      "no_light" : false,
      "alpha_masked" : false,
      "tex_albedo" : "",
      "tex_normal" : "",
      "tex_roughness" : "",
      "tex_opacity" : "trans.dds",
      "tex_reflectance" : "",
      "tex_environment" : ""
   }]
Title: Re: Opacity maps issue
Post by: angrypig on February 18, 2014, 03:16:54 pm
f0 should be ~0.04 for common materials and ~0.08 for glass. If you want to make material transparent you have to set the alpha value to less than 1.0. In your case the final alpha value is computed from 0.99 * alpha value from the texture.

example:

Code: [Select]
{
"name" : "glass",
"color" : ".725,.725,.725,.99",
"f0" : ".078",
"roughness" : "0.0",
"no_light" : false,
"alpha_masked" : false,
"tex_albedo" : "",
"tex_normal" : "",
"tex_roughness" : "",
"tex_opacity" : "trans.dds",
"tex_reflectance" : "",
"tex_environment" : ""
},
Title: Re: Opacity maps issue
Post by: zzz on February 18, 2014, 04:46:11 pm
Sorted.

(http://s21.postimg.org/kg7982prb/screen_1392759519.jpg)

I should probably make a Q&A thread.
Title: Re: Opacity maps issue
Post by: jonslynn on March 15, 2014, 10:40:05 am
I find the channel has no effect at all after testing.