How to - advanced Vectorizer?
I'm struggling with the vectorizer.
I want to create a spline using the vectorizer, and extrude.
So far, so good. However, I want to then project the original texture back on to the front face of the new geometry. You'd think this would be easy right - same image projected onto its own outline, should line up perfectly? It doesn't. I can manipulate it manually by messing with the offset/length on the texture tag or using the texture tool, but this seems very clumsy and near impossible to match perfectly. I should also note that I am aware that there may be discrepancies at the edge of the texture due to the Vectorizer output not perfectly matching the original images alpha, however, I would have thought it should be the case that I can map the original image as a texture to the vectorizer output, and have the vectorizer errors be the only source of issue, not the added issues caused by my manual attempts to scale and map the texture to the shape.
Can someone please explain a precise method for accurately projecting the texture back onto its own geometry so it fills the frontal face of the extrusion perfectly?
I've attached an image to try and demonstrate the issue.
This is driving me crazy, thank you in advance for any assistance!
I think you forgot to provide the image but I may have an idea of what's happening based on your description:
The black parts of the image are knocked out by the vectorizer. So let's say you have a square image that is 100x100 pixels and the top half (100x50 pixels) are black and the bottom half are colored. The resulting spline will have a with/height ratio of 2/1 and your 1/1 ratio image will not project onto that correctly unless you scale the V. In this scenario the math is easy but may be troublesome if all edges of the image are black and the graphic is not perfectly centered and symmetrical.
Basically any time the negative space of the image completely covers at least two adjacent edges of the image, the resulting spline will not match the original image w/h ratio because the vectorizer is cropping that negative space out and the resulting splines are no longer the same relative dimensions as the source image.
I can't say if the following solution will be any less clunky but you could try the following:
- Paint in a solid color along those offending edges of the image (just a thin strip)
- Create the Vectorizer object and extrude it.
- Add the material
- Change the material tag from UVW mapping to Flat
- Add a Spline Mask in place of the Vectorizer Object under the Extrude
- Make the Vectorizer object and a new rectangle spline object children of the Spline mask
- Position the rectangle spline object to cover the edge that is created as a result of the paint in on the image
- Set the Spline Mask mode to A subtract B
Thanks for your detailed response. Yes I forgot the image but you nailed it, that was the exact issue! I did not realize I could subtract one spline from the other inside of the extrude to fix it. I tried flat mapping but it turns out that was only part of the solution. SOLVED
I also found that if the graphic was properly centred I could also use the 'fit to object command' though this only applied in some cases (ie not the two-edge cases you referenced)
I also learned a valuable lesson - geometry from splines are a nightmare if you intend to project the original texture the spline was vectorised from, as their will always be issues with the alpha if you also want post depth of field - won't be making this mistake again, will use a different approach. Sadly this time I was days in to the project before I realised my issue so had no choice but to keep going - thanks for saving me!