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: 19
Posts: 19   Pages: 2   [ Previous Page | 1 2 ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 8704 times and has 18 replies Next Thread
kareem613
Newbie




Joined: Feb 3, 2017
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

hmm. All the jars in place and having compiler errors. It's been a while since dealing with java classpaths. Am I missing something?

Directory: C:\data\basement\app


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2017-02-07 9:12 PM 40506 batik-svgpathparser-1.7.jar
-a---- 2017-02-07 9:30 PM 2309 ConsolePhotoGenerator.java
-a---- 2017-02-07 9:12 PM 2847226 j3dcore.jar
-a---- 2017-02-07 9:12 PM 1675815 j3dutils.jar
-a---- 2017-02-07 9:12 PM 348010 sunflow-0.07.3i.jar
-a---- 2017-02-07 9:14 PM 25917844 SweetHome3D-5.4.jar
-a---- 2017-02-07 9:12 PM 314362 vecmath.jar


C:\data\basement\app> javac -cp SweetHome3D-5.4.jar:sunflow-0.07.3i.jar -d . ConsolePhotoGenerator.java
ConsolePhotoGenerator.java:26: error: package org.sunflow.system does not exist
import org.sunflow.system.UI;
^
ConsolePhotoGenerator.java:27: error: package org.sunflow.system.ui does not exist
import org.sunflow.system.ui.ConsoleInterface;
^
[Feb 8, 2017, 1:33:14 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: 7069
Status: Online
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

Under Windows, you must replace : separators by ;

About rendering photos at the stored points of view returned by the method getStoredCameras in Home class, you could replace the following two lines in ConsolePhotoGenerator.java:

renderer.render(image, home.getCamera(), null);
ImageIO.write(image, homePhoto.substring(homePhoto.lastIndexOf('.') + 1), new File(homePhoto));

by:

for (Camera camera : home.getStoredCameras()) {
renderer.render(image, camera, null);
int dotIndex = homePhoto.lastIndexOf('.');
String cameraPhoto = homePhoto.substring(0, dotIndex) + "-"
+ camera.getName().replaceAll("/|\\\\|:|;", "-").replace(File.pathSeparatorChar, '-').replace(File.separatorChar, '-')
+ homePhoto.substring(dotIndex);
ImageIO.write(image, homePhoto.substring(dotIndex + 1), new File(cameraPhoto));
}

and you should import com.eteks.sweethome3d.model.Camera class.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 8, 2017, 3:05:28 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 
brute4c
Newbie




Joined: Feb 27, 2020
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

Hello,
in he first place I want to thank You for developing such a nice tool.

I'm also trying to run the render in headless mode with SW3D 6.2 on a linux machine. I have fallowed You guide, but unfortunately I'm getting
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:294)
error when trying to run it on a server. I have found Your post on jogamp about editing VirtualUniverse.java class, but I'm afraid it's to difficult for me. Are You able to provide modified version of j3dcore.jar just to make it more available to use it by broader group of people?
[Feb 27, 2020, 9:36:07 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: 7069
Status: Online
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

Are you sure you added the -Dj3d.rend=noop option, as explained in my post of February 3rd, 2017?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 27, 2020, 3:01:27 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 
brute4c
Newbie




Joined: Feb 27, 2020
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

Yes I did. I had to edit j3dcore.jar and I was able to successfully render photos with default values. After setting property
-Dcom.eteks.sweethome3d.j3d.PhotoRenderer.highQuality.globalIllumination=path
console is flooded with warnings:
LIGHT warn : NaN shading sample!

so I'm not sure if it's actually rendering anything. Is there a way to resolve this issue or at least disable the warning?
[Feb 27, 2020, 4:17:22 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
brute4c
Newbie




Joined: Feb 27, 2020
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

Just for the record, I have fallowed those steps to edit class in j3dcore.jar https://stackoverflow.com/a/14069149/9931119
and replaced the if statement according to Your instructions: http://forum.jogamp.org/template/NamlServlet....ser_nodes&user=495956

This allowed me to run sh3d render with the -Dj3d.rend=noop option. Unfortunately it's only working for the AO + Photon Mapping, when trying to render with Path option I'm getting a lot of warnings and in the end the output image is just black.

I would also like to use a option from PVR 1.9 to enable sky light but I don't have an idea how I can use the plugin in headless mode. Is there any way to do it?
[Mar 2, 2020, 4:39:36 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: 7069
Status: Online
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

You shouldn’t have to recompile Java 3D jars if you use the ones available here (actually, I just discovered that the links in my post of February 2017 have been out of date, since SourceForge.net forced me to move from CVS to SVN, but I just updated them).

I never tried to render an image with a plugin on a server but don’t see a reason why it couldn’t run. Did you try to render your image with the GUI first? And did you try with Sweet Home 3D 6.2 Jar?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Mar 2, 2020, 6:11:15 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 
Gian1
Newbie




Joined: Apr 13, 2020
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

Greetings. I'd like to present a wish list, ordered by importance:

  • incremental output image name in case of homonymy to avoid overwriting existing images, and/or automatic output folder creation for each rendered .sh3d file;
  • rendering queue composed of a list of .sh3d files;
  • ability to use rendering engines other than the default Sunflow, and to change the engine;
  • ability to change rendering settings, including time of the day, lens type, and ceiling lights.

Much obliged.
[Apr 13, 2020, 3:57:36 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: 7069
Status: Online
Reply to this Post  Reply with Quote 
Re: Rendering on Windows Server 2008 Possible?

Gian1, Sweet Home 3D API will let you make these changes. Feel free to contribute to ConsolePhotoGenerator improvements.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Apr 28, 2020, 4:34:35 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 
Posts: 19   Pages: 2   [ Previous Page | 1 2 ]
[ 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