Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 4 1 2 3 4
Re: normal map shader [Re: sgv3dmax] #136797
06/23/07 09:35
06/23/07 09:35
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
Yes... this model (entity) you want to have normal map shader.
In his function/action write my.material = mat_nm;

something like this:
action my_player
{
player = me;
my.material = mat_nm;
..
...
....
}

But remember if this function/action is in other script than main.wdl, be sure that you have incuded nm.wdl before this script where this function/action is.


Never say never.
Re: normal map shader [Re: tompo] #136798
06/23/07 11:09
06/23/07 11:09
Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
sgv3dmax Offline OP
Newbie
sgv3dmax  Offline OP
Newbie

Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
I would like to give it a try, but i am a little bit confused. I am pasting my main script below. The file is called boxtest.wdl

////////////////////////////////////////////////////////////////////////
// A6 main 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 = <boxtest.WMB>; // give file names in angular brackets

////////////////////////////////////////////////////////////////////////////
// Included files
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
include <cameraSelect.wdl>;
include <cameraTarget.wdl>;
include <camera1stPerson01.wdl>;
include <NM.wdl>;
include <plSelect.wdl>;
include <miscInput01.wdl>;
include <plBipedInput01.wdl>;
include <bipedPhy01.wdl>;
include <bipedAnim01.wdl>;
include <bipedSnd01.wdl>;
include <plBiped01.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>;

Pls tell me where to insert the script. The whole thing looks a bit confusing.

Re: normal map shader [Re: sgv3dmax] #136799
06/23/07 11:45
06/23/07 11:45
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
at the very end of this script add:

action my_action
{
my.material = mat_nm:
}

then create some box or something in med, skin it with color texture(1st skin) and normal_map (2nd skin), paste it in wed and attach this action to this model from model's properites in wed (behaviour)

Last edited by tompo; 06/23/07 11:50.

Never say never.
Re: normal map shader [Re: tompo] #136800
06/23/07 16:20
06/23/07 16:20
Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
sgv3dmax Offline OP
Newbie
sgv3dmax  Offline OP
Newbie

Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
Should i add the script after this statement?

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

This is the end of script, i think? When i add the script at the end of this, it returns and error message when run.

Last edited by sgv3dmax; 06/23/07 16:25.
Re: normal map shader [Re: sgv3dmax] #136801
06/23/07 16:39
06/23/07 16:39
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
it doesn't matter because this is with "//" so it's invisible to the engine;
BTW: what error?
in my above post is error... at the end is ":" but should be ";" of'course


Never say never.
Re: normal map shader [Re: tompo] #136802
06/23/07 16:57
06/23/07 16:57
Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
sgv3dmax Offline OP
Newbie
sgv3dmax  Offline OP
Newbie

Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
Is it like this?
/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;
action my_action
{
my.material = mat_nm;
}

When i run at this stage, an error message: Startup failure is displayed. (Error E355)

Last edited by sgv3dmax; 06/23/07 16:58.
Re: normal map shader [Re: sgv3dmax] #136803
06/24/07 06:36
06/24/07 06:36
Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
sgv3dmax Offline OP
Newbie
sgv3dmax  Offline OP
Newbie

Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
I applied this script tompo provided at the end of the main script.

action my_player
{
player = me;
my.material = mat_nm;
}

When i run the level, the normal mapped object is displayed in black. Please help.

Re: normal map shader [Re: sgv3dmax] #136804
06/24/07 09:12
06/24/07 09:12
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Writing the action in your script is not enough you must also assign it to your model.

Re: normal map shader [Re: Tobias] #136805
06/24/07 10:36
06/24/07 10:36
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
Quote:

When i run the level, the normal mapped object is displayed in black. Please help.



How I told You... if model will be black or to dark... play with emmisive color in texture options in MED


Never say never.
Re: normal map shader [Re: tompo] #136806
06/24/07 11:59
06/24/07 11:59
Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
sgv3dmax Offline OP
Newbie
sgv3dmax  Offline OP
Newbie

Joined: Apr 2007
Posts: 24
Earth-Asia-India-TNadu-Chennai
[image][/image]

I did everything as i was told. But still it appears black. When i don't assign the material, the color map is displayed properly as in the image (screen_01). But, once the material is assigned through the following steps, it again turns black. This is driving me nuts.
Steps I used:
1. Add the following script at the end of the main script.
action my_player
{
player = me;
my.material = mat_nm;
}

2. Include <NM.wdl>; in the main script
3. Select the object (entiy)
4. Right-click and select properties
5. Select the 'behaviour' tab and click on the 'Choose action' button
6. Choose 'my_player' from the list and click OK
7. Build and run the level.
8. I have a player entity with 'PlBiped01' action assigned. This is for view and navigation purpose.
Please refer the images attached.

Page 2 of 4 1 2 3 4

Moderated by  Blink, Hummel, Superku 

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