Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/01/26 16:40
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (DrissB, clint000), 5,027 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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: 28,077
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,077
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 | 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