Hot answers tagged

9

Object coordinate Object* coordinate has 0 in the middle: Notice how I apply a 50% scale, because Object coordinate goes from -1 to 1, so it's twice as big as UV coordinate going from 0 to 1) Offset, then rotate This is the worst solution. You can subtract .5 from your UV along X and Y, to make the middle have 0, and then add it back after rotating: Notice ...


6

Yes, FAC is driven by luminance (from 0.0 to 1.0), and yes, two different colors can have the same luminance. The task isn't impossible, but you would end up with a very complicated node tree, which will have to recognise each of the 18 colors and send them to 18 color nodes or a color ramp. I think it would be simpler to use an image editor software to ...


4

How about a simple setup like this? Of course question is how do you define similarity of colors, should you convert the colors to non-color data, do you perhaps want to divide the colors to HSL/HSV and prioritize (give more weight) e.g. hue over saturation. You may also want to replace just hue instead of whole color... A custom group like that could be ...


3

Parallel, and similar to, @Markus' method.. If you can discriminate your input colors along one 0->1 dimension, (Hue?), then you could put your input colors through a Separate HSV node, use Hue as the 'Fac' for a Color-Ramp, split with 'Constant' interpolation into the output colors. But fiddling with 18 Color-Ramp stops is no fun. I've just tried it. You ...


3

I think you will need some sort of distance function from the cracks between the bricks. If your herringbone is procedural, that could be maths, inside the node tree. If it is an image texture, then blurring will do a pretty good job. You could blur the texture in an external application, or by putting it through Blender's own compositor: .. trying to get a ...


2

Huge thanks for this. It's working perfectly now! Here's the code that worked in my case: e = get_event() [...] ui_scale = context.preferences.system.ui_scale x, y = context.region.view2d.region_to_view(e.mouse_region_x, e.mouse_region_y) x, y = x / ui_scale, y / ui_scale bpy.context.active_node.location = Vector((x, y))


2

this'll solve it for you: def invoke(self, context, event): region = context.region.view2d ui_scale = context.preferences.system.ui_scale x, y = region.region_to_view(event.mouse_region_x, event.mouse_region_y) self.x,self.y = x /ui_scale,y/ui_scale return self.execute(context) Then when you want to use it: def execute(self,...


2

There is an add-on that allows you to automatically import an image as a plane: when you use it to import an image it creates a plane of the right aspect ratio and a shader that displays the image: If you want to change the image, so long as it has the same aspect ratio, all you have to do is click on the file folder and select a new image. It can't get ...


2

If it is what you need, maybe. SNL used for sorting. import gist: https://gist.github.com/423c6ca03363c7f4aa2408f8d59df8d4


2

As I wrote in the comments, some seams are inevitable. Even on a cube, if a side is 1.1 m long, and a tile is 0.2 m long, then 5 tiles will fit completely and half of a tile will be cut off in middle (giving an impression of a seam). What if you don't have a cube? Any non-vertical face will be visible from side as a diagonal line, which will not be ...


2

You can separate the RGB channels, amplify them with a Map Range node (say, 0.4 to 0.6 mapped to 0, 1), and then recombine them. However, amplifying normal maps like this should never be neccesary. Normal maps do not alter geometry, unless it is not being used for normals: in the case that Cycles is using them to displace the existing vertices through a ...


1

chain creation is like that and can be extended with curve modifier: https://gist.github.com/fccce7bd9fdcd84d20371a72b59e207c


1

why don't you use it like this? result: with 0.02:


1

not sure if answering 9 months later is going to be helpful but I came across a similar problem yesterday. In my experience Random per Island works fine until you use autosmooth (Botom Row of the picture) thats when it gets funky, it also changes if you are using hard normals (first column of the picture) or smooth normals (second column).


Only top voted, non community-wiki answers of a minimum length are eligible