Features

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




Joined: May 17, 2011
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Server Side

Hello there, what a wonderful tool!
I am implementing this in creating 3D models of French castles for online viewing:
http://cineffect.free.fr/royaume/chateau3d.html

I have two questions:
1. Is it possible to automatically save the rendered photo into a predefined directory on the server (instead of locally on computer)?
2. Is it possible to implement Server Side Rendering of high quality photos?

Thank you,
Ivan
[Feb 3, 2012, 3:11:51 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 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7062
Status: Offline
Reply to this Post  Reply with Quote 
Re: Server Side

Nice project! smile
1. Is it possible to automatically save the rendered photo into a predefined directory on the server (instead of locally on computer)?
No, please submit a feature request. Meanwhile if you're able to program, you could inspire yourself from PhotoPanel class and the one below.
2. Is it possible to implement Server Side Rendering of high quality photos?
Even if the renderer at the highest quality level doesn't use OpenGL to compute the 3D image, Sweet Home 3D needs Java 3D classes to store the 3D scene. And as soon as you use a Java 3D class in a 3D scene, you're obliged to have at least an opened X11 display if the server is under Linux (on other OS there should be less problem). I guess it's only to check if the display is available in case of need, but as I never tested it myself if there would be other requirements under Linux, I can't tell.
If needed, you could test on a server with the following application:

/*
* ConsolePhotoGenerator.java
*
* Sweet Home 3D, Copyright (c) 2010 Emmanuel PUYBARET / eTeks <info@eteks.com>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.eteks.sweethome3d.utilities;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import org.sunflow.system.UI;
import org.sunflow.system.ui.ConsoleInterface;
import com.eteks.sweethome3d.io.HomeFileRecorder;
import com.eteks.sweethome3d.j3d.PhotoRenderer;
import com.eteks.sweethome3d.model.Home;
import com.eteks.sweethome3d.model.HomeEnvironment;
import com.eteks.sweethome3d.model.RecorderException;

/**
* Sweet Home 3D Console photo generator.
* @author Emmanuel Puybaret
*/
public class ConsolePhotoGenerator {
public static void main(final String [] args) throws RecorderException, IOException {
String homeFile = args [0];
String homePhoto = args [1];
Home home = new HomeFileRecorder().readHome(homeFile);
HomeEnvironment environment = home.getEnvironment();
PhotoRenderer renderer = new PhotoRenderer(home,
environment.getPhotoQuality() == 3
? PhotoRenderer.Quality.HIGH
: PhotoRenderer.Quality.LOW);
UI.set(new ConsoleInterface());
BufferedImage image = new BufferedImage(
environment.getPhotoWidth(), environment.getPhotoHeight(),
BufferedImage.TYPE_INT_ARGB);
renderer.render(image, home.getCamera(), null);
ImageIO.write(image, homePhoto.substring(homePhoto.lastIndexOf('.') + 1),
new File(homePhoto));
}
}


By the way, don't forget that Sweet Home 3D is distributed under GNU GPL which doesn't give you the freedom to distribute a derived version under a proprietary license. In this is a problem, please contact me and we'll see how to fix this issue.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 3, 2012, 8:25:05 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 
Cinenaut
Newbie




Joined: May 17, 2011
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: Server Side

Thank you so much Emmanuel, merci!
I will try what you suggest.
By the way in the question #1, what I meant is if it would be possible to implement a HTTP post request to HTML from Java, so that when the user clicks on "save photo", it would automatically be saved on a folder in the server.
I am not a professional java programmer so it is not so easy for me.
I understand the GNU GPL concept and would not want to distribute the license as proprietary in any case.
Last, but not least, as I am a professional cinematographer, if you guys ever need any help with video, streaming, webcasting and so on, I would be glad to contribute my knowledge.
Ivan
[Feb 3, 2012, 2:02:55 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 
[ 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-2020 eTeks - All rights reserved