Take the 2-minute tour ×
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It's 100% free, no registration required.

I'm trying to fade an object's regular solid surface into its wireframe.

I've got as far as duplicating the object and deleting vertices until I'm left with an area of overlap.

enter image description here

Is it possible to render this in such a way that there is a smooth transition at the area of overlap? Maybe there is a better way to achieve this effect?

Another example: enter image description here

share|improve this question
    
What does "fade an object's regular solid surface into its wireframe" mean? You want to animate it as a diffuse and then it slowly turns transparent, showing the wireframe? There's a way to do that. What does "a smooth transition at the area of overlap" mean? –  Qutorial Mar 22 at 13:35
    
I just want a single frame render. The render I posted is of two hemispheres which overlap a little bit. I'd like the area where they overlap to be "blurred" such that instead of the solid surface ending and the wireframe starting, there is a "transition/fade" from surface to wireframe. –  ajwood Mar 22 at 13:44
    
So you want it to be gradually more transparent on that last ring of faces till it fades to fully transparent? –  Qutorial Mar 22 at 13:46
    
That would probably achieve the look I'm going for, yeah –  ajwood Mar 22 at 13:51

3 Answers 3

up vote 3 down vote accepted

You can do this using the compositor and different scenes. This method uses three scenes: one for the regular shaded sphere, one for the wireframe and one that we will use as a factor input to blend between the two. Maybe there are better ways to do this.

  1. I am assuming you have you scene set up with a sphere, plane, and the lights.

    enter image description here

  2. Rename the current scene to something like sphere_shaded to be able to differentiate it better form the other we will create

    enter image description here

  3. Create a Full Copy of the scene and rename it to something like sphere_wireframe

    enter image description here

  4. Make sure you are in the sphere_wireframe scene: Select the sphere and add a Wireframe Modifier to it

    enter image description here

  5. Go back to the sphere_shaded scene and create another Full Copy, let's call it sphere_fac

  6. In the sphere_fac scene delete everything besides the sphere and the camera

  7. In the the same scene add a lamp, I will chose an area lamp but any other will do

  8. Change the background of the scene to black

    • go the World Panel -> Surface -> Color

    enter image description here

  9. Position the light so that half of the sphere visible to the camera is getting light and the other half is in the shadows.

    • To make this task easier you can got into the camera view and turn and set the viewport type to rendered

    enter image description here

  10. Render out all scenes, F12

  11. Switch to the Node Editor and switch to the compositing nodes. Enable use nodes and backrdrop

    enter image description here

    enter image description here

  12. Add in the other render scenes

    • By default there should be one render scene already in the node view, duplicate it and form the name drop down choose the others.

    enter image description here

  13. Add a Color -> Mix node

    • Fac: plug in sphere_fac

    • Image: sphere_shaded

    • Image: sphere_wireframe

    enter image description here

  14. To get more control over the transition you can adjust the sphere_fac node a bit

    • RGB curves: good control, a little overkill I think for this

    • Brightness/Contrast: to simple

    • Color Ramp: simple, enough control

    I will use a Color Ramp in this case: Converter -> Color Ramp adjust the two slider on either side to your liking

    enter image description here


Final Result

enter image description here

Same technique with a point lamp

enter image description here

share|improve this answer
    
Hmm.. this lighting method will only work when it's a nice sphere. I'd like to actually do this on a more complex object. –  ajwood Mar 22 at 14:53
    
@ajwood in that case you can use a simple gradient as an image for the effect. –  Vader Mar 22 at 15:17
    
I don't think a simple gradient would work. The boundary between shaded and wireframe could be any shape. –  ajwood Mar 22 at 15:28

You can achieve the same effect with the following material setup:

enter image description here

Detail of node setup:

enter image description here

If you want the blur to conform to the shape of the hole, put a black and white UV/image texture node in the factor slot of your mix shader instead. You will have to paint the texture yourself with texture painting or in photoshop, but once you have it UV mapped onto your object, it will achieve the effect you're looking for (I think).

See this, it tells you how to use an image mask as a mix factor for a material in cycles: Add different materials to different parts of a mesh?

share|improve this answer
    
This would be perfect if I could get a texture that measures the distance to the "edge" of the object (my vocabulary is hurting... "unclosed edge"?) –  ajwood Mar 22 at 15:08

According to what you illustrated, I would propose a non-compositing way by using modifiers only:

  1. Enter Edit Mode, Select one face as where the transition starts, ShiftS > Cursor to Selected to snap cursor to that face;
  2. Select all faces, press Spacebar and search for Sort Mesh Elements, choose Cursor Distance in the popup menu, press F6 and toggle Reverse;
  3. Create a duplication for the original object, repeat the last two steps on it, just leave Reverse untoggled;
  4. Add Build modifier to the original object, toggle Reverse in the modifier stack;
  5. Add a Wireframe modifier and a Build modifier to the duplicated object, leave Reverse untoggled this time.

After tweaking the modifier settings a bit, you will simply get something like this when playing animation:

enter image description here

Example file FYI.

share|improve this answer
    
I see you would like the SMOOTH way here. In that case, you have to use nodes. Anyway, just wanna share with this trick, supposing it would be also useful for some cases. –  Leon Cheung Mar 22 at 17:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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