PDA

View Full Version : Complex shading



t0ol
04-01-2014, 11:13 AM
Hey guys.

Im trying to figure out how to do certain shading tricks in LW.. couple questions:

1) What`s the workflow to apply 2 different shaders based on a map onto a single surface?

2) Is there a way to get object curvature into a gradient node (i.e. to get a map of convex/concave areas)?

tnx

t0ol
04-02-2014, 07:14 AM
Curious.. is it too obvious to answer, or just impossible?

pinkmouse
04-02-2014, 07:17 AM
No idea how you'd do it with shaders, but nodally use the material mixer.

RebelHill
04-02-2014, 07:47 AM
If you're talking node shaders... then as pinkmouse says... just use the appropriate mixer node... otherwise, not.

For determining convexity/concavity you need to solve the surface differential, returning if the slope between polys is a positive or negative curvature...

http://en.wikipedia.org/wiki/Differential_geometry_of_surfaces
https://www.khanacademy.org/math/multivariable-calculus/surface-integrals/surface_integrals/v/surface-integral-example-part-2---calculating-the-surface-differential

Not really sure how you'd go about making such a node network though, as there's no easy way to get neighbouring points/polys for evaluation... However, if you get DP kit, there's a curvature node in there which does basically this by pre-scanning the mesh. It can also be set to work after deformation if needed.

t0ol
04-02-2014, 08:03 AM
Cool, found both, working great. Thanks alot.

Sensei
04-02-2014, 09:00 AM
In really complex shading take a look at Global Materials
http://globalmaterials.trueart.eu
It can share the same set up of nodes to multiple surfaces, even in multiple objects.

spherical
04-02-2014, 02:16 PM
1) What`s the workflow to apply 2 different shaders based on a map onto a single surface?

Can this not be done with a weight map and gradients? Fade or step one out and the other in? Or am I out to lunch... again? Up all night reading the National Electrical Code, so probably.

RebelHill
04-02-2014, 02:47 PM
Can this not be done with a weight map and gradients? Fade or step one out and the other in?

Sure (unless you're talking mixing material nodes in which case no)... but there'd be no point... Using the standard mixer node with the weight fed to the opacity parameter would be more parsimonious.

spherical
04-02-2014, 03:40 PM
:) Now, there's a good word for today.

RebelHill
04-02-2014, 04:26 PM
Sorry bout that.

Kevbarnes
04-02-2014, 05:08 PM
parsimonious.

I got to get that into a sentence at work tomorrow.

Dodgy
04-02-2014, 06:21 PM
Denis Pontonnier has a curvature node you can plug straight into the Diffuse shading input.
http://dpont.pagesperso-orange.fr/plugins/nodes/Additionnal_Nodes_2.html

t0ol
04-12-2014, 05:37 PM
Yeah I got it working the way I want, so thanks again.

Now another question is unrelated to shading but dont wanna start a new thread.. I need to control fractures like if they were particles.. I.e. have a prefractured object dissolving, parts flying around, emmiting stuff and doing crazy things.. Cant figure this out, instancing doesnt look like a way to go here, nor is bullet - not the same degree of freedom as with particles. Any suggestions?

Yeah and while I`m at particles, cant figure a basic sticking to surface while inheriting emitter`s velocity vector.. like if i have particles emitted from points that need to follow that point and not fly away (stick to srfc)?