DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

New shadows

Started by Dr PR, June 13, 2011, 10:31:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr PR

I have been experimenting with the"Options" menu "Use New Shadows" feature that was introduced in V21.0.

One of the annoying things about the original shadows introduced in V17 was that tall thin objects, like antennas, sometimes projected two narrow parallel shadows. These "old" shadows are still produced if the "Use New Shadows" option is disabled (not selected) - see the "shadow test small old.jpg" image.

With "Use New Shadows" enabled shadows may be much sharper and more realistic. See the "shadow test small new.jpg" image. This is a definite improvement!

These images were generated with the "File/Image/Save Image File" function, using screen resolution and the "Smooth Shading" option. Shadow map was 2048x2048, Shadow Softness was 0.3, and Shadow Tolerance was 0. Only the objects shown in the images were enabled in the drawing.

The drawing also contained a layer with a very large surface (20x the surface visible in the first two images) and another small object far above the objects visible in the pictures. When these objects are enabled the results are quite different - see the "shadow test large new.jpg" image. The results appear to be the same if the "Use New Shadows" option is enabled or disabled. As you can see the shadows are more blurry and the double shadow effect is visible. Image size is the same as the first two pictures, and the visible area was the same (same zoom level and image center).

EDIT: After creating all of these shadow combinations I tried to repeat the double shadow image shown in "shadow test small old.jpg" but all I can get now is the same image as in "shadow test small new.jpg." This happened even after I closed the program and restarted. Go figure?!

Phil
DesignCAD user since 1987

Dr PR

The "Options/Lighting/shadows" dialog has a feature called "Shadow Tolerance." I experimented a bit with this.

Shadows were created using the 2048x2048 Shadow Map, and Shadow Softness 0.3. Three images were captured with the "File/Image/Save Image File" function using the screen size pixels and Smooth Shading. The first image had a Shadow Tolerance of 0%, the second was 52% and the third was 100%. The image zoom and view position were the same for all images.

As you can see from the images below, all Shadow Tolerance appears to do is cause the shadow to be disconnected from the object casting it. Another way to think of it is that as Shadow Tolerance increases the image gets more and more screwed up. This is the same with both old and new shadows.

I always work with Shadow Tolerance set to 0%.

Phil
DesignCAD user since 1987

Rob S

Thanks, DR, it is really useful to have some examples of what these settings are supposed to do.

If anyone knows what the other two settings do, it would be helpful to have that here in this thread as well!!
User since forever

Dr PR

#3
Rob,

The Shadow Map allows you to determine the amount of "jaggies" in the shadows. The size of the drawing is divided by the resolution of the Shadow Map to determine the size of a shadow "pixel."

If the drawing Width = X:

Shadow Map    Pixel size
128x128           X/128
512x512           X/512
2048x2048        X/2048

As you can see, the larger the map the finer the shadows will be. If the drawing is very large, say 10,000 units wide, a shadow "pixel" will be about 78 units wide with a map of 128x128, but will be only about 4 units wide with a map of 2048x2048. This becomes important if you are trying to create an image of just a small part of the whole drawing, like a flower pot on the porch of a house. With a small Shadow Map the shadows will be very chunky with large jaggies.

Note: it is more complicated than this, but you get the idea.

The resolution of the shadows is different from the resolution of the image.

The larger the Shadow Map the longer it will take to generate the image.

I have attached some images made with the same settings except for the Shadow Map resolution of 128x128, 512x512 and 2048x2048. The difference is obvious.

Note: these images were made with the "Options/Use New Shadows" option disabled. The new shadows make finer resolution shadows in most cases - at least they aren't any worse than the old shadows.

Phil


DesignCAD user since 1987

Dr PR

Shadow Softness is actually the light/darkness of shadows.

A softness of 0.0 gives a totally black shadow. Softness of 1.0 gives no shadow at all. I usually work with a softness of 0.3 or 0.4.

Here are some images made with softness of 0.0, 0.5 and 1.0.

Phil
DesignCAD user since 1987

Rob S

You should write a book on DCAD 3D!

Actually, I think you already have, all you need to do is paste all your forum posts end to end, and add a table of contents!

There's much knowledge in them thar hills   ;D
User since forever

Dr PR

Yeh?

Well until today I didn't know CTRL-TAB would switch between open drawings, so I still have a lot to learn!

Phil
DesignCAD user since 1987