Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
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
2 registered members (Martin_HH, TipmyPip), 1,279 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 7 1 2 3 4 5 6 7
Re: TGA problem with tree model [Re: Lwiet10052] #65064
02/28/06 20:15
02/28/06 20:15
Joined: May 2005
Posts: 107
Latvia
raymich Offline OP
Member
raymich  Offline OP
Member

Joined: May 2005
Posts: 107
Latvia
no, no
i did it now! I just had no clue what aare those alpha channels, becouse i am new to this thing and all i always used was gif with transparent background (checker)
i studied out alpha channels myself,with many thanks to DaBro0zar.

thanks for info anyways!

Re: TGA problem with tree model [Re: Lwiet10052] #65065
03/05/06 02:26
03/05/06 02:26
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
I feel like a grade-A retard. I can't get any of these scripts to work!

I have a project script file, GL-Main.wdl

I have transparency/culling script file for the scripts here, tree1.wdl

Both are in my work directory.

My GL-Main.wdl file has an "include" entry for tree1.wdl

tree1.wdl shows up in WED when I open the project manager and look at the added scripts.

I can even build the level with no script errors (I made the mistake previously of thinking I needed seperate script files for each set of brackets, but I changed that as mentioned above to make it all in 1 wdl file, tree1.wdl).

The problem is that I still get this messed up sorting, where pieces of branch leaves on the far side of the tree can be seen as if the leaves on the near side are transparent, like a hole (if I move up close the the area and move around, I can see the near branches move in and out of transparency, so I know there's a sorting problem).

I'm a total noob to scripting, but I thought I had the basics in as per this thread... Please if anyone can help, I'd really appreciate it, seeing as how I've already spent hours trying to figure this out already, and it's probably something really simple.

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

Joined: Aug 2005
Posts: 336
Connecticut
Anyone?

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

Joined: Sep 2003
Posts: 4,959
US
don't mix semi-transparent and full opaque in the same skin image ( i.e. don;t put solid colors and transparent gradiant in the same image for example) the engine doesn't like it. if you HAVE to have semi transparentcy , then map all the opaque areas to one skin and your semi-transparent to another skin.

you can have opaque and 100% transparent in the same image, just not opaque and semi-transparent

Re: TGA problem with tree model [Re: Grimber] #65068
03/05/06 17:31
03/05/06 17:31
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Hi Grimber, thank you for responding.

I didn't think I had any semi-transparency in my image, just the alpha channel and opaque leaves. Here's the tga texture itself (archived): http://mysite.verizon.net/vze3f978/wlntleaf.rar


Here are copies of what I have in my script files:
GL-Main.wdl (my main level file):

////////////////////////////////////////////////////////////////////////
// A6 "Walk Thru" Project wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory

/////////////////////////////////////////////////////////////////
// Filename of the starting level.
string level_str = <GL-Main.WMB>; // give file names in angular brackets

////////////////////////////////////////////////////////////////////////////
// Included files
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
include <cameraTarget.wdl>;
include <miscInput01.wdl>;
include <cameraSelect.wdl>;
include <camera1stPerson01.wdl>;
include <tree1.wdl>;
include <camera3rd01.wdl>;





/////////////////////////////////////////////////////////////////
// Desc: The main() function is started at game start
function main()
{
// set some common flags and variables
// freeze all entity functions
freeze_mode = 1;
// no level has been loaded yet...
gid01_level_state = gid01_level_not_loaded;

// entry: Warning Level (0,1, or 2)
// entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all).
warn_level = 2; // announce bad texture sizes and bad wdl code


// entry: Starting Mouse Mode (0, 1, or 2)
mouse_mode = 0;

// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// now load the level
level_load(level_str);

wait(2); // let level load
// level should be loaded at this point...
gid01_level_state = gid01_level_loaded;

//+++ load starting values


// un-freeze the game
freeze_mode = 0;

// save start of game here
wait(6); // allow time for functions that wait for "gid01_level_loaded" to load
file_delete("start0.SAV"); // remove any old savefile
wait(1);
if( game_save("start",0,SV_ALL) <= 0)
{
diag("\nWARNING! main - Cannot save 'start' of level (ignore on restarts).");
}
else
{
diag("\nWDL: main - Game 'start' saved.");
}


// main game loop
while(1)
{
if(gid01_level_state != gid01_level_loaded)
{
freeze_mode = 1; // pause the game
while(gid01_level_state != gid01_level_loaded) { wait(1); }
freeze_mode = 0; // resume the game
}
wait(1);
}

}


// Desc: this is the function used to restart the game.
function main_restart_game()
{
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// freeze the game
freeze_mode = 1;

if( game_load("start",0) <= 0)
{
diag("\nWARNING! main_restart_game - Cannot load 'start' of level.");
}
else
{
diag("\nWDL: main_restart_game - Game 'start' loaded");
}

// un-freeze the game
freeze_mode = 0;
}


// Desc: this is the function used to quit the game.
function main_quit()
{
//+++ // save global skills & strings
exit;
}

/////////////////////////////////////////////////////////////////
// The following definitions are for the pro edition window composer
// to define the start and exit window of the application.
WINDOW WINSTART
{
TITLE "3D GameStudio";
SIZE 480,320;
MODE IMAGE; //STANDARD;
BG_COLOR RGB(240,240,240);
FRAME FTYP1,0,0,480,320;
// BUTTON BUTTON_START,SYS_DEFAULT,"Start",400,288,72,24;
BUTTON BUTTON_QUIT,SYS_DEFAULT,"Abort",400,288,72,24;
TEXT_STDOUT "Arial",RGB(0,0,0),10,10,460,280;
}

/* no exit window at all..
WINDOW WINEND
{
TITLE "Finished";
SIZE 540,320;
MODE STANDARD;
BG_COLOR RGB(0,0,0);
TEXT_STDOUT "",RGB(255,40,40),10,20,520,270;

SET FONT "",RGB(0,255,255);
TEXT "Any key to exit",10,270;
}*/


/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;






And my tga tree sorting file, tree1.wdl:

material right_alpha_mat
{
effect =
"
technique right_alpha1
{
pass p0 {zWriteEnable=true; alphaTestEnable=true;}
}
";
}

action right_alpha_acc
{
my.material = right_alpha_mat;
my.dynamic = off;
}


And here's a screenshot of what the trees end up looking like (in preview mode):



You can see in the center how the back leaves are showing in front of the enarest leaves.

If you or anyone else can spot what I'm doing wrong, I'd be grateful.

Re: TGA problem with tree model [Re: Galen] #65069
03/05/06 22:29
03/05/06 22:29
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
zip file

try this one, i reapplied an alpha channel to the image.just apply it to your model, replacing the other texture. don't assign any material to the model either as well as don;t set its transparent, flare, overlay or such flags either

Last edited by Grimber; 03/05/06 23:05.
Re: TGA problem with tree model [Re: Grimber] #65070
03/05/06 22:37
03/05/06 22:37
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Hi Grimber,

I'm getting a "page not found" error when I click the link...

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

Joined: Sep 2003
Posts: 4,959
US
sorry fixed it now

Re: TGA problem with tree model [Re: Grimber] #65072
03/05/06 23:56
03/05/06 23:56
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Okay, I reapplied the texture.

I'll post a screenshot later, but now the leaves are upside down, and it looks like there are still some sorting problems.

I made sure none of the other flags were set that you specified... The tree1.wdl script is still running though--should I have turned that off?

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

Joined: Sep 2003
Posts: 4,959
US
try the trees without any action assigned first. if there is still a problem with the tree then it is in the model/skin

if no problems with no action then the problem is in the action.
if so then comment out any parameter flags and line(s) setting materials

just have to do a process of elimination till you narrow down whats causing the problem

Page 3 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