Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
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
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 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 4 of 4 1 2 3 4
Re: MED FX / fx to multitex models [Re: jcl] #84462
08/15/06 09:09
08/15/06 09:09
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
wonderful. thanks for looking at it.

Re: MED FX / fx to multitex models [Re: jcl] #84463
08/15/06 20:49
08/15/06 20:49
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
I always separate my models in several 'chunks' for different effects. With 6.405 tried to avoid that...
Thank You anyway, JCL.

Re: MED FX / fx to multitex models [Re: Lion_Ts] #84464
12/28/06 12:14
12/28/06 12:14
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
i am still troubled with the thing, i have the 6.50.2 version now.

Code:
bmap cubem = <cube1small+6.tga>;
bmap metDOT = <metal49DOT3.tga>;

function mtl_envmap_view()
{
mat_set(mtl.matrix,matViewInv);
mtl.matrix41=0;
mtl.matrix42=0;
mtl.matrix43=0;
}

function mtl_envmap_init()
{
bmap_to_cubemap(mtl.skin4);
mtl.event=mtl_envmap_view;
mtl.enable_view=on;
}

material spec_mat{
effect="SpecSun.fx";
flags=tangent;
}

material nullmat{
power=2;
skin1=metDOT;
skin4=cubem;
}

material reflect_mat{
event=mtl_envmap_init;
effect="cubemap.fx";
}

entity* grundEH;

function shader_startup();

ACTION grundeinheit{
while(!me){wait(1);}
grundEH=my;
shader_startup();
while(1){
my.pan+=0.5*time_step;
wait(1);
}
}

function shader_startup() {
while(!grundEH){wait(1);}
spec_mat.skill1=float(sun_pos.x);
spec_mat.skill2=float(sun_pos.z);
spec_mat.skill3=float(sun_pos.y);
grundEH.material=nullmat;
ent_mtlset (grundEH, spec_mat, 3);
ent_mtlset (grundEH, reflect_mat, 1);
wait(5);
}



.. does not show any shaders. though, the model parts are not invisible anymore, but get, as soon as i apply the fx file in MED directly. both shaders work if i apply em to the model alone.

Re: MED FX / fx to multitex models [Re: broozar] #84465
12/28/06 14:55
12/28/06 14:55
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
From the manual, ent_mtlset:

"Replaces skin lighting and skin effect of a model (...) Material parameters that do not belong to a skin - for instance material skills or matrices - are not modified."

You need to assign a material to the entity that is able to run your skin effects. Your entity material "nullmat" has no events or matrices, so your code above can't work.

Page 4 of 4 1 2 3 4

Moderated by  old_bill, Tobias 

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