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.

Drawing type comparisons

Started by Dr PR, September 24, 2014, 01:26:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr PR

I wanted to compare old and new surfaces for file size and rendering speeds. I used the V24.0 beta 13 release for these tests.

I drew a simple cylinder with 36 facets using the main toolbox "Draw a Cylinder" function. Then I saved the file under three names, "grid cylinder," "cylindrical grid" and "solid surface cylinder."

For the "grid cylinder" operations I used the original native DesignCAD cylinder.
For the "cylindrical grid" operations I exploded (Solid Explode) the original cylinder and then deleted the two end polygons.
For the "solid surface cylinder" operations I selected the original cylinder and used "Edit/Selection Edit/Convert/Solid to Surface" function.

Then in each file I generated a 10x10x10 3D array of the objects to finish the test files.

1. I used the "Help/Drawing Info" function to get information about each file. I also compared file sizes.

                                   File size   Points    Entities    Comments
cylinder                       7775 kB   226000   40000     Grid surface entity (38000) + Plane (2000)
cylindrical grid             5117 kB   148000   38000     Grid surface entity (38000)
solid surface cylinder  3555 kB     72000     1000     Solid Surface Entity (1000)

2. Then I timed rendering using GDI Quick mode, OpenGL quick mode and RedSDK draft mode. RedSDK viewport size was 800x600 with entity auto update on and FPS counter disabled.

Display time (seconds)  GDI OpenGL RedSDK
cylinder                          2+     <1        <2
cylindrical grid                2+     <1        <2
solid surface cylinder      4       <1        <2

3. I was also interesting in display times while rotating the view with "Set View By Drawing Center" using GDI 3D WIREFRAME and RED WIREFRAME views.
VF = very fast, F = fast, VS = very slow, J = jerky or flickering.

View rotation                GDI    RedSDK
cylinder                          F-J       VF
cylindrical grid                F-J       VF
solid surface cylinder     VS-J     VF

GDI displays were essentially sequential jerky repeats of the display times in part 2 above. RedSDK rotations were very fast and smooth with no flicker or jerkiness.

4. I repeated step 3 using OpenGL 3D SHADE Quick shading with hardware acceleration enabled and RED SHADE.
VF = very fast, F = fast, S = slow, J = jerky or flickering.

View rotation                OpenGL    RedSDK
cylinder                             F-J            VF
cylindrical grid                   F-J            VF
solid surface cylinder        S-J            VF

The RedSDK performance was very fast and smooth for all object types with no noticable "flicker" or jerkiness. All OpenGL modes were a bit "jerky" but the solid surface file was noticeably slower and had more flicker to the display.

****

I compared the ordinary cylinder (a cylindrical grid and two end polygons) to just the simple cylindrical grid because I have used this trick to reduce file size in very large drawings. Often I use open grids with missing sides to represent solids where the missing side abuts another surface. In this case it reduced file size by 34%. There was no significant operational speed advantage in these small drawings, but with large drawings the files load faster and view rotations may be a bit faster with GDI and OpenGL.

The real surprise is with the Solid Surface objects - they reduce file size by 54%! However, you pay a significant view rotation speed penalty with GDI and OpenGL, especially in wireframe view.

In all cases RedSDK view rotations were very fast and smooth with no flickering. I have also seen this with 45 Mbyte files composed of only grids and planes.

Phil


DesignCAD user since 1987

Dr PR

#1
I was curious to see if the new Solid Surface entities would have fewer problems with solid Boolean operations than the older plane/grid DesignCAD solids. I used V24.0 beta 13 for this test.

I created two simple cylinders with only 18 facets whose axes intersected at a 30 degree angle - see attached "Solid add test 1.jpg" image. Then I selected them and duplicated (N) them twice to get three identical test configurations. Then I used "Solid Add" to combine the pairs of cylinders and rendered with OpenGL Gouraud shading.

The objects on the left are the original cylinders.

