Author Topic: Fading of specified layers  (Read 409 times)

adriank

  • Sr. Member
  • ****
  • Posts: 428
Fading of specified layers
« on: January 20, 2017, 12:24:40 AM »
I'd find it very useful if there was a way to temporarily 'fade to background' specified layers of a drawing so that a specific item on the drawing can be made to stand out.
The job I'm working on requires me to give setting-out dimensions on a masterplan which is becoming quite congested with other information & the dimensions are hard to see.
I can't turn off the other layers because it's that info I'm trying to dimension, but I'd like to be able to 'fade' it to make the new info stand out. I've done a 'workaround' by drawing a hatch pattern over the drawing (ANSI37) which I've made 'paper color', putting only the dimensions on top of it.

That's a pretty rough solution TBH because if I zoom in on a PDF it has no effect & when I zoom out it blocks out too much.

If I make an image file of the plan & fade that with an image editor (in a new drawing) the file is very large or very poor quality, and I don't have any accurate points to dimension.

The screen captures attached give some idea of what I'd like to achieve.

Adrian

Bob P

  • Hero Member
  • *****
  • Posts: 1157
    • Era Replica Automobiles
Re: Fading of specified layers
« Reply #1 on: January 20, 2017, 02:21:34 AM »
The only way I can think of is to duplicate what you need into a new layer (and modify the colors to "fade") and hide the old layers. Reverse the show/hide to bring back your original drawing. If doing that makes the drawing too large, make the faded drawing a symbol. You'll have to draw your annotations in a layer that doesn't get hidden though.

Dr PR

  • Hero Member
  • *****
  • Posts: 5436
Re: Fading of specified layers
« Reply #2 on: January 20, 2017, 07:20:23 AM »
This is pretty far-fetched, but it might work. But it might be too much trouble to bother with.

With 3D shading you can enable "fogging." This sort of does what you want - more distant objects fade into the haze. At least that is the way it is supposed to work (I have only experimented with it once).

You could view your drawing in 3D using "parallel" or "top" views. Be sure everything is Z=0 (assuming that your drawing is in the XY plane).

When you want to fade out all but one layer you could select everything in that layer and give it a large -Z value to "raise" it above the base plane of the drawing. Just select everything, set a handle, start "Move" and use "Point Relative" to move the desired Z distance. You will have to experiment to see what Z value works best.

This might fog out the background layers to achieve your "faded" effect. However, text, lines and hatches do not display the same with 3D views as with 2D views, so this might not be satisfactory.

Phil
DesignCAD user since 1987

Lar

  • Hero Member
  • *****
  • Posts: 2542
Re: Fading of specified layers
« Reply #3 on: January 20, 2017, 10:00:57 AM »
What I do is make everything a temporary block, give it a light color and disable 'use original color' Since you have to snap make sure enable snapping to symbol. You also have the separate option of viewing the block as a box. This ability to mix'n match the 'view as box' option with the 'enable/disable snapping' option is very powerful.

For safety, when first defining the block you can enable 'retain' (so the originals don't be absorbed into the block), then turn off the layers of the entities that make up the block, enable 'block visibility by host' and then insert the block on an empty visible layer.

When done, redefine something small to be that block so the file don't be enlarged (since the 'retain' option would create a duplication of the blocked entities).

Lar

adriank

  • Sr. Member
  • ****
  • Posts: 428
Re: Fading of specified layers
« Reply #4 on: January 21, 2017, 08:58:26 PM »
Thanks for the good ideas guys!
Lars' idea is interesting, but I'm trying to keep all the original colors (to make identifying the elements of the drawing easier) but just fade them to 'background'.
I could also make a copy of the file & re-color all the background layers for the sake of the final print, but unless I make them all the same grey, that'd take forever.
I really like Phil's idea so I had a go at that!
I've used fogging in 3Ds before but never got to grips with how to set the start & stop points, it's always been a pot-luck affair to get the result I wanted. After finally trying to work it out, I've discovered there are bugs that explain why it's so hard to set.
According to the help topic fogging is only available in GDI mode - however, in GDI mode there is a major failing that no lines, curves, dimensions etc are displayed wherever they overlap a solid or plane (or even a hatch pattern as I discovered).
Fogging can however be used in Open GL mode too- and in that mode lines etc do display correctly on top of solids.
Take a look at the sample drawing I did with a vector-line sphere in front of a solid block (orange)  and some solid hatch (blue). I added a few dimensions, a curve and some pointmarks to check those too. They all disappear when they are in front of any object in GDI, Interestingly even the parts of a pointmark that are not in front of an object disappears too. (this happens regardless of if fogging is used or not)
Clearly GDI mode is too broken to be of use to me in Phil's idea, but maybe OpenGL mode would work...
After playing with fogging settings I realized that a start point of '0' is equal to the nearest part of the model and '1' is the furthest part of the model.
If you want the fog to start 1/2 way back in your current view, set it at '0.5'. The 'Fog Stop Position' seems to be mis-named, as it actually seems to change how quickly the fog reaches max density - the fog never actually stops.
So far so good, I thought!
That was where logic ran out though, because when I tried to view my 3d model in 'topview' to simulate a 2D plan the fogging order reversed itself and from the start point it fogged toward me instead of away from me. Only in OpenGL mode though. In GDI it fogged away correctly, but it promotes all the hatches to the foreground, in front of the fog and all the vectors in the drawing too.

So, I worked out that GDI rendering is broken if you have vectors in your drawing, and the fogging tool has some cracks in it too. But, I'd still like an option to fade specific layers, possibly located in the print options? That way there is no chance to damage the actual drawing.

Dr PR

  • Hero Member
  • *****
  • Posts: 5436
Re: Fading of specified layers
« Reply #5 on: January 21, 2017, 10:40:50 PM »
Adrian,

Good try! I would have been surprised if it had worked satisfactorily.

In 3D rendering only planes, grids and solids render with color. If your original 2D drawings don't use any of these things yoou ight not have the problem of things getting hidden.

For the things that were displayed in the back in GDI rendering, did you try playing with the display order? However, that really would make things complicated in drawings with many layers or many objects, so I guess it would be too much trouble.

Phil
DesignCAD user since 1987

adriank

  • Sr. Member
  • ****
  • Posts: 428
Re: Fading of specified layers
« Reply #6 on: January 22, 2017, 04:53:01 AM »
Hi Phil,
The display order makes no difference I'm afraid, and it was the hatches that were giving me trouble in 3D topview mode. (solid hatches, that is)

I had another brainwave, still pursuing your idea, of putting a plane with transparency properties (glass) between the dimensions & the plan & got quite excited that it might work - but again in topview the glass plane came in front of everything even though it was drawn well behind the dimensions.
It did give a lovely faded effect though - about as much use as the lovely faded effect that the whole drawing gets just after DCad crashes!!

I'm back to a hatch mesh that gives a similar effect as looking through a flyscreen - thanks for all your help though.
 :)
Adrian

Dr PR

  • Hero Member
  • *****
  • Posts: 5436
Re: Fading of specified layers
« Reply #7 on: January 22, 2017, 10:55:38 AM »
Adrian,

When you looked at the top view did you select "Top View" in the projection field in the View Tool Box, or did you rotate the view to look down from the top?

You can rotate using the "Set View by Drawing Center" tool, or you can just enter 0, 90 and 0 in the horizontal, vertical and rotation angle fields in the tool bar.

If you use the "Parallel" projection you won't get parallax distortion as you would with the "Perspective" projection.

I was wondering if it is something about the "Top View" projection that was messing up the display order.

Phil
DesignCAD user since 1987