Loading video...

Video Failed to Load

Go Home

I've added a function to propagate a gradient across the mesh (it follows the curvature of the hair), and then copy that gradient to the Windows clipboard as a transparent picture, for use as a selection mask in the image editor

13,311 views • 1 year ago •via X (Twitter)

5 Comments

TouchMe's profile picture
TouchMe1 year ago

Can this be used to created pathing maps for poiyomi? As there hasn’t really been a good way to do that prior.

Haï~'s profile picture
Haï~1 year ago

I managed to build a Poiyomi "Merged Channels" path map with this

vaizor's profile picture
vaizor1 year ago

you never miss i stg

zSkull162's profile picture
zSkull1621 year ago

that’s nuts. i didn’t know editor scripting can do so much

Xirael's profile picture
Xirael1 year ago

How reliant is it on each strand being its own island or mesh?

Related Videos

CSS Trick! 🤙 You can create gradient borders on translucent elements using mask-clip and mask-composite with a pseudo-element 🔥 .gradient-border::after { mask-clip: padding-box, border-box; mask-composite: intersect; mask: linear-gradient(transparent, transparent), linear-gradient(white, white); } It's the same "Transparent border trick" from before. But, now you apply it to a pseudo-element 😎 The trick is to create a pseudo-element with a gradient background and then mask it so we only see the part we want, the border ✨ mask-clip defines the area affected by a mask. Similar to how you can define background-size. Using padding-box and border-box constrains the two masks. mask-composite is the magic part ✨ It defines a compositing operation for stacked mask layers. Using intersect means that the parts that overlap get replaced. And this seems to work in all browsers 🙌 As for the rest of the styles... – Make sure you set pointer-events: none on the pseudo-element – Make sure it fills the parent element. You can use position: absolute and inset: 0 – Make sure the background fills the space including the border-width. You can use calc to achieve that: --bg-size: calc(100% + (2px * var(--border))); background: var(--gradient) center center / var(--bg-size) var(--bg-size); That's it! 🚀 Gradient borders on translucent elements. You can set all the backdrop-filter: blur() you like! 😅 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

269,847 views • 2 years ago

