Werkkzeug4 light

Werkkzeug4 light

Postby CybeREX » Wednesday, 07.May 2014, 09:37

Here is same scene (close environment with 3 light on it - red, white and blue) made in both wz3 and wz4 demotool.
So my question is it possible to make light spot with the same color on the floor reflection with light color have?
I made screenshot from same angle to see the difference on the floor color.
wz4 version (on the floor white spotted color only)
wz4_light spot white.jpg

wz3 version (on the floor original color spot presented - blu and red and white)
wz3_color light spot.jpg
You do not have the required permissions to view the files attached to this post.
CybeREX
Demomaker
Demomaker
 
Posts: 151
Joined: Thursday, 03.April 2014, 07:44

Re: Werkkzeug4 light

Postby Skinnytorus » Wednesday, 07.May 2014, 22:27

It looks like in wz4 ModLight affects only the diffuse channel. However you can modulate phong reflection color (regretfully, it affects all the lights :( ) by placing Const operator above Phong. That will reveal some new options in the phong shader. Among them find Color(rgb) and enable it. Play with Const color to see the effect.
Skinnytorus
Operator
Operator
 
Posts: 1299
Joined: Monday, 06.February 2012, 17:46

Re: Werkkzeug4 light

Postby CybeREX » Thursday, 08.May 2014, 06:36

Yes its half help, I can select only one color reflection to the all lights.
PS. ikam can you correct wz4 light or it's hard work to do?
CybeREX
Demomaker
Demomaker
 
Posts: 151
Joined: Thursday, 03.April 2014, 07:44

Re: Werkkzeug4 light

Postby CybeREX » Friday, 09.May 2014, 09:49

Here is what I found in demo fr-063.

http://www.youtube.com/watch?v=PXOcLIlEB6o#t=211 Here you can see different color lightning from window on the test table.

http://www.youtube.com/watch?v=PXOcLIlEB6o#t=268 Here you can see green light in the cave and on the top where man stand is white light.

Now need to somehow unpack data from this demo, to see, how it was done.
CybeREX
Demomaker
Demomaker
 
Posts: 151
Joined: Thursday, 03.April 2014, 07:44

Re: Werkkzeug4 light

Postby Skinnytorus » Friday, 09.May 2014, 10:22

1) Those are diffuse lights on the table (not phong reflections). Diffuse lights retain their color ok.
2) There the green light also uses diffuse channel (not phong reflections).
3) No need to unpack here. That's not what we are after...
Skinnytorus
Operator
Operator
 
Posts: 1299
Joined: Monday, 06.February 2012, 17:46

Re: Werkkzeug4 light

Postby CybeREX » Friday, 09.May 2014, 10:35

Oh, I see, my mistake. So phong reflections is available on the material only now. and only one color.
CybeREX
Demomaker
Demomaker
 
Posts: 151
Joined: Thursday, 03.April 2014, 07:44

Re: Werkkzeug4 light

Postby Skinnytorus » Friday, 09.May 2014, 10:44

Take a look at this setup. Not exactly what you want but might give you some rough idea.
Play with Const color.
You do not have the required permissions to view the files attached to this post.
Skinnytorus
Operator
Operator
 
Posts: 1299
Joined: Monday, 06.February 2012, 17:46

Re: Werkkzeug4 light

Postby Skinnytorus » Friday, 09.May 2014, 11:07

Basically, if you want to have different reflection colors, you can use specular or gloss channel with envi texture in there.
You do not have the required permissions to view the files attached to this post.
Skinnytorus
Operator
Operator
 
Posts: 1299
Joined: Monday, 06.February 2012, 17:46

Re: Werkkzeug4 light

Postby ikam » Friday, 09.May 2014, 11:13

Yop

This can be fixed manually (in wait of a code fix)
In ModMaterial :
- get the PixelShader (EditShader = Pixel shader),
- click GetPS
- click CustomCode = enabled

Find the "phong shader" code section

get the line :

Code: Select all
col_specular += (pow(s,spec)*li*ls*tran)*speccol;


just add a col_light multiply at end of this line :

Code: Select all
col_specular += (pow(s,spec)*li*ls*tran)*speccol * col_light;


(repeat for each lights, there is a col_specular line for each light)
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: Werkkzeug4 light

Postby Skinnytorus » Friday, 09.May 2014, 11:31

Thanks, man. It works. But once I enable shadows for all the lights. Diffuse lighting disappears... :(
You do not have the required permissions to view the files attached to this post.
Skinnytorus
Operator
Operator
 
Posts: 1299
Joined: Monday, 06.February 2012, 17:46

Re: Werkkzeug4 light

Postby ikam » Friday, 09.May 2014, 11:37

You need to enable shadows before add any shader code modification, re-get the pixel shader code and re-add your modification.

If you change any paremeters or add/remove operators in modMaterial, sahder code will be different than the last time you did a GetPS, it's why you need update your code. Shadows works in the shaders (look at shadows sub section in code), so it modify the existing one.

Shader code modifications must be the last operation to do in the material creation process to be sure to have all parameters et co...
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: Werkkzeug4 light

Postby Skinnytorus » Friday, 09.May 2014, 11:47

I see. Thanks. Haven't used this feature for too long now...
Skinnytorus
Operator
Operator
 
Posts: 1299
Joined: Monday, 06.February 2012, 17:46

Re: Werkkzeug4 light

Postby CybeREX » Friday, 09.May 2014, 15:06

Thank you guys! It's work like a magic now! Very nice that we have ikam here!
Final question is - how to increase the ammount of specular color power on the reflection and not to change scene light? because its semms too dark now =)

Specular light work.jpg
You do not have the required permissions to view the files attached to this post.
CybeREX
Demomaker
Demomaker
 
Posts: 151
Joined: Thursday, 03.April 2014, 07:44

Re: Werkkzeug4 light

Postby ikam » Friday, 09.May 2014, 15:49

as you are using a custom shader code now, phong parameters will be bypassed, so you can't play with its parameters to adjust power (specular and transparency).

so you have 2 choices :

1) disable custom shader, increase specular in phong operator, swith to csutom shader, rewrite "* col_light"

2) increase manually specular power in the shader code with a simple multiply factor at end of the same line, example :
col_specular += (pow(s,spec)*li*ls*tran)*speccol*col_light*2;
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: Werkkzeug4 light

Postby CybeREX » Friday, 09.May 2014, 16:07

It's what I need!
Thank you very much for help ikam!
CybeREX
Demomaker
Demomaker
 
Posts: 151
Joined: Thursday, 03.April 2014, 07:44


Return to Development and contribution



Who is online

Users browsing this forum: No registered users and 1 guest

cron