Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,606 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Change light settings depending on alpha channel ? #60366
12/10/05 07:18
12/10/05 07:18
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline OP
Member
Olzii  Offline OP
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
Hi all,

How to change light settings (ambient, diffuse, emissive) of material defending on alpha channel or different skin using effect ? Please help ?

I want alpha channel or different skin to mark positions where i have to change light settings.




The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: Change light settings depending on alpha chann [Re: Olzii] #60367
12/10/05 18:53
12/10/05 18:53
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
you can integrate something like this into your shader assuming that white parts in the alphachannel is the part you want to have blinking
...
float4 tex = tex2D(yoursampler,texCoord.xy);
float4 blueblink = vecSkill41.x*float4(0,0,1,1)*tex.a;

then you need to add the blueblink to your coloroutput

...
return tex+blueblink;
}

thus you can modify the blinker thru c-script by setting the models skill41=float(your value);

hope this is of any help for you

Last edited by ello; 12/10/05 18:58.

www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: Change light settings depending on alpha chann [Re: ello] #60368
12/12/05 02:27
12/12/05 02:27
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline OP
Member
Olzii  Offline OP
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
Thanks for your advice. But i dont have any skill with shader, therefore it is very difficult for me. Can you give me some code example ?

Without vertex and pixel shader is it possible ?


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: Change light settings depending on alpha chann [Re: Olzii] #60369
12/12/05 14:37
12/12/05 14:37

A
Anonymous
Unregistered
Anonymous
Unregistered
A



If I were you, and you just want a quick change in color (not a slow change over time), just make another skin instead of using the entity.light or materials. You can just change the yellow to brown with the free GIMP (www.gimp.org) program with the selecting by color button, then you can change that selections color (either with a hue change or by just painting it directly). Then you can keep the same color for those little logos on the car. To change the skin of the car, just put my.skin=2 in your script. Thanks!

Re: Change light settings depending on alpha chann [Re: ] #60370
12/13/05 03:18
12/13/05 03:18
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline OP
Member
Olzii  Offline OP
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
Thanks WING,

I know that i can make different skins and i can manipulate them. But i dont want new skin, because :
- It will take RAM, HDD, CD space (My level already 360MB)
- I also want that player can choose their car color from any color.

Olzii


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: Change light settings depending on alpha chann [Re: Olzii] #60371
12/13/05 13:07
12/13/05 13:07

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Ok, another thing you could do is make it two different models that always stay in the same position but delete the faces of the parts that aren't part of the logo (the main body) and then have the other model just be the the main body (so you separated the original model into two, one with the parts that do change color and one where they don't). Then always keep the models at the same position and just change the color of the car body so you can keep the logo the same color.


Moderated by  Blink, Hummel, Superku 

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