['Addon']Projection Ops


Collection of operators focused on projecting onto and mirroring over surfaces. Designed to be pretty basic to use by just calling an operator with appropriate selection. Could say it’s semi-WIP as i dont know when i’ll work on them but if you find a bug you can report it here :slight_smile:

Contains:

  • Project Mesh(es) onto Active
    - Project/Snap selected meshes along the camera view onto a target mesh

  • Project Mesh onto UV Surface
    - Projects a mesh onto the UV surface of the active mesh
    - Allows the projection to be moved over the surface in relation to UV mapping

  • Mirror Mesh over Defined Surface
    - Dynamic mirroring, mirrors along face normals of the active mesh object.

  • Align Selection to View
    - Aligns selection to the view, rotating a specified local axis to face the camera

Perhaps not the tools you need in every scenario but can help you solve problems :slight_smile:

Install:
Use the download link below and unpack the map with all .py files into the blender addon folder or use ‘install from file’ in blender: Googled install tutorial. In user preferences the addon is found in: Mesh -> Projection Operators

Download link
Github link

Did a timelapse showcasing projecting onto UV map:

Also did a tutorial-ish video of how to use them, not really my cup of tea so to say but i though it could be good to make one even if it was mostly for me trying to make a tutorial xD :

Perhaps there is other addons doing similar things out there would be gr8 to know but made them to solve problems (and to test if i could solve them) :slight_smile:

Notes*
The algo to find the UV mapping target is fairly rudimentary but works well on basic surfaces.
Mirror algo has a terrible worst case if you have a mirror with higher density then the source mesh you want to mirror (source with ~30k+ verts).
Tested for version 2.77a

Happy bl?

2 Likes

This is close to Modo’s Mesh fusion. Thank you!

Osares,
Congratulations, a GREAT addon! Thanks a lot!
I will use it! :cool:

Oh yes, a great addon, thank you very much!

Looks, really handy, thanks.

Thanks to everyone who found this thread even if i managed to post it in the wrong section :eek: I hope they’ll help to solve a problem for you :slight_smile: (and not cause any trouble :no: ).

@soul Did not find the similarity to mesh fusion by looking on their promotion video, it looked more like hardops. This is pretty much just math operations aligning objects on a surface (and mirroring).

Ah, okay, but I saw some Mesh Fusion Features video when it came out and I think they presented aligning meshes to the other mesh surfaces as new ability.
But thank you.

Np i’m honored that you wanted to compare it to something like that but i don’t want any confusion to what it could actually do as their video was all about bool tool operations (which are awesome but unrelated).

However they could be used with it if you had a object you wanted to cut out of a mesh “as is” on a curved surface (not missing half the object as it’s outside the target) you could, project -> mirror (or just offset inward :S) -> bool tool.

Even though the mirror operation atm does not work on a mesh with “thickness” (quite dubious what mirroring through a bookshelf would actually relate to :P) i could always find the target surface and use it as a mirror :wink:

Perhaps it’s something doable with hardops (or similar: Mesh Fusion) but it’s a experience i lack, including most of the non-blender tools that exists. And if i can’t find a solution on google or seen in a tutorial it doesn’t exist :stuck_out_tongue:

This toolset seems really awesome from what ive seen so far, looks great! Im wondering however, how do the project from UV function handle more complicated shapes?

A few days ago I found this guy and his script that basically is using a form of “mesh flattening based on UV” along with blend shapes (shape keys) to add details to curved and complicated meshes.

And with a base script from here, and some own alterations of my non coding selfe, ive gotten 90% of the way. last thing to do would be to add a sort of “envelope” for the mesh deformer to allow for non closed meshes. would your tools be able to go the rest of the way? or even replace the workflow completely?

Might give ya a few ideas :slight_smile:

Just tried to reproduce…but got errors instead.

…Invalid key, must be BMLayerItem

Sounds like the UV map key was corrupted or non-existing will look into it (no uv map or i’ve handled the uv key incorrectly).

@Jinxatron

Looked through the video and this is pretty much what my script does without giving you the tools to give so precise control (or fancy blend animation :P) instead you have to transform it visually on the surface to get correct alignment. This can be tricky as the fitting might seem a bit ambigous (especially if there is stuff sticking out from the surface and/or bad uv map).

What the script does is it finds a rectangle representation on the UV map for the box encapsulating the mesh.

Imagine a rectangle on the uv map and then place the mesh box ontop of it. Each vertex will be placed ontop of the uv face covering it (looking from above). The problem with this method is finding the right rectangle on the UV map. This can be tricky as right now the “projection” part of the op is projecting points between each corner and origo (until it “connects” with the target surface) and uses the UV coordinate of that point to generate the rectangle (the interpolated points uv coord will be seen as having the same linear relation to the corner). This can generate a poor “projection” if one of the (4) samples is bad and especially since the sample can be taken from outside the mesh bounds (since the box corners can be way outside the visual mesh).

Better sampling methods would make it better but never perfect. It would definately be better and i’ve the intention of it but i need to find a good method to implement first! And it never really fit my time frame when doing it for myself. Giving multiple sampling options would be a great idea moving forward giving the user a sence of control :P.

So while i found the suggestion compelling (and i though about doing in similar manner but it didn’t suit my needs) it would probably be another operator (or multiple) doing the same thing but with more control and more overhead. Flow: op:generate a target -> place mesh ontop -> op:transform etc (multiple operator calls to generate one result, not a fan but might be necessary)

Might have gone off-topic, slightly, but it pretty much explains how the script works :wink: Most of the remaining solution to your problem is in my script if you can understand the math, but i think it’s easier to write it myself if otherwise.

Replicated the error when trying to project onto a object without a UV map, added an error message. If that was not the issue i need some more info on the events that caused the error.

Cheers

Don’t detect the addon in OSX, blender 2.78

Not ‘supported’ atm, will check and see if i can fix it tomorrow

Ok, works, but I need to enter to the “application” pack and add the addon manually

Really cool, do you have intention to make this a modifier?

Yes it seems like blender doesn’t like the second map folder i got from github so installing it needs to be done manually (putting the folder with the .py files into the addon folder). I’ll try to make it easier.

Not sure about modifiers it wouldn’t be impossible, i think placing a mesh ontop of the UV surface would be a contender but it would probably require another design to how it works currently.

Your method works quite well, But without a visual guide of the UV it as you said, lack the precision of being able to move and tweak the placement. I tried it on a few meshes, and the ones that where least effective where interior shapes such as the inside of a cylinder for example.

the only issue i have with the script I was working on was that even if the script works, the mesh deformer in blender need the “master” mesh to envelop the mesh you want to adhere to its surface. this causes a lot of weird deformation when you move it back to its normal shape after flattening, so i will see if i can find a alternative.

Well, if you make a modifier you have buyer here

  • Redesign: Project Mesh(es) onto Active
    + Projects entire selection as a single object (as opposed to individually)
    + Allows setting the object’s local/view axis that determines the depth of the selection (and the offset from surface)
    + Added setting for determining the object treated as the parent of the selection (and which local axis to use)
    - Removed setting that aligns selection to the view, selection is projected from visual location.
  • Added Op: Align Selection to View
    + Aligns selection to the view window. Rotating objects so a specified axis faces the ‘camera’.
    + Setting determines a parent that decides the rotation of the selection.

Minor changes to not make things ‘easier’ to use. Broke tutorial for how affected ops work, but should now behave ‘better’ :cool:.

Cheers