javasabr / jmonkeybuilder Goto Github PK
View Code? Open in Web Editor NEWjMonkeyBuilder
License: Apache License 2.0
jMonkeyBuilder
License: Apache License 2.0
How to support high resolution?it have 200% system zoom!(4k)
I'm tring to add a tong0d emittor to an empty scene. This is what I got.
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at tonegod.emitter.ParticleEmitterNode.changeEmitterShapeMesh(ParticleEmitterNode.java:856)
at tonegod.emitter.ParticleEmitterNode.<init>(ParticleEmitterNode.java:436)
at com.ss.editor.ui.control.model.tree.action.particle.emitter.toneg0d.CreateToneg0dParticleEmitterAction.createEmitterNode(CreateToneg0dParticleEmitterAction.java:92)
at com.ss.editor.ui.control.model.tree.action.particle.emitter.toneg0d.CreateToneg0dParticleEmitterAction.process(CreateToneg0dParticleEmitterAction.java:64)
at com.ss.editor.ui.control.tree.action.AbstractNodeAction.lambda$0(AbstractNodeAction.java:68)
...
As I debugged, the "emitterShapeTestGeometry" is null.
/**
* Sets the particle emitter shape to the specified mesh
*
* @param mesh The Mesh to use as the particle emitter shape
*/
public final void changeEmitterShapeMesh(@NotNull final Mesh mesh) {
emitterShape.setShape(this, mesh);
emitterShapeTestGeometry.setMesh(mesh); <--------- line 856
requiresUpdate = true;
}
public ParticleEmitterNode(@NotNull final AssetManager assetManager) {
this();
changeEmitterShapeMesh(new TriangleEmitterShape(1)); <--------- line 436
changeParticleMeshType(ParticleDataTriMesh.class, null);
initialize(assetManager, true, true);
}
This editor would become much more powerful if one could add grass and trees in a very simple way. For example it would be useful if one could just "spraypaint" grass and trees onto the terrain. This feature is available in many other editors. Looking at those might give some ideas how this could be done.
I have problems. Whenever I convert any model to j3o, there comes a java.nio.file.NoSuchFileException
Let me explain what I did.
My environments:
Windows 7 x64
JDK 1.8
jMonkeyBuilder 1.3.0 (build from source, with my localization)
First I make a simple model with blender, named it apple.blend
.
Then I start jMonkeyBuilder, create an Assets folder, and put apple.blend into it. After that I tried to Convert .blend to .j3o
I changed the DestinationFolder to "Models/Apple". (Default "Models/Apple/apple.j3o")
I got this.
java.nio.file.NoSuchFileException: Models\Apple\apple.j3o
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
at java.nio.file.spi.FileSystemProvider.newOutputStream(Unknown Source)
at java.nio.file.Files.newOutputStream(Unknown Source)
at com.ss.editor.file.converter.impl.AbstractModelFileConverter.convertImpl(AbstractModelFileConverter.java:167)
at com.ss.editor.file.converter.impl.AbstractModelFileConverter.lambda$1(AbstractModelFileConverter.java:123)
at com.ss.editor.file.converter.impl.AbstractModelFileConverter$$Lambda$1387/1657970365.run(Unknown Source)
at com.ss.editor.executor.impl.BackgroundEditorTaskExecutor.doExecute(BackgroundEditorTaskExecutor.java:49)
at com.ss.editor.executor.impl.AbstractEditorTaskExecutor.run(AbstractEditorTaskExecutor.java:132)
I also tried some other models, such as models in jme3-testdata, none of them can be converted to j3o in jMonkeyBuilder.
So I read the code, want to figure out why.
/**
* Convert a file using settings from the dialog.
*/
@BackgroundThread
private void convertImpl(@NotNull final Path source, @NotNull final VarTable vars) throws IOException {
final String filename = vars.getString(PROP_RESULT_NAME);
final Path destinationFolder = vars.get(PROP_DESTINATION);
final Path destination = destinationFolder.resolve(filename + "." + FileExtensions.JME_OBJECT);
final boolean isOverwrite = Files.exists(destination);
final Path assetFile = notNull(getAssetFile(source), "Not found asset file for " + source);
final ModelKey modelKey = new ModelKey(toAssetPath(assetFile));
final AssetManager assetManager = EDITOR.getAssetManager();
final Spatial model = assetManager.loadAsset(modelKey);
if (EDITOR_CONFIG.isAutoTangentGenerating()) {
TangentGenerator.useMikktspaceGenerator(model);
}
if (vars.getBoolean(PROP_EXPORT_MATERIALS)) {
final Array<Geometry> geometries = ArrayFactory.newArray(Geometry.class);
final ObjectDictionary<String, Geometry> mapping = DictionaryFactory.newObjectDictionary();
final Path materialsFolder = vars.get(PROP_MATERIALS_FOLDER);
final boolean canOverwrite = vars.getBoolean(PROP_OVERWRITE_MATERIALS);
NodeUtils.visitGeometry(model, geometry -> checkAndAdd(geometries, geometry));
geometries.forEach(geometry -> generateNames(mapping, geometry));
mapping.forEach((materialName, geometry) -> storeMaterials(materialsFolder, canOverwrite, materialName, geometry));
}
final BinaryExporter exporter = BinaryExporter.getInstance();
try (final OutputStream out = Files.newOutputStream(destination, WRITE, TRUNCATE_EXISTING, CREATE)) {
exporter.save(model, out);
}
if (isOverwrite) {
notifyFileChanged(destination);
} else {
notifyFileCreated(destination);
}
}
I also debugged it in Eclipse. It goes will before this statement:
try (final OutputStream out = Files.newOutputStream(destination, WRITE, TRUNCATE_EXISTING, CREATE)) {
exporter.save(model, out);
}
The model has been loaded and ready to export. But it never got the OutputStream instance.
Here is the Variables when program paused in this statement:
It look.. just OK. I can't tell what happened, but made a simple test on my computer.
package mygame;
import static java.nio.file.StandardOpenOption.*;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
/**
* Test if I can create file in specified folder
*
* @author yanmaoyuan
*
*/
public class TestNewFile {
public static void main(String[] args) {
final String filename = "apple";
final Path destinationFolder = Paths.get("F:/Modeling/Assets", "Models/Apple");
final Path destination = destinationFolder.resolve(filename + ".j3o");
try (final OutputStream out = Files.newOutputStream(destination, WRITE, TRUNCATE_EXISTING, CREATE)) {
out.write("hello world".getBytes());
} catch (IOException e) {
e.printStackTrace();
}
}
}
It works fine on my computer, it created a "apple.j3o" in that folder.
I have no idea. Maybe you can fix this problem.
OS: Fedora 29
JAVA: 1.8 | 11 - both
issue with JAVA 1.8:
JAVA_HOME=/usr/java/latest ./gradlew build
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
1 actionable task: 1 executed
issue with JAVA 11:
JAVA_HOME=/usr/java/jdk-11.0.2 ./gradlew build --info
Initialized native services in: /home/bvn13/.gradle/native
Found daemon DaemonInfo{pid=5758, address=[b82b6024-c8ec-4436-a205-444355f67431 port:38887, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1553359295367, context=DefaultDaemonContext[uid=d2ed7581-de73-4df7-9ff6-933d2268b518,javaHome=/usr/java/jdk1.8.0_201-amd64,daemonRegistryDir=/home/bvn13/.gradle/daemon,pid=5758,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=/usr/java/jdk-11.0.2,daemonRegistryDir=/home/bvn13/.gradle/daemon,pid=16386,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=d2ed7581-de73-4df7-9ff6-933d2268b518,javaHome=/usr/java/jdk1.8.0_201-amd64,daemonRegistryDir=/home/bvn13/.gradle/daemon,pid=5758,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 6001). The daemon log file: /home/bvn13/.gradle/daemon/4.7/daemon-6001.out.log
Starting 5th build in daemon [uptime: 2 hrs 12 mins 59.528 secs, performance: 92%]
Using 4 worker leases.
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Getting this message "no main manifest attribute, in jMonkeyBuilder-1.7.2.jar"
Or if run with JfxApplication class as main Exception in thread "JavaFX Application Thread" Exception in thread "main" java.lang.NoClassDefFoundError: com/jme3x/jfx/injfx/JmeToJFXApplication at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$155(LauncherImpl.java:352) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.jme3x.jfx.injfx.JmeToJFXApplication at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 11 more java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source) Caused by: java.lang.NullPointerException at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:383) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) ... 5 more
After I installed the latest version yesterday, I noticed that the plugin doesn't work anymore. After I first deinstalled it, I wanted to install it again but the plugin does not show up in the plugins-list anymore.
This issue is just a reminder so that it can be fixed as soon as possible.
I downloaded your program from 1.8
and when I tried to run an exception occured which says Renderer Exception: OpenGl 2.0 or higher is required for jMonkeyEngine
I already have the latest jmonkeyEngine SDK and I made a lot of samples with it
this is my System:
Processor: Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz
Processor Speed: 3600 MHz
Physical Memory: 8074 MB
Processor Graphics in Use: Intel(R) UHD Graphics 630
Shader Version: 5.1
OpenGL* Version: 4.5
OpenCL* Version: 2.1
Vulkan* Version: 1.1.82
Android studio (even the newest version) cannot find jme plugin on its repositories.
I found a temporary solution:
The latest version of plugin at the time (1.3.4) doesn't work on the latest AS 3.1.2
I think you should add this plugin into AS plugins repos
P.S. I didn't check another versions lower than 1.3.2 and AS lower than 3.1.2
Ubuntu 16.04.3
java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
Hello, when trying to get the project using jitpack it cause some issue :
error log from jitpack
additional info :
jmonkey builder on jitpack
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.