Joined: May 18, 2021
Post Count: 257
Status:
Offline
Re: Pan tool in 3D and 2D view?
Some of my usual quick fire feedback.
1. 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. It's not too bad, as I just hit Ctrl-J twice to go out of parallel mode and back in and this fixes the rendering.
2. 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.
Otherwise... The lines look way better now they can be thickened, although it would be nice to have the option to turn them off completely.
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. An architect I used produced some isometric sections in black line art. As I just thought about this, the silhouette would need to be forcibly outlined or it might go back to losing curved objects in the background again. I guess the rule would be if one face is toward the camera, and one faces away, then always draw the edge.
Oh, and maybe it is time to reconsider the name of this plugin - it has become so much more than just panning.
Italy
Joined: Nov 17, 2021
Post Count: 474
Status:
Offline
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.
Joined: May 18, 2021
Post Count: 257
Status:
Offline
Re: Pan tool in 3D and 2D view?
If I had a say in it (but I don't) I think you have more than demonstrated the abilities to get commit rights to the main app.
Maybe Emmanuel is reluctant to give access, or maybe it would require copyright assignment to eTeks for dual licensing (i.e. GPL/proprietry). I think your plugins are really adding value, and I imagine even more so if you were not contricted by the limitations of using plugins.
I don't know if I previously asked this, but are you a professional Java developer, or is this just a hobby for you? Either way, really great contributions.
Italy
Joined: Nov 17, 2021
Post Count: 474
Status:
Offline
Re: Pan tool in 3D and 2D view?
I've read something about the copyright problems for the various stores (Apple, Microsoft). Anyway, I would be available to ceed the copyright to Emmanuel for the required portions of code.
If by "professional" you mean a regularly employed person in Java development, then no, I'm not. However programming for me has been and is still a kind of tool for many purposes. Just to give you an example, few years ago, a friend of mine brought me at the shooting range, and I got the idea to program a "virtual spotter" (for those who don't know, the spotter is the member of the sniper team who helps the sniper to observe the target), so I've put in a bag some java, opengl, math and an android phone, shaked well, and finally I got out an app which uses the phone camera to automatically detect the target and is able to "see" the holes made while shooting, and tells to the user (yes, it speaks) where the hole is in respect to the center of the target (which direction, how far). This is just one out of thousands. Is this enough to make a professional? I don't know. But either way, many thanks
Italy
Joined: Nov 17, 2021
Post Count: 474
Status:
Offline
Re: Pan tool in 3D and 2D view?
For those who are interested in these enhancements, you can upvote these 2 tickets on SourceForge: Ticket #1142 Object3DBranchFactory enhancements - To let Wirings and 3D dimension lines to work even in the photo creation tool. Ticket #1143 Customizable bottom background color - To have a full white background in parallel projection mode.
Joined: May 18, 2021
Post Count: 257
Status:
Offline
Re: Pan tool in 3D and 2D view?
If that worked, then you are pro enough for me!
I'm not a java coder, but I've worked with them for a long time. I'm more systems level. Installation, configuration, maintenance, support, problem analysis. I regularly have to read through java code to figure out what the pro coder did wrong that caused the 3 screen stack trace.
When I need to do something clever myself I will pull out the trusty Python (I just realised how rude that sounds ) and knock together scripts of varying complexity. Quick and dirty for the one-offs, more time, effort and rigour if it will continue to be used in some automated fashion.
I'll take enthusiam, talent and results over a fancy certificate any day of the week.
Netherlands
Joined: Apr 8, 2022
Post Count: 1442
Status:
Offline
Re: Pan tool in 3D and 2D view?
I think I found a bug in 3.7.2. I often open more than one plan to copy specific furniture settings. After installing 3.7.2 that no longer workes. I can open a second plan but it doesn't show the window. After closing the initial plan the process for the second plan is still running in the background without a window showing. I have to kill that process before I can start Sweethome3D again. Regressing to 3.6 solves that problem.
---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects