MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

Offset problem when using same texture for a vectorizer and a displacer to create a leaf...

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Pierre Paslier
Offset problem when using same texture for a vectorizer and a displacer to create a leaf...
on Sep 11, 2016 at 10:21:36 pm

Hi everyone,

I'm a bit stuck with this problem.
I want to create a 3d model of a leaf from a photo (with a black background). The goal is to get a 3d mesh for 3d printing. I've used the vectorizer to "cut out" the non leaf part of the image, then extruded it (using quads and a regular grid with plenty of pixels). The next step is to use the same photo to displace this mesh to get the actual depth of the veins. To do that I applied a displacer, then loaded my photo for the custom shader. The problem is that the displacer is actually offset from the detoured vectorized extrusion. I've tried to play around with the Offset & Length parameters under Mapping but it's not very precise, especially for the leafstalk.
What am I doing wrong? Shouldn't the two textures overlap perfectly?
Any other way to get and do this?
Help very much appreciated.
Cheers everyone!

Pierre


Return to posts index

Brian Jones
Re: Offset problem when using same texture for a vectorizer and a displacer to create a leaf...
on Sep 12, 2016 at 2:44:12 am

can you post the scene file? I'd have to guess a projection difference between the Vectorizer and the Displacer but since that's not the way I would have approached it (likely) I'd have to see the file to work it out.


Return to posts index

Pierre Paslier
Re: Offset problem when using same texture for a vectorizer and a displacer to create a leaf...
on Sep 12, 2016 at 9:00:10 am

Thx Brian,
Here is the scene file. What matters for me is the result so if you think there is a better way, I'm definitely interested! The project will involve doing this for a lot of leaves so I'm keen on finding a rather automatic way to generate 3d models from the photos. I'd have hoped that using the same texture for the poly outline and the displacer would have mapped perfectly onto each other, which means I could Xpresso something for the 1000 leaves to come...
10525_leaf.zip
Cheers!


Return to posts index


Brian Jones
Re: Offset problem when using same texture for a vectorizer and a displacer to create a leaf...
on Sep 13, 2016 at 2:57:09 pm

Vectorizer and Displacer definitely don't seem to play nice together. Displacer seems to change it's width narrower with every change of it's Mapping/Length U (at least here). If I use the texture you have in there rather than the Displacer it's just a matter of changing Length U there to 64.5 to get it to line up. That should be what works with Displacer but it doesn't seem to for me.
As to a better way, I would try using a flat surface then adding thickness later but there are a lot of issues
- a leaf is usually (except for the veins) the same thickness throughout and adding displacement on a parametric object (the extrude in this case) means the normals are all facing outward so wherever your leaf bulges outwards due to displacement on one side it will do the same on the other side and the leaf gets thicker there.
- using a color image as the bump map is often done but is not actually accurate - displacement goes up for white and down (or zero depending on settings) for black and in your image the veins are darker than the leaf surface so they are actually depressing in the surface rather than raising above it (true for the stem as well). You may have to make a bump map from the color image but that depends on whether you need that level of reality in your 3D print. If you have 1000 to do also a problem. depends on the leaf images and whether you can process them quickly somehow.
- another problem with displacement on an object with thickness already is that it displaces the sides as well, you can control that with poly selections with a displacement texture but not with the Displacer that I know of.


Return to posts index

Pierre Paslier
Re: Offset problem when using same texture for a vectorizer and a displacer to create a leaf...
on Sep 13, 2016 at 4:16:50 pm

Thx Brian,
Very helpful to understand better how vectorizer and displacer stack up... or not.
The nature of the project is more artistic than science precision, so what I'm after is a simple way to start with 1000 pictures of real leaves and end up with 1000 leaf shapes polygons that have some sort of "microtexture" and some thickness that would make them 3d printable.
I like your suggestion to start flat? Would it be easier to displace a plane and then cut out the leaf? Boolean?
Any idea how to get 80% of the result with 20% of the work?
Cheers,
Pierre


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]