3
$\begingroup$

To clarify things, as most of the firsts answers suggest I need a better wording:

  • I'm looking for something like the "smart UV Project" unwrapping method but real time (like a node or mix of node in the material or a projection mode in the texture property or a modifier, whatever adapt to changing meshes)

  • Why real time and not through unwrapping ? Because most of our objects are parametric, most of the geometry comes from modifiers for ease of management, memory efficiency and many other reason which makes applying those modifier impossible without involving 10x time the workload for the project. So we sometime have only 2D meshes, the rest is an animated modifier stack. As our objects are mostly not organic, stretching is not wanted. Another reason are big meshes (more than a million polygons, really hard to unwrap).

Original Version:

I would like my texture to always keep a scale and be orthogonally projected following the ngon's normal it's projected on, without unwrapping, so that textures never get distorted, whatever modifications are made to the mesh in edit or object mode. (so if you look at an ngon with orthogonal view mode, facing the ngon, the texture looks exactly like in the image editor)

I Tried "box" projection mode in texture panel. It works to some extent on a plane with "texture coordinates" set to "object". I can move edges and scale, but if I rotate the mesh on the x or y axis, it starts to distort because the projection is in object coordinate instead of following the ngon normal.

The solution should work on complex meshes.

$\endgroup$
  • $\begingroup$ When using Object mapping, why aren't you using vertex parenting? You can choose 3 vertices in your ngon and make them the parent of your control object (probably an Empty). Then, when you rotate your mesh, the control object moves with it correctly. $\endgroup$ – Fweeb Oct 23 '13 at 13:17
  • $\begingroup$ Why no unwrapping? $\endgroup$ – wchargin Oct 23 '13 at 13:30
  • $\begingroup$ Why no unwrapping? Because it breaks as soon as vertices are moved : it doesn't allow big movement with shapekeys or real time visualisation of modifications and involves repetitive steps. Without to mention that unwraping a 1 000 000 vertices mesh every 30sec is pretty slow. $\endgroup$ – matali Oct 23 '13 at 19:36
  • $\begingroup$ Another reason, is that many of our objects are parametric/made with modifiers (like 2d shapes who are only automatically extruded with an animated solidify modifier, etc...) Here is the solution of unwrapping simply impossible (maybe through an unwrapping modifier ? like a "smart UV Project" modifier. But it would be a feature request) $\endgroup$ – matali Oct 24 '13 at 6:38
  • $\begingroup$ @Fweeb I'm not sure what you mean with vertex parenting. Could you give an example with image/blend file? Would I have to add 1 empty per ngon (hard on many million ngon meshes) ? $\endgroup$ – matali Oct 24 '13 at 11:47
4
$\begingroup$

If you don't want to unwrap, the only way I know how to achieve what you are asking for is by using 3D procedural texture shaders. You can achieve some very impressive results if you learn how to work with them and or code them yourself. Blender has some built in that you can layer up on top of each other, though it will likely take you a lot longer than unwrapping UVs and painting to make look nice.

Note that with procedural textures, you will lose a lot of control. With procedural textures you are trying to emulate a texture using math. So getting a dent or scratch right where you want it is difficult, getting an image like a decal is nearly impossible - or will still require unwrapping UVs and a good ol' fashioned texture. So basically procedural textures are really good if you have a repeating natural pattern such as landscapes, dirt, rock, metal, wood, cement, but not for highly controlled images/decals.

If you need your model to deform, you need to use refP or whatever the Blender equivalent is (relatively new to Blender myself.) Essentially, because you are using vertex positions as the coordinates (world space or object space) instead of UVs, if the vertex positions change or morph, your texture will swim unless you are using a static reference position/frame as your texture coordinate.

So moral of the story, if you have a deforming object or an object which needs a high amount of control and or decals/images, you are stuck with UV unwrapping. Honestly UV mapping is relatively painless in Blender with their seams. I prefer this method to all other solutions I have seen.

I know Disney came up with some form of mapping which made it so you don't have to unwrap or mess with UVs called Ptex, you just paint directly on the faces and each face stores its own image map of sorts (texels). But Blender obviously does not have that in their toolset. Here's the reference on that: http://ptex.us/

$\endgroup$
  • $\begingroup$ here is an informative thread on Ptex, OpenSubDiv, and Blender: blenderartists.org/forum/archive/index.php/t-275832.html $\endgroup$ – dimus Oct 23 '13 at 18:43
  • $\begingroup$ Welcome to blender PolyMesh :) Congratulation for your answer, you took care of the question. I tried to find those control points you speak about, but couldn't find anything about it. OSL seems to be a good mix of procedural and it seems I can plug textures in osl nodes, but OSL+texture nodes makes rendering 5x slower than without (both render in CPU mode)on my PC and it's a replicable bug on many computers, seems to be inherent to the actual implementation with OpenImageIO or something. $\endgroup$ – matali Oct 23 '13 at 19:26
  • $\begingroup$ So in the end, it would do the job in theory but in practice, it's 3x5=15x slower than GPU rendering which is way to slow :( We don't have a programmer team to get 100% procedural textures for all our needs. To resume, I would be happy if you give more info on those control points :) $\endgroup$ – matali Oct 23 '13 at 19:31
  • $\begingroup$ Thanks! If by control points you mean refP, you could just generate a custom vertex attribute which is equivalent to the vertex position, just set this once after modifying the geometry as it is a "reference position" of the vertices. Then in your OSL shader simply use that custom attribute when doing texture lookups. I have zero experience with OSL in Blender, but my understanding is that OSL is similar and based off RSL, which I am familiar with. Hope that helps :) $\endgroup$ – PolyMesh Oct 23 '13 at 19:35
1
$\begingroup$

You can use Smart unwrap and set the angle to 0. This will make each ngon an island (unless they are totally flat I think).

It will look like this: unwrapped ball

$\endgroup$
  • $\begingroup$ Hi Gunslinger, the result is good and I know this option, I'm looking for that without unwraping (if possible at all) to allow quick modification and visualisation of the modification. $\endgroup$ – matali Oct 23 '13 at 19:33
  • $\begingroup$ and as explained above, some of our objects can't even be unwrapped (parametric objects or object of which most of the geometry comes from modifiers which can't be applied) $\endgroup$ – matali Oct 24 '13 at 6:41
  • $\begingroup$ My guess is you have to dive into python then. But as you have one million ngons, it will not be very snappy. :-/ $\endgroup$ – Gunslinger Oct 24 '13 at 17:33
1
$\begingroup$

You can select all in edit mode with A and then Ctrl E-> Mark Seam and unwrap, then every face will get it's own part of the texture (it still will distort though if you distort the face)

$\endgroup$
  • $\begingroup$ Thanks dimus, but as explained above, some of our objects can't even be unwrapped (parametric objects or object of which most of the geometry is from modifiers which can't be applied) $\endgroup$ – matali Oct 24 '13 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.