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: 8
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 44507 times and has 7 replies Next Thread
TKG
Newbie




Joined: Apr 15, 2012
Post Count: 5
Status: Offline
Reply to this Post  Reply with Quote 
Android Port of SweetHome3D

I need some tips on porting a very limited version of sweethome3d to android. Since android apps are written in java (apart from the XML portion for UI, which is basically the same thing as Java Swing with a different syntax), I was thinking it shouldn't be too hard to port this to android. By porting I mean I have zero intention to rewrite the entire interface by translating the swing to XML. Here's what I need help with, there are some java functions and methods I'm looking for and I'm not sure what their names are so that I can call them in the XML.

•What func/methods are used in the SH3D source that initialize, update, and draw the 3d scene in virtual visitor mode (the lower right hand corner of the SH3D window)

•What func/methods are used to scale, rotate, elevate, translate the virtual visitor and furniture? (The top right hand panel in the SH3D window)

•What func/methods are used to import furniture and draw them to the lower right hand panrel?

•What func/methods are used to render the highest quality photo setting at a given input resolution for both the default and spherical projections?

Thank you for your time I hope this project will be easy for me and will actually get anywhere, also note this project will inheret the same open source freeware license as the original SH3D and I'll be sure to give all the same people their respective credits on both the splash screen of the android app and it's help/about menu...

Cheers!
TKG
[Sep 5, 2013, 3:49:18 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Android Port of SweetHome3D

In no case, I want to prevent you from trying this port, but I fear you didn't list all the missing parts in Android Java:
- There's no AWT/Swing in Adroid API, that means at least 40% of the program code needs a rewrite for that part alone (all the com.eteks.sweethome3d.swing classes). These classes don't just create and layout the components of the user interface and the UI should be quite different under Android because of the small screens it runs on.
- There's no Java 3D at all, that means that the classes of com.eteks.sweethome3d.j3d (+ a few other ones in swing) need a complete rewrite based on a different library.
- Even the implementation of com.eteks.sweethome3d.model and com.eteks.sweethome3d.viewcontroller packages relies on a few AWT classes coming from java.awt.geom and javax.swing.undo packages, that are missing in Android even if they are not bound to components.

If ever I would have to port Sweet Home 3D under Android, my strategy would be more based on its architecture, i.e. I would try to port com.eteks.sweethome3d.model core classes first, then com.eteks.sweethome3d.tools, com.eteks.sweethome3d.io and com.eteks.sweethome3d.viewcontroller classes, and finally change the UI implementation with classes in a new package that would implement com.eteks.sweethome3d.viewcontroller.ViewFactory interface and the view ones that depends on it.

Good luck!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Sep 19, 2013, 8:35:46 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
harvey186
Newbie




Joined: Dec 1, 2013
Post Count: 14
Status: Offline
Reply to this Post  Reply with Quote 
Re: Android Port of SweetHome3D

I think it would be great if you can develop a viewer for android. That's what I would need.

I have tried a lot of obj viewers with my Nexus10 but none was able to show my obj file.
[Dec 3, 2013, 10:31:00 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
clanmills
Member
Member's Avatar

England
Joined: May 16, 2014
Post Count: 33
Status: Offline
Reply to this Post  Reply with Quote 
sad Re: Android Port of SweetHome3D

I've never used the Android SDK (which I believe is mostly Java). However from what Emmanuel has said about Swing and Java3D, I think porting SW3D to Android is not possible.

However, all is not lost. I'm working on "ToWebPlugin". This will make it easy to generate web galleries of images and floor plans and that will work with the browser on Android, iOS and the Desktop. ToWebPlugin

Although this doesn't enable you to render the SH3D model, it will enable you to share content on the web for viewing on mobile (and desktop) devices.

When I finish "ToWebPlugin", I have thought about a plugin to generate a 3D PDF. However I don't believe Adobe's Reader Mobile supports 3D at this time. http://www.3dcadworld.com/3d-pdf-viewing-goes-mobile/
[May 31, 2014, 6:31:35 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
clanmills
Member
Member's Avatar

England
Joined: May 16, 2014
Post Count: 33
Status: Offline
Reply to this Post  Reply with Quote 
smile Re: Android Port of SweetHome3D

I've found a way to view models on Mobile Devices. Download the MeshLab viewer. This can render .obj files. I've put a model of my home on this page:

http://clanmills.com/2014/20152/

There are two versions of the model (with and without furniture).

On Android, I was able to load SGy.zip. Unzip it and open SGy/SGy.obj with MeshLab. I was a little underwhelmed as the model had lost its color and textures.

On iOS/Safari click on the link and use "Open With" and Select MeshLab
MeshLab crashes for me on the iPod/Touch

On MacOS-X, everything works fine. I used File/Import Mesh to read SGy/SGy.obj. I expect the mobile versions of MeshLab will work well at some time in the future.

I also found a web-site (can't remember where) to which you can upload the obj file. That worked well on mobile and desktop browsers.
[Jul 19, 2014, 10:44:20 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Android Port of SweetHome3D

A first version of a Sweet Home 3D viewer able to run under Android, and more generally in any HTML5 / WebGL browser was released recently.
It includes also a feature that lets you display an OBJ file stored in a ZIP file with its MTL and texture files with HTML5 / WebGL, using the viewModelInOverlay function available in the API of the new SweetHome3DJS library distributed under GNU General Public License. You can test this feature by clicking on the image of the 3D models shown at this page.
If you want to test it on your web site, you'll need the JavaScript files gl-matrix-min.js, jszip.min.js, core.min.js, triangulator.min.js and viewmodel.min.js, as well as the close.png image (< 250 Ko).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[May 8, 2016, 2:23:47 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
clanmills
Member
Member's Avatar

England
Joined: May 16, 2014
Post Count: 33
Status: Offline
Reply to this Post  Reply with Quote 
Re: Android Port of SweetHome3D

biggrin Only one word for this: AWESOME
http://clanmills.com/SH3D/SGx/
[May 8, 2016, 5:27:30 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Android Port of SweetHome3D

One step further, Renovations 3D is a new app developed by Phil Jordan on the base of Sweet Home 3D code. It will let you view your sh3d files under Android and even edit them!
Read this article in the blog, for more information and screenshots.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Mar 28, 2017, 8:53:00 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ 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-2024 eTeks - All rights reserved