The middle objects were created by using "Solid Explode" to explode the two cylinders. Then the end polygons were deleted, leaving only two cylindrical grids. These were then defined to be solids with "Solid Define" so they would work with the solid Boolean operations.

The objects on the right were converted to solid surfaces using the "Edit/SelectionEdit/Convert/Solid to Surface" function.


****

I deliberately chose a low facet count (18) for the cylinders because I knew this would produce rendering anomalies with original solids and grids. You can see these where the arrows point in the left and center images. The red cylinder surface renders smooth at the bottom but the facets become visible at the intersection with the green cylinder.

It looks like the solid surfaces on the right produce a better result. On the bottom half of the red cylinder the facets are slightly visible, but the sharp edge seen in the other two examples is not there. However, there is a shading problem on the upper part of the vertical cylinder. Also, note that the resulting combined solid surface objects took the color of the second selected object - the green cylinder. So solid surface solids cannot have multiple colors like the original DesignCAD plane/grid solids.

****

I normally use 36 facets for cylinders to reduce this problem with solid Booleans. I repeated the test with ordinary cylinders and solid surface cylinders having 36 facets - see the "Solid Add test 2.jpg" image.

The object on the left was created with ordinary cylinders and the one on the right with solid surface cylinders created as described above. You can see how using 36 facets cleaned up the results nicely - at the cost of a larger file size. However, the example on the right, made with solid surfaces, is quite a bit uglier than the 18 facet version!

So solid surfaces aren't ready for prime time where you need decent renderings.

****

Note 1: When I tried to use "Solid Add" on the solid surface cylinders the program crashed (bug). This was with the default "Options/General" setting of "Use surface representation for solid operations" disabled. After "Use surface representation for solid operations" was enabled the "Solid Add" function worked without crashing the program.

I call this a bug because the program shouldn't crash when a user uses the solid Boolean functions. For now, if we are working with solid surface objects we need to enable the "Use surface representation for solid operations" option.

Note 2: These images were created with "File/Image/Save Image File" using the "Current Display" option - it is what I see on the screen. But if the "Smooth Shading" option is used the results are a lot nicer.

Note 3: The images were created with RedSDk disabled. Because the current RedSDK implementation only generates draft mode shaded images in which all facets are rendered flat there was no point in testing this problem because it only occurs with smooth rendering. With RedSDK enabled and using OpenGL Gouraud shading I get the same results.

Phil
DesignCAD user since 1987

Dr PR

#2
Continuing my investigation of object types and renderings, I used the two 36 facet objects from the previous post. This time I used "File/Image/Save Image File" with the "Smooth Shading" option.

With RedSDK disabled I created the "OpenGL rendering test" image shown below. In this case the original plane/grid cylinders on the left produced about the same result as the solid surface cylinders on the right. You can still see some flat faceting on the vertical cylinders. From my experience I would guess that it would take 72 or 144 facets to make the problem invisible. File size would be a lot larger.

With RedSDK enabled I used the "Smooth Shading" option with "Save Image File" to produce the "RedSDK rendering test" image. As you can see, the image is not smooth shaded - all facets are shown. Also, the text is not displayed.

Another odd thing is that the left object is two color, but with RedSDK enabled it renders in only one color.

I guess we will have to wait until smooth shading is implemented in RedSDK to see whether or not solid surface objects can produce a better smooth rendered image.

Phil
DesignCAD user since 1987

Dr PR

#3
I decided to try converting an existing drawing from the old grid/planes to solid surfaces. I used a drawing of a binnacle (compass stand) that I had.

I opened the drawing in V24.0 beta 13 (RedSDK disabled), selected everything (CTRL A), and used "Edit/Selection Edit/Convert/Solid To Surface" to convert as much as possible to solid surfaces.

Here is a comparison of the files:

                        File size   Points    Entities
Grid surfaces:   979 kB    26604    3238
Solid surfaces:  566 kB    11663      669       

