Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/26/24 12:45
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 958 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 7 1 2 3 4 5 6 7
Re: TGA problem with tree model [Re: Grimber] #65074
03/06/06 04:42
03/06/06 04:42
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Okay, I tried a couple of things. Since the leaves were upside down from the model you gave me, I opened the tga in Gimp and did a save as and set the origin for the lower left again. After I rebuilt my tree and imported it, the leaves were then the proper side up.

However, even with no actions attached, I still get that sorting problem. With the actions attached, the same thing, though the lighting on the leaves changes if I attach a material or not (with the material, no extra lighting, just ambient).

I have the shorter wiki script currently in my tree1.wdl. Tomorrow after work I'll try the longer script from the wiki and see if that makes a difference.

Just out of curiosity, what did you do to the tga to make it different? I noticed the size is larger, but I couldn't tell what else was done to it (other than the initial upside-down leaves). I'm new to using tga's...

Re: TGA problem with tree model [Re: Galen] #65075
03/06/06 14:33
03/06/06 14:33
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
i didn't change anything on the image other than made sure it had an alpha channel (in GIMP, adding it to the layer doesn't give the image an alpha transprency, you have to bring in a transprent layer under it as well then export as a tga)


your leaf image applied to a 4 poly flat model

i placed in 2 of them to check for sorting. worked fine


So here are some possible problems you might be having, that i can think of.....
your not actualy getting an alpha channel into your skin or not saving it as a 32 bit image
your tree models polygon faces have been inverted/flipped ( face inwards)
your setting some flag on your model that effects transparency ( overlay, transparent, flare...)
the models polygons are too small in many spots and may be being clipped ( not likely but can happen)

Re: TGA problem with tree model [Re: Grimber] #65076
03/06/06 16:22
03/06/06 16:22
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
Easy thing. Since alpha applied textures cannot be z-sorted the model's faces are drawn in the order the model is saved (face1, face2, ...).

a) Use the vegetation material from the wiki (which removes alpha transparency but corrects z-sorting)

b) create your model in a way that the front faces are created at the end. This one's tricky and not always possible. To work around this problem:

c) split your model up in multiple models.


Follow me on twitter
Re: TGA problem with tree model [Re: mk_1] #65077
03/06/06 23:48
03/06/06 23:48
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Okay, I have the vegetation code in my tree1.wdl script now. Unfortunately, that's not working either. I *really* don't want to chop my tree into a bunch of smaller models. In fact, my level has a fair number of tree models, and chopping them all down is going to be a major pain and a major time sink for a project I've been working on for over a year now already.

If there's any other way to get these tga alpha transparencies to work properly, please let me know.

I've uploaded a copy of my tree1.wdl script, and I've uploaded a copy of my full tree model as well. If anyone can get these to work properly, you'd be really helping me out a lot:

Tree script and model-- .rar

Again, I'm viewing these in "preview mode". if there's a difference between that and the full "built" mode in terms of what I may be seeing with the sorting, please let me know--maybe this is actually working and I'm just not seeing it properly, but when I get close to each tree, I can see the messed-up sorting. I can't really do a full "build", as I'm really new to scripting, and I'm just using the default template (and I don't think it's loading my level properly), thus the preview mode.

Re: TGA problem with tree model [Re: Galen] #65078
03/07/06 01:01
03/07/06 01:01
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
I tried your tree, without the script. I don;t think its a sort issue. I think its how the model is built. Im thinking its got too many leaf clusters/panels. Ive seen if you over do it with duplicate leaf panels that it eventualy starts clipping them

tree is kinda heavy too. getting a serious drop in frame rate with even 1 tree ( 80-90 frames down to 7-8 frames)

Re: TGA problem with tree model [Re: Grimber] #65079
03/07/06 01:21
03/07/06 01:21
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Thank you for taking a look at that.

I'm going to try a tree with fewer leaf clusters and polys and I'll report back here.

Re: TGA problem with tree model [Re: Galen] #65080
03/07/06 01:35
03/07/06 01:35
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Nope, that didn't work either.

I made a lower-poly tree with one branch and a handful of leaves. And I used the texture you edited for me, and this is the result:



You can still see how the leaf behind is showing right through the leaf in front.

This is just too bizarre...

Re: TGA problem with tree model [Re: Galen] #65081
03/07/06 03:52
03/07/06 03:52
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
I also just tried changing every option on the leafskin in the model editor, and none of the engine previews showed any improvement with this transparency problem. I even selected all and "flipped", and that didn't seem to make much difference either, but at this point I'm just flailing around in the dark.

Mayeb there's something wrong with my GS version? I downloaded the latest (public beta) from conitec directly... Does anyone have a tga-based model, tree or otherwise, that is guaranteed to work that I could try?

And is there any other way to get good transparency/alpha for trees like I'm trying to do, but without using tga? Maybe sme kind of shader effect working on a pcx file or something? Heeeeellllllppppppp mmmeeeeeeeeeeee..... heh

thanks

Re: TGA problem with tree model [Re: Galen] #65082
03/07/06 04:17
03/07/06 04:17
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Okay, I've made soem progress in tracking this down. I know that it is not the tga itself that is causing the problem. I was able to load it into my level as a sprite withut any sorting problems, even with 4 of them lined up--the sorting worked fine.

So its my model.

Here's the thing--I'm importing from a .x model format (as exported by "TreeMagik").

Can anyone think of a simple/quick fix or workaround that doesn't involve breaking the model down into a bunch of smaller models as suggested earlier? When I check the model in MED, it appears that the mesh is all "open" as opposed to closed (whether that emans anything, I don't know). All other settings on the model's skins seem to be in line with what has been suggested here.

As per my link further above, I do have a copy of that model in md7 format in case anyone would care to take a look at it to see if they can spot what's going on.

Much obliged--thanks!

Re: TGA problem with tree model [Re: Galen] #65083
03/07/06 13:49
03/07/06 13:49
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
bump...

Page 4 of 7 1 2 3 4 5 6 7

Moderated by  HeelX, rvL_eXile 

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