Editor: jMonkeyBuilder

Blender also has Fly mode as it calls it. Default key is F and it turns camera control to first person shooter until left clicked to confirm or right clicked to cancel.

I opened a ticket regarding to the mess that are tabs in the glsl editor.

ok :slight_smile:

I have done 563 lines of translation. Iā€™ll make a pr after all is done.

You know what? My Chinese friend canā€™t wait for your shader node editor in 1.4.0.

you can use the previous version, but I need to wait for some changes in jme core to continue improving shader nodes editor :slight_smile:

Finished translation for message_ZH_cn.properties

There may be many mistakes in this version, Iā€™ll correct them in the future.

I made a pr here Add Chinese translation for User Interface by jmecn Ā· Pull Request #3 Ā· JavaSaBr/jmonkeybuilder Ā· GitHub

could you re-target your PR to develop branch, please? :slight_smile:

Are there any guides for when and how I should use this? It seems very interesting!

Please let me know! :slight_smile:

OK, please check it.

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:

Path source

Path destinationFolder

Path destination

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.

I also create an issue here:

I have fixed it in the develop branch :slight_smile: thanks for your issue :slight_smile:

need add more ā€œUser Experience " Mouse Hover tips component info in popup 怂ā€ Multiple Language" version
resemble ā€œBlenderā€

blender is top of everything. But this is hard to concentrate on such things. Actually blender tooltips become nice not so long time ago, they was only representation of python command hidden under button all the time

Hello

Iā€™m placing a BulletState via JMonkeyBuilder. Physics is working properly

I am trying to recover the AppState in the program by doing:

this.getStateManager().getState(BulletAppState.class);

Only the recovered BulletAppState is always null.

I then looked in the com.ss.editor package and noticed the presence of EditableBulletSceneAppState

I get an EditableBulletSceneAppState, but when I try to add a rigidbodycontrol to the PhysicsSpace, I see that the PhysicSpace is null.

I must be wrong somewhere, can you help me?

THOCED

When you try to add a new physic body to the state, is the state running at the moment?

Sorry, I do not understand your question,

Do you want to know if in JmonkeyBuilder, the rigidBody was on Enable?

Here is the code to get the AppState:

fpp = new FilterPostProcessor(assetManager);

SceneLoader.install(this,fpp);

Spatial spatial = assetManager.loadModel(ā€œ/Scenes/myScene02.j3sā€);
rootNode.attachChild(spatial);

BulletAppState bullet = this.getStateManager().getState(BulletAppState.class);

bullet is always null

When I get another AppState (ex: LightingState or SkyState), it works fine

PS: Sorry Iā€™m not sure Iā€™m answering your question correctly, but I do not understand it well

Good evening,

Another problem since I use version 1.3.

When I try to convert a gltf or other file to j3o. An error occurs systematically. The destination directory path is never good and even if I modify it, the following exception happens:

java.nio.file.NoSuchFileException: Models \ house01.j3o
at sun.nio.fs.WindowsException.translateToIOException (WindowsException.java:79)
at sun.nio.fs.WindowsException.rethrowAsIOException (WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException (WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel (WindowsFileSystemProvider.java:230)
at java.nio.file.spi.FileSystemProvider.newOutputStream (FileSystemProvider.java:434)
at java.nio.file.Files.newOutputStream (Files.java:216)
at com.ss.editor.file.converter.impl.AbstractModelFileConverter.convertImpl (Unknown Source)
at com.ss.editor.file.converter.impl.AbstractModelFileConverter.lambda $ convert $ 1 (Unknown Source)
at com.ss.editor.executor.impl.BackgroundEditorTaskExecutor.doExecute (Unknown Source)
at com.ss.editor.executor.impl.AbstractEditorTaskExecutor.run (Unknown Source)

THOCED

Can you try the SDK? If it works there you can simply copy the j3o files to jMB :slightly_smiling_face:

It works well with the SDK, the conversion works but since I downloaded version 1.3 of the JMB, the conversion does not work anymore since JMB (temporarily I use the conversion with the SDK)

yep, I saw this problem, Itā€™s already fixed in the develop branch, Iā€™m going to upload 1.3.1 version tomorrow.

1 Like