Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR - 2.5d relight tool #467

Closed
benjamintomad opened this issue Feb 16, 2015 · 14 comments
Closed

FR - 2.5d relight tool #467

benjamintomad opened this issue Feb 16, 2015 · 14 comments

Comments

@benjamintomad
Copy link

Hi there,

So far I can already get some pretty good results with the available feature set, it's great!
But right now, I'm missing a relighting tool based on a normal pass. Is there any chance to see it added some time? A widget ala Blender would be pretty nice.

Thanks

@sozap
Copy link

sozap commented Feb 16, 2015

In fact you don't need this that much, you can separate RGB channels from your normal pass and use that to do your relighting... you can invert mix together or color correct these layer to get as many light directions as you like .
Just my two cents :)

@mifth
Copy link

mifth commented Feb 17, 2015

Relight tool is vector direction. it uses all rgb channels to create a new vector direction lighting. it‘s a bad idea to use rgb separetely.

good feature request.
@FR could you add a screenshot af the relight node so that Natron devs can understand the feature correctly?

@benjamintomad
Copy link
Author

Hi everyone,

Here are some screenshots of different implementations. You can find some more advanced relighting tools on Nukepedia but the ones I'm showing here have the advantage of being fast and not relying on a 3d space that Natron has not (yet?). Of course, a more obvious advantage for Blender and Fusion is that you can fully test them for free.

Here you can get the screenshots and the scenes for Blender and Fusion, just re-link monkey_BTY and monkey_NRM. For Blender, just hit F12.
https://drive.google.com/folderview?id=0BxN8TwNaQzJhfkFnd2dFOTE1RUVrMDRzSTRNcUtOQWVIMThRNmc0SjBEYTM5NTB0TU1RbUk&usp=sharing

Can't provide the Nuke scene as I don't remember where we got this gizmo in the first place and our Comp supervisor is out for a few days...

The tool in Fusion is called "Shader" you can find it in the "Deep Pixel" category or simply use ctrl-space to find it like Tab in Nuke and Natron. You'll have to use a channel boolean first to feed in the normal channel.
The interface in Blender is really nice but it's limited to diffuse shading while Fusion has more options to offer.

Hope you guys will get inspiration from those.

Cheers, keep up the good work!

relightblender
relightfusion
relightnuke

@MrKepzie
Copy link
Owner

If you manage to provide us with the content of this Gizmo this could help us to provide you a tool matching it. We are not going to implement a 3D space right now, we have much things left to do in the 2D side. Bear in mind that most operations in Nuke are in fact 2D: relighting as I see it in your screenshot does not require a 3D space to work, a normals pass from Blender could do the trick.

@benjamintomad
Copy link
Author

Actually I was thinking about that tool from a 2D point of view. Indeed it seems a bit overkill to ask for a 3D space so early and I guess it wouldn't be faster than a good old normal pass anyway.
I'll send you a gizmo by the end of the week if I can get my hands on it.

@benjamintomad
Copy link
Author

Here's the gizmo : https://drive.google.com/file/d/0BxN8TwNaQzJhclg2elVTUUNwZ1U/view?usp=sharing
We lost track of its origin so I don't know who to credit for it :/
I'll dig a little and let you know if I find who did it

@MrKepzie
Copy link
Owner

Since we have the SeExpr node that provides equivalent and more functionalities than the Expression and MergeExpression nodes of Nuke, I guess you could make your own Natron PyPlug based on that Gizmo. I took a look and there are no nodes that is missing from Natron's distribution that should stop you from creating it.

@benjamintomad
Copy link
Author

Nice! I'll have a look at that as soon as I can.

Thanks!

@adallafontana
Copy link

Is only an example for to use SeExpr with the normal pass of blender:
screenshot from 2015-03-22 08 50 22

Cg=color1; #surface color
Nn=[Cs[0],Cs[1],Cs[2]]; #normal

Ln1=norm([pos1[0],pos1[1],x1]); #light position1
color=Cg*clamp(dot(Ln1, Nn)*color2, 0, 1); #light1

Ln2=norm([pos2[0],pos2[1],x2]); #light position2
color+=Cg*clamp(dot(Ln2, Nn)*color3, 0, 1); #light2

color

...anyway will be nice have the position 3D on SeExpr, for to do this I have used 1 scalar for Z.

@MrKepzie
Copy link
Owner

Nice, just use a color parameter to get a 3D position

On 22 Mar 2015, at 08:58, Alessandro Dalla Fontana notifications@github.com wrote:

Is only an example for use SeExpr with the normal pass of blender:
https://cloud.githubusercontent.com/assets/8054856/6768530/2fd1456e-d071-11e4-88bc-b9fd74e1a686.jpg
Cg=color1; #surface color
Nn=[Cs[0],Cs[1],Cs[2]]; #normal

Ln1=norm([-pos1[0],pos1[1],x1]); #light position1
color=Cgclamp(dot(Ln1, Nn)color2, 0, 1); #light1

Ln2=norm([-pos2[0],pos2[1],x2]); #light position2
color+=Cgclamp(dot(Ln2, Nn)color3, 0, 1); #light2

color

...anyway will be nice have the position 3D on SeExpr, for do this I have used 1 scalar for Z.


Reply to this email directly or view it on GitHub #467 (comment).

@adallafontana
Copy link

screenshot from 2015-03-22 18 34 16

test with diffuse+specular(phong)
the specular exponent is controlled with x3

Nn=[Cs[0],Cs[1],Cs[2]]; #normal

Ln1=norm([pos1[1],pos1[0],-x1]); #light position1
color=clamp(dot(Ln1, Nn)*color2, 0, 1); #light1diffuse

H1=(-Ln1+-Nn)/length(Ln1+Nn);

color+=clamp((dot(H1,Nn)^(10*x3))*color3,0,1); #light1specular

color

@MrKepzie
Copy link
Owner

Can you show me which param is linked to what and the expression… there’s not enough info here

On 22 Mar 2015, at 18:43, Alessandro Dalla Fontana notifications@github.com wrote:

https://cloud.githubusercontent.com/assets/8054856/6770536/d80270a4-d0c2-11e4-8763-21e316da7604.jpg
test with diffuse+specular(phong)
the specular exponent is control with x3

Nn=[Cs[0],Cs[1],Cs[2]]; #normal

Ln1=norm([pos1[1],pos1[0],-x1]); #light position1
color=clamp(dot(Ln1, Nn)*color2, 0, 1); #light1

H1=(-Ln1+-Nn)/length(Ln1+Nn);

color+=clamp((dot(H1,Nn)^(10_x3))_color3,0,1); #light2specular

color


Reply to this email directly or view it on GitHub #467 (comment).

@juancarlosgzrz
Copy link

What about 3D now? I'ts been 3 years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants