Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (alibaba, vicknick), 1,492 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Model Alpha Transparency & Skins #401620
05/22/12 18:06
05/22/12 18:06
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
I am creating a model with several parts I want to be transparent but I can't seem to get it looking right.
Any advice would be great.

This is what the skin looks like in photoshop:


This is what the alpha channel of the skin looks like in photoshop:


I save the texture with alpha channel, as 32 bit .TGA file (with no compression) and import into med.

This is what my model looks like in MED after applying the skin:


This is how the UV mapping looks like in the skin editor:


Just in case it is not clear, this is the structure of the UV mapping on the skin:


I load the cubes in sed like this:
Code:
FLOOR=ent_create("GrassCube.mdl",vector(x*32,y*32,z*32),NULL);
set(FLOOR,OVERLAY);



And this is what the final result looks like when I execute my code:


Why is the grass white instead of green?
I just can't seem to get this to work properly, so I have a few questions for anyone that can help me out or point me in the right direction:

Why is the grass color and transparency wrong in med and the skin editor (white squares)?
Why is the transparency correct when I execute my code but not in med (white grass)?
Why is color still wrong when I run my code? (It is getting the correct part of the skin because transparency is working correctly, but not the color)

Does anyone know what I am doing wrong?
Could it be my code, texture, file type, med modeling, or skin editor UV mapping?

Any advice would be great


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Model Alpha Transparency & Skins [Re: Carlos3DGS] #401625
05/22/12 18:57
05/22/12 18:57
Joined: Nov 2008
Posts: 216
J
jane Offline
Member
jane  Offline
Member
J

Joined: Nov 2008
Posts: 216
delete: set(FLOOR,OVERLAY);

.tga is automatically transparent

Re: Model Alpha Transparency & Skins [Re: jane] #401631
05/22/12 19:19
05/22/12 19:19
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
Originaly I had it withought the overlay flag, the grass appeared white also. I was also getting a wierd white box outline of the grass square withought the overlay flag.

This is what it looks like withought setting the OVERLAY flag:

(It is kinda hard to see, but look at the grass that is close but at the far right, and also the grass at the back, they all have a white outline square around the texture)

Also withought the overlay flag the grass can be seen through the cube when it is not supposed to:

(In the picture above the camera is below the dirt/grass cubes, but you can see the grass through them withought the overlay flag)

Anyone else know how to fix the white grass problem?

Last edited by Carlos3DGS; 05/22/12 19:28. Reason: additional info and pics regarding overlay flag

"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Model Alpha Transparency & Skins [Re: Carlos3DGS] #401632
05/22/12 19:23
05/22/12 19:23
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Something already wrong in the Skin Editor, if I understand correctly from the Alpha channel in photoshop, color of the grass in Skin Editor should be green!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Model Alpha Transparency & Skins [Re: 3run] #401652
05/22/12 22:30
05/22/12 22:30
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
Yup, the problem was med+skin editor... I had created the fake sprites manually in med using the face builder. Seems the skin editor dosn't like manually built faces from med.

I created a cube and merged vertexs to get a double sided flat square and this time it worked when UV mapping.
Thanks!



What I don't understand is why now some top parts of the grass are black (it changes depending on camera angle)... I don't use any shaders on this yet so I'm not sure if it's my fault due to something else?...


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Model Alpha Transparency & Skins [Re: Carlos3DGS] #401668
05/23/12 08:17
05/23/12 08:17
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
black things could be because of mipmaps, but if you use dds or checked mipmaps at skin settings then I don't know...


Free world editor for 3D Gamestudio: MapBuilder Editor

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1