Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Pages: [1] 2

Author Topic: PLEASE Somebody help "alpha_masked"  (Read 17228 times)

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
PLEASE Somebody help "alpha_masked"
« on: November 08, 2014, 08:20:48 pm »

Hi!

Need help, please. I need to make some holes in a material. I have read the manual (Material definition, Textures notes and Material parameters), and I can't figure it out.


So far I have been able to use opacity texture, with


-   "text_opacity" : "x" where x = DDS texture, no alpha channel, (works fine whether compressed in DTX5 or ATI1).
-   "color" : "1.0,1.0,1.0,0.99",


Since "0.99" makes all the material a bit transparent, I can't use it to make just holes.


I have tried

-   "color" : "1.0,1.0,1.0,1.0",
-   "alpha_masked" : true,
-   "tex_albedo" : "x" where x = DDS texture, with alpha channel, compressed in DTX5 (I saw your trees textures have this format).



But nothing happens. Whether alpha channel pixel is black or white, there is no transparency.

________________________________

Also found this

"The alpha masked geometry isn't supported yet, but you can use standard transparency for now.

Code: [Select]

{
   "name" : "transparent",
   "diffuse" : "255,255,255,0",
   "Ax" : "0.04",
   "Ay" : "0.04",
   "m" : "0.2",
   "tex_diffuse" : "diffuse.dds",
   "tex_normal" : "",
   "tex_env" : "",
   "tex_opacity" : "opacity.dds" //< has to be ATI1 format in DDS it's alpha only"




But using 0 in diffuse (guess is "color"), make my model almost invisible.


I would appreciate any help.
« Last Edit: November 09, 2014, 08:37:50 pm by KW71 »
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

theshanergy

  • Member
  • **
  • Posts: 69
Re: Help "alpha_masked"
« Reply #1 on: November 08, 2014, 11:06:03 pm »

probably not the answer you're looking for, but why not just put holes in the model itself?
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: Help "alpha_masked"
« Reply #2 on: November 08, 2014, 11:13:24 pm »

probably not the answer you're looking for, but why not just put holes in the model itself?

Too many holes!!! Six triangles would become hundreds, if not over a thousand. I would rather use this polygons detailing something else.
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

zzz

  • Sr. Member
  • ****
  • Posts: 266
  • newbie
Re: PLEASE Somebody help "alpha_masked"
« Reply #3 on: November 10, 2014, 07:26:20 am »

You'll need to split the texture into 1 that is the opaque parts and 1 that is the transparent parts. The transparent texture will get its own entry in the mtl file.

Alternatively if the transparent parts line up over polygons you can use a 3d editor to highlight the polygons that will be transparent and separate them, then apply the same texture this new second group. It'll also have its own mtl entry.
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: PLEASE Somebody help "alpha_masked"
« Reply #4 on: November 10, 2014, 07:38:17 am »

You'll need to split the texture into 1 that is the opaque parts and 1 that is the transparent parts. The transparent texture will get its own entry in the mtl file.

Alternatively if the transparent parts line up over polygons you can use a 3d editor to highlight the polygons that will be transparent and separate them, then apply the same texture this new second group. It'll also have its own mtl entry.

 Thats kinda a bad thing for textures like a rost-riddled barrel - also, dirty windows would be a pain this way ...
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: PLEASE Somebody help "alpha_masked"
« Reply #5 on: November 10, 2014, 10:00:50 am »

You'll need to split the texture into 1 that is the opaque parts and 1 that is the transparent parts. The transparent texture will get its own entry in the mtl file.

Alternatively if the transparent parts line up over polygons you can use a 3d editor to highlight the polygons that will be transparent and separate them, then apply the same texture this new second group. It'll also have its own mtl entry.

Thanks for the answer!

What if all the polygons have visible and  invisible pixels?... Let's say, for example, I have a tree made of two planes  intersected at 90°.

If I  use a texture with alpha channel (This, I guess, would be the equivalent to "opacity mask" in UDK):

-   "color" : "1.0,1.0,1.0,1.0",
-  "alpha_masked" : true,

Nothing happen. There is no transparency.


If take the alpha channel in a separate texture, and use it like this:

-   "color" : "1.0,1.0,1.0,1.0",
-   "text_opacity" : "tree_transparency.dds",

Also nothing happen. There is no transparency.


If I change this value

-   "color" : "1.0,1.0,1.0,0.99",
-   "text_opacity" : "tree_transparency.dds",

The black pixels of the opacity texture becomes invisible, but also the white pixels are a little  transparents. I can see trough trunk and branches.
[/size]

Thanks for your time and support!
« Last Edit: November 10, 2014, 10:09:02 am by KW71 »
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

zzz

  • Sr. Member
  • ****
  • Posts: 266
  • newbie
Re: PLEASE Somebody help "alpha_masked"
« Reply #6 on: November 10, 2014, 10:06:01 am »

As far as I'm aware, the only functioning transparency setting atm is the setting you highlighted in red, which will apply a uniform transparency to the object that mtl entry applies to.
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: PLEASE Somebody help "alpha_masked"
« Reply #7 on: November 10, 2014, 10:17:18 am »

I'll try to do what you said before, splitting sections.

Thank you very much, ZZZ!
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: PLEASE Somebody help "alpha_masked"
« Reply #8 on: November 10, 2014, 02:54:22 pm »

Just use  "color" : "1.0,1.0,1.0,0.999",

and you shouldn't percieve any transparency in the white area of your opacity texture.
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: PLEASE Somebody help "alpha_masked"
« Reply #9 on: November 10, 2014, 10:14:01 pm »

Just use  "color" : "1.0,1.0,1.0,0.999",

and you shouldn't percieve any transparency in the white area of your opacity texture.

I have tried that, but the problem is still there. Here are my tests.

http://forum.outerra.com/index.php?topic=3035.msg32232#msg32232

In the end I need alpha masked, because transparency cast no shadows. I guess is possible, because trees are using this method.
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: PLEASE Somebody help "alpha_masked"
« Reply #10 on: November 10, 2014, 11:23:38 pm »

which 3d software did you use to make it and which importer, collada or fbx? Ive seen similar weird rendering with sketchup model imported through collada importer.
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: PLEASE Somebody help "alpha_masked"
« Reply #11 on: November 11, 2014, 12:23:36 am »

FBX. But the behavior seams right as long as I keep separate meshes when transparency is used, and don't use the same transparency material for two objects, one inside another.

As far as I can see:
- Transparency is fine.
- Alpha masked is not working.
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: PLEASE Somebody help "alpha_masked"
« Reply #12 on: November 12, 2014, 11:25:17 am »

Hi guys I just checked there a few bugs in material rendering. Fixing now...
Logged

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: PLEASE Somebody help "alpha_masked"
« Reply #13 on: November 12, 2014, 11:41:43 am »

Just made a quick test of my own on a single mesh with a 100% white opacity texture.
 "color" : "1.0,1.0,1.0,.999",  and  "color" : "1.0,1.0,1.0,1.0",

So looks like the engine cant tell what part is in front of which, on a single mesh when transparent.
and yes there's no shadow on transparent object even at .999
Logged

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: PLEASE Somebody help "alpha_masked"
« Reply #14 on: November 12, 2014, 11:54:31 am »

Transparency is WIP there more unfinished things in materials. We will improve it soon.
Logged
Pages: [1] 2