The grid surface drawing contained:
Grid surface Entity (1337)
  Grid Header (107)
  Grid Line (1230)
Line (2)
Plane (1887)

The solid surface drawing contained:
Grid surface entity (494)
  Grid Header (24)
  Grid Line (470)
Line (2)
Plane (82)
Solid Surface Entity (84)
  Facets (7214)
  Solid Surface (84)

****

Then I rendered each file with "File/Image/Save image file." The two images are attached. I used the same lighting and shadows settings for both images.

The original solids version has a transparent glass window. I disabled transparency because solid surfaces currently don't render transparency. Too bad, with transparency enabled the compass inside the binnacle is visible through the window.

About the only difference is that the grid surface window has a bluish color and the old solid window is white. There is some slight difference in faceting effects and a slight difference in the highlight spot on the navigator's balls.

In this case the solid surfaces version of the drawing is equal to or better than the old solids version. True, there is no transparency (I rarely use it) but the file size is a lot smaller.

****

Note: After selecting everything and using "Solid To Surface" if I tried to do anything in the drawing - just left clicking on the window - the program crashed (bug). This probably relates to the problem of crashing with the Info Box open. However, I was able to save the drawing immediately after the solid surface conversion. Then after I restarted DesignCAD and opened it I could work without crashing the program.

Edit: Using the V24.0 release version I still got a program crash after selecting everything in the binnacle drawing and using "Solid to Surface." However, if I start from an empty drawing, create a cylinder (with the "Use surface representations for solid operations" option disabled) and convert it to surfaces the program does not crash.

I have selected all objects, including some that are not solids, so it isn't clear what was causing the crash.

Phil
DesignCAD user since 1987

prl

Quote from: Dr PR on September 24, 2014, 02:39:33 PM
So solid surfaces aren't ready for prime time where you need decent renderings.

Phils, thanks for taking up the testing and documentation slack.  I enjoy reading these posts.  Personally I've put the G3 testing aside since I never successfully got past my very basic tests I provided.

But long term I think the G3 solid modeling mode will be as good if not better than the classic solid modeling mode we have now (regardless of the dumb naming).  And eventually it will dovetail with the RedSDK graphics engine.

In the meanwhile, in the typical IMSI we-take-tiny-and-slow-steps process, looking for more meat-on-the-bone in v24.1   Shame we can't compress the next three releases into one since my crystal ball says DesignCAD 27 will be the one I like.

prl

Quote from: prl on September 25, 2014, 07:35:07 AM
Phils, thanks for taking

Oops, sorry Phil.  Only one of you, right?  :)

Dr PR

prl,

As far as I know.

Working with the V24.0 release here are the display results with RedSDK disabled. These images were produced with "File/Image/Save Image File."

I used two files. One had the old grid surfaces and the other had solid surfaces - as described in my earlier posts.

With each file I used two different image save options - "Current Display" and "Smooth Shading." As you can see in the picture the two files with two display options produced four different results. The "Current Display" images are what I was seeing on the screen. Transparency was enabled for all four images, but as of now solid surfaces do not use material properties so the glass window is opaque.

The best image was with the old style plane/grid surface objects and "Smooth Shading." The "Current Display" version of the same file does not show glass transparency as well, and the highlights are not as pronounced. This is about the same as the difference between Gouraud and Phong shading in older versions.

Neither image with solid surfaces is very good. The solid surface "Current Display" image shows the odd triangular rendering that appears on the screen, but is otherwise similar to the "Current Display" of the grid surface image. The solid surface "Smooth Shading" image is very bright, and the black navigator's balls and dark gray base both render light gray. Again, I assume this is because material properties are not used with solid surfaces. It does not show the peculiar shading problem.

"Smooth Shading" does show the shadows in both images.

Again, I didn't test RedSDK because smooth shading and shadows have not been implemented yet. To be continued ...

Phil
DesignCAD user since 1987