Print at Dec 16, 2025, 12:43:56 PM

Posted by Daniels118 at Dec 23, 2022, 10:31:04 AM
Re: Pan tool in 3D and 2D view?
When in Virtual visit mode and I use the visitor widgets in the plan to change the view (elevation, body/head angle) the black background returns
Acknowledged, but this cannot be solved at moment.

There is still a light grey block even when I set my floor and sky to pure white. If I understand what is happening, this is the camera front clipping plane cutting through the ground plane. I looked at the 3.7>3.7.2 code changes, but alas, I couldn't figure out if this was a colour you somehow chose to replace the black in your black background fix, or maybe some default UI/system background colour. Any chance to be able to set this as a preference? That way, we could get an all white background.
I'll do a digression about how SH3D draws the background.
First, keep in mind that the ground is actually a plane, it isn't a volume filled with soil and rocks, it is just a thin layer.
Also consider that you can add a new level with a negative elevation (for example if you want to add the basement, a garage, or a cellar to the house).
When the camera is below the ground level there is no ground which could hide the background sky. To avoid to see the sky under your feet, the background is actually divided in 2 half spheres: the one above is painted with the sky color/texture, the one below is painted with a gray gradient (darker in the lowest point and lighter at the horizon).
For some reason I don't know (maybe performance, maybe to avoid artifacts at the horizon), Emmanuel decided that the bottom half sphere is painted only when the camera is below the ground level. When the camera is above the ground level the bottom half sphere isn't draw at all, leaving the background black. Under normal conditions this isn't a problem because the black part of the background gets hidden by the ground.

If you look at the ground plane from above (or below) you can see it, and since it is extremely large, it will hide everything on the other side. If you look at it from the side it will appear as a very thin line, and it won't hide anything.
When you are in parallel projection and the camera view direction is parallel to the ground, it is as if you look at it from the side regardless of the camera elevation, and it won't hide anything anyway, allowing to see the black background under the sky.
What my plugin does, is to force the visibility of the bottom half sphere even when the camera is above the ground. The visibility is updated every time the camera elevation changes, so I have to overwrite it every time.

The 3D view is based on Java3D, which has a very weird system of "capabilities", i.e. for every object, material, etc. you have to say if and what you want to change after the model "gets live". While the top half sphere has been set capable to change in color and texture, the one below isn't so. So I have no way to change it's color, nor to replace it with a new one. The only capability set on the below sphere is to change its visibility, and this is what I'm currently doing. I will ask Emmanuel if he can change this behaviour in a future release.

The lines look way better now they can be thickened, although it would be nice to have the option to turn them off completely.
This is feasible and I could add this option in the next release.

Other crazy suggestions if you somehow figure a way to limit lines to edges where the angle of faces > x: A mode where all materials are replaced by plain white, for that outline sketch look.
In theory it would be very easy, since there is a common way in computer graphics to achieve this effect, however it requires to use a custom shader. It is very easy if you write a program from scratch, but in this case we have to modify the behaviour of an existing program. I will give a look on what can be done as is.

maybe it is time to reconsider the name of this plugin
This is something I was thinking from long time, but there are several reasons to don't change the name. It would be nicer if the main features would be integrated in SH3D so that this plugin could be dismissed.
Beside the features presented to the users, this plugin provides an API for 3rd party plugins (currently only my other plugins use this API). This API allows to:
- create toolbar checkbutton groups, i.e. groups of ON/OFF buttons in which only one button can be ON at a time;
- attach multiple mouse handlers to the Plan view and 3D view;
- other minor features.