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.

Light source location errors

Started by adriank, May 07, 2009, 01:02:52 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Adrian 2.0

When 'move with eye' is turned off, DCad incorrectly adjusts the lightsource as you move. (with graphics acceleration turned off, It works correctly when it is turned on)
If you draw the earth & the sun, position yourself in the shadow of the earth (180 degrees from the lightsource) the sun will be a 'halo'. If you move around the earth 180 deg, the sun is behind you & the whole of the visible earth should be lit, but with graphics off it has already become a halo again. Stopping at 90deg with graphics off has the same effect as stopping at 180deg with graphics on.

I'm trying to get lights in the right place & moving to the best angle with graphics on because it adjusts the result 'realtime', then turn off graphics for the best rendering & all the lights are wrong again - no wonder I can't work out how to position lights!

Dr PR

ardiank,

I don't understand the problem. I created a simple test file with two spheres and a background plane. The light was a point light at horizontal and vertical angles 0. The spheres were lined up so the larger red sphere would eclipse the smaller green sphere (they are in line with the light source).

As you can see from the four captured images, as I rotated the view the light source did not change.

light test 1.jpg is Gouraud shading with hardware acceleration on.
light test 2.jpg is Phong shading with hardware acceleration off, from same viewpoint as the first picture.
light test 3.jpg is Gouraud shading with hardware acceleration on, from a new viewpoint.
light test 4.jpg is Phong shading with hardware acceleration off, from the same viewpoint as the third picture.

"Move with eye" was not selected in the "Options/Options/Light Source" dialog and "Shadows on" was selected. In the "Options/Options/View" dialog "Enable graphics acceleration" is selected, and "Enable off-screen bitmap" is selected. In the "Shading Options" dialog "Enable graphics acceleration" is enabled for Gouraud shading and disabled for Phong shading.

What are we doing differently?

What version and release date DesignCAD are you using ("Help/About DesignCAD")?
I am using DesignCAD V19.0 12/26/2008.
DesignCAD user since 1987

Adrian 2.0

Dr PR
Thank you for taking the time to look at this. I'm running 19.1 now, but when I created the thread I was running 19.0 (on Windows Vista)
I have to say that I also cannot reproduce the problem every time I generate a new test file. The attached drawing (done in May, when I originally posted) did not replicate the problem when I first created it, but now it does. It may have started to 'go wrong' after closing & re-opening, or possibly after a 360 degree rotation round the object? I have had no time to investigate that.
This file is a simple sphere with a highly reflective surface. Light source is set at 180deg. horiz. & 0deg vert.
With a viewer location of 0/0/0 the light is directly behind the sphere. The file should open with the view angle at H 90deg. That is, I moved 90 deg. counter-clockwise round the sphere so the light is over my right shoulder. With graphics on, Gouraud quality, the light reflection is as expected, refracting off the part of the sphere that is approx. 45deg from the view angle. Turn off Graphics and re-generate and the reflection is now dead centre of the sphere, as if the light source is behind me. (shown in the two screen captures)

I have not tried to see the effect that has on shadows, possibly they are not affected at all. The issue is trying to get reflections that adequately enhance curves & angles. I try to set up the lights with graphics turned on and then move my eye until I get the reflections I want 'realtime' with graphics on, and then re-generate without graphics accerated & the result is nothing like my expectations.
'If I turn on 'move with eye' the problem goes away, but then I cannot 'improve' the reflection result by moving the eye because the light moves with me.

Dr PR

adriank,

I follow you. I don't know why the reflection moves when acceleration is turned on/off.

I have been using the lights in a different way, and I get the reflections where I want them - the same in Gouraud with graphics acceleration on and Phong with acceleration turned off. I have always worked with "Move with eye" selected, so I haven't noticed any difference between Gouraud accelerated and Phong unaccelerated. It is a bit of a pain when I want to have a light fixed in position relative to the object while I rotate around it, but if I am just trying to get good reflections to illustrate a surface it works OK.
DesignCAD user since 1987

Adrian 2.0

I discovered that files I created in version 18 have the same problem, so possibly this issue has always been here!
Maybe it'll be OK in V20? (always an optimist)
It's a pity, because DCad is so close to being a great rendering tool - apart from this all we need is mirror properties for surfaces.

Dr PR

adriank,

They released a beta version rendering engine for V18, and then it got lost in the hassle of getting dimensions to work correctly. I haven't seen anything of it since, probably because no one showed any interest in it. The beta testers worked full timewith the dimension bugs.

I was interested but just didn't have time to test it. It was a ray trace engine with mirroring, and the few demo images I saw were nice.
DesignCAD user since 1987