CSS Tip! 🤙 You can use mask-composite and some JavaScript to create this pointer proximity following glow border ✨ .glow { mask-composite: intersect; mask-clip: padding-box, border-box; mask: linear-gradient(#0000, #0000), conic-gradient(#0000 0deg, #​fff, #0000 45deg); } The trick is to mask a background-image with a combination of mask layers. mask-composite: intersect; means the mask used will be the intersection of the layers 🔥 use source-in, xor; in browsers that don't support intersect; In this demo, you can use pseudoelements and rely on scoped custom properties to do a lot of the heavy lifting for you 🙌 Once you've masked the background, you need to update the starting angle of the conic-gradient on pointermove 👆 You can work that out by getting the center point of each card and then calculating the angle between that and the pointer with Math.atan2 🤓 let ANGLE = Math.atan2( event?.y - CARD_CENTER[1], event?.x - CARD_CENTER[0] ) * 180 / Math.PI ANGLE = ANGLE < 0 ? ANGLE + 360 : ANGLE; CARD.​style.setProperty('--start', ANGLE + 90) You plug that into your conic-gradient mask as a custom property accounting for --spread ⚡️ conic-gradient(from calc((var(--angle) - (var(--spread) * 0.5)) * 1deg), #000 0deg, #​fff, #0000 calc(var(--spread) * 1deg)); To get the blur, you apply a blur to the glow container on each card 🤙 .glows { filter: blur(calc(var(--blur) * 1px); } That's it! Layers of masks that are clipped and composited before being blurred 😎 The added trick is to fade each one in when the pointer is in the defined proximity of the card. For example, don't show unless within 100px of a card. You can see that in the video. Check out the JavaScript code for that 🫶 Couldn't resist making this one 😁 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

1,180,253 views • 2 years ago

CSS Tip! ✨ It's 2024 and you have a new way to make animated borders 🚀 .glow::after { offset-path: rect(0 100% 100% 0 round var(--radius)); animation: loop; } @​keyframes loop { to { offset-distance: 100%; }} Using the offset-* properties you can animate elements along the perimeter of others 😍 The rect() value gained support in Safari 17.2 🙌 To start, you create an element and put it inside your main element. For example, you put a span inside the button 🤙 Click me! Make the element fill its parent with absolute positioning and inset [data-glow] { position: absolute; inset: 0; } Now the good part, you use a pseudoelement on that element and define an offset-path [data-glow]::after { content: ""; offset-path: rect(0 auto auto 0 round var(--radius)); animation: loop 2.6s infinite linear; } With the rect value, you are saying the path fills the parent container: top: 0 right: auto || 100% bottom: auto || 100% left: 0 Then you can use round to make sure the path uses the same radius as whatever the parent has The @​keyframes animation merely animates the offset-distance of that pseudoelement to 100% @​keyframes loop { to { offset-distance: 100%; }} You can see this more clearly in the video 🫶 The offset-* properties also include an offset-anchor property. This allows you to dictate which point of the element follows the path. For example: anchor-offset: 100% 50%; This means that the "right, center" of the element will follow the perimeter of the parent element 🤙 Lastly, the visuals 🎨 For color, you can use a gradient such as a linear gradient to fill the pseudo-element. [data-glow]::after { background: radial-gradient( circle at right, hsl(320 90% 100%), transparent 50% ); } Then clip away everything so you only have the border and can still have translucent backgrounds, etc. Use a mask with mask-composite ✨ A little transparent border trick: [data-glow] { border: 2px solid transparent; mask: linear-gradient(transparent, transparent), linear-gradient(white, white); mask-clip: padding-box, border-box; mask-composite: intersect; } Bit of a long one. Hope you find it useful 🙏 CodePen.IO link below 👇

jhey ʕ•ᴥ•ʔ

283,498 views • 2 years ago

🎓Learn how to create a powerful Dynamic Embers smart material in a matter of seconds, in my latest video series (AAA) Pro Tips! This smart material can be used on virtually any 3D asset. ___________________________________________________ In this video, the steps are as follows: 1. Create a fill layer to then apply the base maps for our asset into it. 2. Bake out the world space, AO, Curvature, and Position maps. These maps will be crucial for the smart material to function. Also, be sure to add an emissive channel to the project. 3. Next, create another fill layer labeled (Fire animation gradient) with a black mask and inside the mask apply a paint layer. Select the paint layer and paint a simple pill shape using a soft brush. Add an anchorpoint to the mask and disable all channels in this fill layer. 4. Create a folder labeled (embers smart material) and set it to pass through. Add a paint layer inside this folder and set it to pass through as well followed by an anchorpoint. 5. Create another fill layer and apply the paint layers anchorpoint information into its color channel. From here an HSL filter should be added to desaturate and darken the colors. 6. Next, create an additional fill layer with an orange-colored emissive channel. Add a black mask to this fill layer and inside its mask apply a dirt generator. This will give us the illusion of the embers glowing from inside the charred tree. Duplicate this fill layer and tweak its emissive color to a yellowish hue and reduce its mask amount. Do this a second time but with a white-colored emissive channel. This will now create an effect of the embers appearing brighter the deeper they are inside the tree. 7. Lastly, add these layers into a folder with a black mask and apply the (Fire Animation Gradient) anchorpoint into its mask via a fill layer. Now we have a charred embers effect wherever we paint using the paint layer created inside the gradient mask! This gradient mask can also be exported into Unreal engine to create some stunning real-time dynamic animations or the new material can simply be used for in-engine vertex painting. ____________________________________________________ More AAA Game Dev Tips can be found on my YouTube channel here: Stay tuned for more weekly Tips! Happy Texturing!💚 #gamedev #gameart #3dmodeling #texturing #madewithsubstance #ue5 #unrealengine #unity #vfx

Cohen Brawley

46,031 views • 2 years ago