Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 41
Posts: 41   Pages: 5   [ Previous Page | 1 2 3 4 5 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 9172 times and has 40 replies Next Thread
sjb007
Member




Joined: May 18, 2021
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

OS: Windows 10 (legit, up-to-date)
Type: Windows .exe installer
SH3D version: 6.6a
Java: 1.8.0_202 (I think this is the included one)

I'm using a wireless Logitech MX Master 2S mouse, but without any specific Logitech software.

Your feature sounds interesting. I did something very similar in Blender using shaders to make walls invisible to the camera depending on the direction the camera was looking at them from. Allowed me to do 3D isometric renders of a room while keeping the lighting correct.
[Nov 21, 2021, 11:15:59 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3694
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

Works OK, very nice.
Thank you!
----------------------------------------
Dual boot - AMD FX6300 6-core, 16GB ram
Windows 10 Pro, SH3D 6.2 with 8 GB memory allowance
Ubuntu 18.04, SH3D 6.2 with 2 GB memory allowance
[Nov 22, 2021, 8:37:26 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Daniels118
Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

@sjb007 unfortunately I cannot reproduce the problem so I am unable to find a fix (tried even on Linux, without success sad )

In the meanwhile I have released the version 1.3 which adds the following capabilities:
- hides obstacles which obstructs the view, either automatically or using a polyline as threshold;
- pan vertically when the camera points towards the horizon.

Here is a video of the new features in action:
https://youtu.be/wYDrdH8brsw

@hashmex Thank you!
[Nov 27, 2021, 11:41:42 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
sjb007
Member




Joined: May 18, 2021
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

@Daniels118 Damn, that is a pity.

Your new version however causes SH3D to fail to start for me. I just get the splash panel, and it never opens the main window. Only way to get rid of it is to go into task manager and kill the underlying java process. I've switched between 1.2 and 1.3 repeatedly, and tried cleaning out all other plugins in case there was conflict, but 1.3 still didn't work. (I also checked if removing other plugins fixed the zoom issue, and that didn't help there either.)
[Nov 28, 2021, 12:02:33 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Daniels118
Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

I'm really sorry for this, maybe you could try to retrieve the console output as described here: http://www.sweethome3d.com/support/forum/view...3213182D743FE532FBDD71C13
[Nov 28, 2021, 12:30:26 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
sjb007
Member




Joined: May 18, 2021
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

Don't worry. I'm in Ops, so I'm used to finding errors, and helping devs fix them :-)

The log output is short and sweet:
Java 3D: implicit antialiasing enabled
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at it.ld.sh3dplugins.pan3dview.Pan3dView.initialize(Pan3dView.java:57)
at it.ld.sh3dplugins.pan3dview.Pan3dView.getActions(Pan3dView.java:80)
at com.eteks.sweethome3d.swing.HomePane.createPluginActions(Unknown Source)
at com.eteks.sweethome3d.swing.HomePane.<init>(Unknown Source)
at com.eteks.sweethome3d.swing.SwingViewFactory.createHomeView(Unknown Source)
at com.eteks.sweethome3d.viewcontroller.HomeController.getView(Unknown Source)
at com.eteks.sweethome3d.HomeFramePane.<init>(Unknown Source)
at com.eteks.sweethome3d.HomeFrameController.getView(Unknown Source)
at com.eteks.sweethome3d.HomeFrameController.displayView(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D$4.collectionChanged(Unknown Source)
at com.eteks.sweethome3d.model.CollectionChangeSupport.fireCollectionChanged(Unknown Source)
at com.eteks.sweethome3d.model.HomeApplication.addHome(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.showDefaultHomeFrame(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.start(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D$5.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

[Nov 28, 2021, 12:59:25 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Daniels118
Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

This sounds very odd, at first I thinked about a failure with the reflection code, but if there are no previous exceptions it is more likely this is due to a race condition. Maybe your pc is much faster than mine and this causes the plugin gets initialized before the UI is ready, so the plugin gets a null reference instead of the component it is looking for. This could also be the reason why the scroll didn't work for you in the previous releases (in fact the line of code throwing the exception is responsible to retrive the 3D view to bind the mouse wheel event custom handler), but the application freezes just with the last release because I've rearranged the code.
I have built a new release which should handle this case, you can download it here:
https://daniels118.altervista.org/temp/Pan3dView-1.3.1.sh3p
Please let me know if this solves the problem so I will post it on the contribution page.

Thank you
[Nov 28, 2021, 11:51:49 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
sjb007
Member




Joined: May 18, 2021
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

OK. So... That version fixes the startup, and my original zoom snap issue. applause

This following feedback on the hiding stuff is kinda long, but please take it as constructive, and absolutely supportive. This is excellent stuff.

The hiding feature does something kinda weird for me. My furniture hides and appears constantly as I rotate. It looks like anything closer than the point of rotation. I thought this was supposed to only affect walls, but I guess it makes sense for objects too. But then walls hide differently. They hide if they are in the direct line between camera and point of rotation. This is different to how objects work, so it feels odd. I have a straight wall composed of segments. If you pan sideways, only the segments directly between the point of rotation and the camera hide. Maybe walls should behave like the objects? If any end of a wall segment is closer than the point of rotation, hide it?

If a single object is the selection, it is visible. If a grouped object or an extended selection of objects are selected, then elements within those groupings can disappear too. In this case I would suggest all selected objects, or sub objects of a selected grouped object are always visible.

The last oddity... Yeah, I know I'm a PITA. I've gotten used to selecting a room floor and rotating around it. If I do this, much of the furniture disappears in that room. Rather than using the object/floor/wall center point, find the closest point of that selection, and anything forward of that point gets hidden. Anything behind that point is visible. This might not work well because of complex room shapes, so is just brainstorming.

With the polyline you're getting really close to having a useful sectioning tool. The only improvements I could suggest there are the ability to set the camera in standard orthoganol positions, and the ability to remove the perspective from 3D view. Do you also get the following? When selecting a polyline not displayed in the 3D view, the view centers nowhere near the polyline, possibly the 0,0 origin. It centers properly is the polyline is displayed in the 3d view. This has always been the case in SH3D, and nothing to do with your plugin.

I can post another video if you want a better visualisation.
[Nov 28, 2021, 6:19:51 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
sjb007
Member




Joined: May 18, 2021
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

As a follow up. The algorithm seems to be determining "closer" based on the camera plane. So as my viewpoint goes higher, objects high on a wall disappear. They are behind the point of rotation in the plan (X,Y) but forward of the point of rotation in the cameras plane (X,Y,Z). So I maybe misunderstood how the hide/show was working. Maybe only X,Y should be considered?
[Nov 28, 2021, 6:39:59 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Daniels118
Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 29
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

OK. So... That version fixes the startup, and my original zoom snap issue.

I'm really happy to hear this biggrin

About the hiding feature, consider it more as a proof of concept, I'm already thinking of improvements, and any critic/suggestions are appreciated.

At first I thinked hiding the walls was enough, but then I've found that tall furnitures obstruct the view as much as the walls, so I decided to handle both.

Since the purpose of this feature is to hide any object that obstructs what the user is really interested in, the critical question is: how to determine what the user wishes to see?
I think the answer is very subjective, any assumption could be right for one user and wrong for another, this is why I implemented the option to clearly define what to hide using a poly.
Of course drawing the poly requires some effort, so it's up to the user to decide if it is worth, or settle for the default behaviour (which I'm going to improve anyway smile).

You're right about the fact that walls and furnitures are handled differently. I won't report the details since it would be a very long list, which is going to change anyway. If you wish to know how it works you may look at the source code which is included in the plugin (you can explore its content using any zip file viewer). I will keep in mint all of your suggestion for the improvements.

About the "ability to remove the perspective from 3D view": this will be part of another tool I'm thinking of, but for the moment I haven't the time to work on this. If you need such a feature take a look at the "SideView" plugin on the official plugins page (of course it lacks the sectioning tool, but for most cases is enough).

About the camera moving away when selecting the polyline, I faced the same issue. I think I could easly fix it, but it would be better if it gets fixed in the main program issuing a bug report.

I'll keep you updated.
[Nov 28, 2021, 11:29:45 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 41   Pages: 5   [ Previous Page | 1 2 3 4 5 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2022 eTeks - All rights reserved