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.

Odd shading problem

Started by Dr PR, November 16, 2016, 10:27:12 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Dr PR

All versions since about V18
Win 7 Pro 64

I use OpenGL Gouraud shading to inspect 3D work in progress. I have noticed for some time now that if I mirror ("Edit/Selection Edit/Mirror" or "/") a solid on the Z axis, the first time I shade the drawing either the original solid or the mirrored solid renders very dark. If I regenerate ('View/Regenerate" or "Crtl+R") the view all objects render correctly.

In most cases it is the mirrored copy that renders dark.

The objects may not be rendering the actual color black (RGB 0, 0, 0) but the dark tone may just be shadow - as if the normals are reversed the first time the image is shaded, and regenerated correctly the second time.

I do not recall if mirroring on the X or Y axis causes this problem. Nearly all of the mirroring I do is on the Z axis.

I haven't noticed any long term problems related to this. The mirrored objects behave correctly. So this isn't a big problem, but just a minor bug. But it may be related to other display problems.

I have also noticed the same dark shading after using "Solids/Solid Add." Regenerating produces the correct shading.

Has anyone else noticed this?

Phil
DesignCAD user since 1987

Lar

I see this quite often. In fact, I saw it just last night in a very simple model on random surfaces at different times. When it happens I orbit the view slightly and it corrects itself then I press Esc to abort the orbiting.

Lar

Dr PR

#2
Lar,

I have also rotated the view to regenerate the image. Zooming in/out also regenerates the view,but it also changes the view. Probably anything that causes the view to be regenerated fixes the problem. I find it quicker to use "Regenerate."

This is especially in very large drawings where each regeneration of the view when orbiting can take several seconds. If you use "Set View by View Center" when you first click to start rotating the view the program redraws the existing view. This is unnecessary and annoying, especially with large drawings when it brings things to a halt for 3-5 seconds while the view is redrawn. I think this first redraw is to center the 'View Center" in the center of the screen.

Then the view rotates a bit, depending upon how much the mouse moves from the first button press. Another 3-5 seconds. While the screen is redrawing the mouse is moving, and this movement is remembered. Then the screen redraws again and again, 3-5 seconds each time. And when you stop moving the cursor one or two movements are still remembered, so the screen continues to redraw - 3-5 seconds at a time, until the last buffered cursor position is used. By this time the view has rotated too far, and you have to rotate back - and wait and wait - to get the desired view. It is like driving a car when you are drunk (so I am told).

Furthermore, in wireframe view only part of the drawing is shown. This can make it impossible to see the part you want to view when rotating the view.

All in all it is pretty unsatisfactory. This is one of the reasons I anxiously await implementation of the RedSDK display routines. The current RedSDK wireframe rotation is MANY times faster that the old GDI routines. I can rotate huge drawings smoothly with RedSDK enabled. With GDI the rotation is jerky and some parts of the drawing aren't shown. But I can't work with RedSDK enabled until we have a decent shaded view.

Phil
DesignCAD user since 1987

Lar

Phil... I know, I know...

Basically, I can't work in shaded mode unless the file is tiny, so if I'm shading at all it means the orbiting won't take too long. Also, my hand is tuned into dcad's orbiting steps so I can move the mouse so the view shifts only once, then I Esc, avoiding unnecessary delays.

******
Working in wireframe causes endless small mistakes in 3D buildings, so I find it a necessary part of my workflow to export periodically to dxf and open in Cinema 4D where I can orbit (in shaded mode... with outlines) to my heart's content and move through the model looking at absolutely everything to pinpoint mistakes, which I then correct in dcad, and then re-export. This may take extra time (especially since orbiting can be such fun) but its better than noticing a bunch of mistakes when I think I'm finished. My goal is when I cut a section or extract a detail I don't have to anything extra except add notes and dimensions. Everything you see is correct and correlates to all other sections and details.

My thing is, moving through building models means lots of tight spaces so even if dcad ever gets Red working I would also need the annoying cutting plane to be eliminated.

Lar

Dr PR

#4
Lar,

I do understand the 3D wireframe viewing problem!

In one drawing, long ago, I was working away and somehow rotated the view so I was looking at the drawing 180 degrees in all axes from what I thought I was looking at. Up became down, left became right, and into the drawing became out of the drawing. But I didn't realize it. So I continued working away.

I did subconsciously notice that the cursor movement keys were working backwards, but I ignored this because it is common to accidentally move the wrong direction and automatically correct. So it was a while later when I began to realize that something was wrong. When I rotated the view some parts would spin the way I expected but others would swing around the opposite way.

Whoa! It was surreal and really made my head spin. So I shaded with Gouraud. This was back on a slow processor - by today's standards - and shading took several minutes, so I didn't do it often. But when it was finished what I saw was weird! It looked like a Picasso painting. It took me a while to figure out what had happened. And I learned my lesson.

****

Now, when I am working with very large drawings I always save it in OpenGL Gouraud shading. Then when I open it next time I wait until the drawing loads and shades before I start - this can take ten minutes or more for >200 Mbyte drawings. I go make a cup of coffee or read the news. But I start the new work session with a clear view of the drawing.

Then after I have created new objects, working in wireframe view, I shade the drawing again. This only takes a few seconds because the program remembers the previous shading information and only needs to generate new information for the new objects. In this way I keep the shading information up to date as I work and I don't have to wait for an entire new shading for the whole drawing.

Unfortunately, the shading information isn't saved with the file. If it was it would only take a few seconds the next time the file was opened, instead of many minutes. It can take up to 40 minutes to open a 750 Mbyte drawing in shaded view - and that's on a 4.7 GHz six core processor with 32 Gbytes of 1.6 GHz RAM and a high speed graphics engine display!

Phil
DesignCAD user since 1987