Can you animate or change perspective of textures in real time/have textures that follow camera view

Do you plan to superimpose 2d looking clothes on 3d model?

Yes, basically.

Looks like too much trouble for me, from both artistic and technical standpoint. I’d opt either for everything being celshaded 3d, or making a flat puppet in Blender. If 3d model doesn’t change view angles drastically, perhaps you could get away with just putting a flat prop in front of it. If you want to do it through math, there are so many edge cases to consider. For objects which are shaped like a tube, you could find angle between object’s forward direction (putting rotation to shader is another can of worms; only way currently is 3 separate drivers to euler XYZ) and scroll texture in X direction to make it appear viewport aligned

2 Likes

Well the base models would be cell shaded, before the textures. Could you specify the method for the tube? For the viewport alignment, it seems similar to using the camera for the texture coordinates. I also had another idea, but only for patterns on 1 part of a mesh. I though of making a plane that is transparent/invisible with a solid/visible texture on it, then shrink-wrapping onto the 3d mesh. I could then use the method of using shape keys to change the texture according to camera angle. This isn’t a good idea for full blown textures for a whole mesh though.

I’ll make some tests and write you back if I’ll succeed. In the meantime, there is also a thread that describes drawing a view-aligned texture on top of a Voronoi cell. View-aligned voronoi islands (for infinite forests, Eevee and Cycles)
You’ll have to replace the world up axis with z direction of your prop, and voronoi cell position with object position (Input - Object Info) and perhaps it’ll work even better

1 Like

The link was quite informative, and I will be looking more into the effect. The node tree would take a while to figure out though…

[ViewAlignedWithObjectZAxis.blend|attachment]
ViewAlignedWithObjectZAxis.blend (946.2 KB)
I’ve managed to adapt nodes from “voronoi forest” thread for using object center and up axis. Mostly stable; it only starts to flip if Z axis points to camera. Main problem is how to animate wobbling/bouncing. You can try using distortion texture, mapped to same UV coordinates, as sort of “shape key”

1 Like

The node that you gave works better than using camera for the texture coordinates and better than the uv project modifier. There is one problem though. There is this weird blob of an image on the back of the character with green and red outlines:



The character also rotates when I go to top view so that’s a potential issue (I think you mentioned this?). I am still looking how to do the distortion/ animating the texture thing from the article and animating the texture’s angle, but other than that, I think this is pretty good. Thank you.

1 Like

The “blob” is there because of particular texture, not math error. Image with alpha channel was used as solid color, and some pixels with color information leaked beyond alpha border. And yes, you have to take care not to point object’s Z axis straight to the camera. Since effect is view dependent

1 Like

I get that. I tried the texture with the uv project, and the blob wasn’t there, that’s why I mentioned it.

Different material setup I guess

1 Like

If I use a texture with a transparent background with this node tree, would the same thing happen?

Depends on texture. If you see artifacts around alpha mask, changing the clip threshold in material properties usually gets rid of them
GIMP cube
(alpha as transparency, Alpha Clip mode, clip threshold is set to 0.55)

2 Likes

Thank you.

I love the effect this node has on grass texture. There is a youtuber/ twitter artist I stumbled upon recently and I’ve been researching and racking my brain on how 2d and flat the models they make look like. I wonder how to recreate this effect. The way the textures look flat reminds me of your node tree, but the textures are not rotating.

https://m.youtube.com/watch?v=G7MSfleJ0oA

These effects are perfect for 2d painted backgrounds. what is this sorcery lol?

This is what I meant of your node looking similar:

Such look is combination of many factors. Objects like grass are procedurally placed meshes, most likely based on Geometry Nodes’ instancing capabilities. The textures on those blades of grass might be hand painted. Plus the materials include components (like canvas /paper texture) which are projected from camera (Input - Texture Coordinates - Camera or Window)

1 Like

I thought it might be hand painted, and I also saw from their process some of the brush stroke effect is from texturing, procedural or a filter effect. Kind of like this:

https://twitter.com/ffuthoni/status/1707023018386682105

https://twitter.com/simonxxoo/status/1514826575996665861

https://twitter.com/simonxxoo/status/1659851790861635585

Also, editing a normal map can give you painterly effect.

Combining it with screen space mapping will be hard though

I’ve skimmed through that video, and the first link seems to combine it with a more nuanced and natural way. The main issue is screen space though, as you said. The first videos seems to have the paint always looking in screen space.


screen space normal.blend (2.9 MB)
I do have an example of screen space normal map application. Even if I’m not sure it is mathematically correct.

Also, consider making work in progress thread for your project maybe? This way you’ll attract more responses and less will be left to the guessing game

1 Like