News:

Please note new Forum URL: forum.designcad.com

Main Menu
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.

Rendering bug

Started by Dr PR, July 12, 2009, 05:58:21 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Dr PR

DesignCAD V19.0
Vista 64 SP1

I created a drawing having only one object, a 3D cone. I selected the object and opened the Info Box, then selected the material "White."

Next I opened the Options dialog and set up a directional light and enabled shadows.

The cone rendered OK with Gouraud and hardware acceleration.

With hardware acceleration off and Phong shading I get the results shown in the picture. Facets of the cone are rendered - they shouldn't be. The facets are not rendered in even shading, but in a combination of bright and dark. Near the apex of the cone the shading breaks sharply. This happens regardless of the light angle.
DesignCAD user since 1987

magic

Hi DrPR,

You get a similar result with shadows off and other materials (in the example: Brass)

It's a kind of magic!




Adrian 2.0

Also with the default material!
The unwanted rendering is not of the facets, (the lines created do not converge on the apex) they appear to be parallel lines generated from the base points. So I wonder if this is related to the issue of circles projecting shadows backwards toward the light? Possibly a projected 'shadow'. Also, if you rotate the object to look at the 'back' the lines disappear and the surface is smooth.

If I draw a polygon the same as the base of the cone and then extrude it to a point, I create exactly the same entity solid and it renders correctly.

DrollTroll

This has actually been around for a long while. My understanding from "way back when" is that it's because the scanline rendering algorithm has problems smoothing the normals correctly where long narrow strips meet other faces at a sharp angle. If we were to subdivide the sides of the cone axially into a finer grid, this would be far less apparent.

You can mitigate this manually somewhat with the Info Box. Select the cone, click on the "Show Detail" button, and choose Change Grid Lines. Change the number of grid points from 2 to some larger number (try five or ten, for example), and keep the "Linear Interpolation" box checked. This will move the problem area closer to the tip.
25 years with DesignCAD

Dr PR

DT,

Thanks.

I solved the problem (well, changed it) in another way. Rather that use a cone or sweep a line around a point to make a cone-shaped grid (it has the same rendering problem) i tried this:

1. Draw a line at the angle from the tip of the cone to a point on the base.

2. Use the tickmarks function to divide the line into many segments.

3. Erase the original (2 point) line.

4. Draw a new line (V) with points at each tick mark (many points).

5. Sweep the line 360 degrees about the axis of the cone. This generates a many faceted surface that looks like a cone.

As DT noted the problem doesn't go away, it is just limited to the tiny triangular segments at the tip of the cone.

This works well for more complex surfaces that a simple cone.
DesignCAD user since 1987

DrollTroll

<Andy Serkis Mode>
Good Sm
25 years with DesignCAD