still WIP(a lot to do), but looks nice already. thanks Discord people for some help
its about:
That is pretty slick! I’ll be interested in seeing where you go with it.
My first working PBR test!
Sorry for the poor quality image, this forum has issues with normal sized images.
The shield from here: Greek God Outfit for Genesis 3 Male(s) | 3D Models and 3D Software by Daz 3D
Still playing with getting it to render correctly, I have a feeling that I do not have my materials mapped correctly.
PBR require some knowledge, had same problems get it work on start
LightProbe you have there?
first step i would try set metallic = 1, roughness = 0 and see if it reflect probe.
Well, that certainly is interesting:
This is Metallic 1, and Roughness 0.
This is my light probe code, it is based on the jme example.
@Override
protected void initialize(Application a) {
app = (SimpleApplication) a;
//Light
dl = new DirectionalLight();
dl.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());
app.getRootNode().addLight(dl);
dl.setColor(ColorRGBA.White);
//Filter
fpp = new FilterPostProcessor(app.getAssetManager());
fpp.addFilter(new ToneMapFilter(Vector3f.UNIT_XYZ.mult(4.0f)));
app.getViewPort().addProcessor(fpp);
//Env Cam
envCam = new EnvironmentCamera(256, new Vector3f(0, 3f, 0));
app.getStateManager().attach(envCam);
//Done
initilized = true;
}
@Override
public void update(float tpf) {
if (probing) {
renderSteps++;
if (renderSteps == 2) { //Give the scene a frame to update
world = (Node) app.getRootNode().getChild("world");
world.removeFromParent();
probe = LightProbeFactory.makeProbe(app.getStateManager().getState(EnvironmentCamera.class), app.getRootNode(), new JobProgressAdapter<LightProbe>() {
@Override
public void done(LightProbe result) {
}
});
((SphereProbeArea) probe.getArea()).setRadius(100);
app.getRootNode().addLight(probe);
} else if (renderSteps > 10) {
app.getRootNode().attachChild(world);
probing = false;
}
}
}
yes, definetly something is wrong, let me think…
This is where I create the model
@Override
public void simpleInitApp() {
stateManager.attach(new JmeLightingState());
gen = new ModelMeta(assetManager);
gen.loadModel("Models/test/test_object.gltf");
HashMap<String, String> textures = new HashMap<>();
textures.put("MetallicMap", "Textures/test/mGGShield01S.jpg");
textures.put("RoughnessMap", "Textures/test/mGGShield01B.jpg");
textures.put("NormalMap", "Textures/test/mGGShield01N.jpg");
textures.put("BaseColorMap", "Textures/test/mGGShield01.jpg");
for (String mesh : gen.getMeshNames()) {
gen.setPBRMaterial(mesh, textures, false);
}
Spatial sky = SkyFactory.createSky(assetManager, "Textures/test/Path.hdr", SkyFactory.EnvMapType.EquirectMap);
rootNode.attachChild(sky);
Spatial model2 = gen.getModel();
world.attachChild(model2);
stateManager.attach(gen.getDebug());
stateManager.attach(new ItemGUI(gen));
flyCam.setDragToRotate(true);
Node target = new Node("CamTarget");
target.move(0, 0, 0);
rootNode.attachChild(world);
initInputs();
}
2 questions:
as i see both Lightprobe, and envmap generation is done on app.getRootNode() so it should be fine for this case.
myself i have some class to “reupdate light probe on require” and i use something like this(on some later frames like you did):
private void updateLightProbe() {
Vector3f vector = followSpatial != null ? followSpatial.getLocalTranslation() : followVector;
environmentCamera.setEnabled(true);
environmentCamera.setPosition(vector);
if(lightProbe == null){ //todo tmp code, inner is broken - work wrong
final LightProbe lastLightProbe = lightProbe;
lightProbe = LightProbeFactory.makeProbe(environmentCamera, viewNode, new JobProgressAdapter<LightProbe>() {
@Override
public void done(LightProbe result) {
LOGGER.log(Level.INFO, "updateLightProbe() make Probe done");
//Node tex = EnvMapUtils.getCubeMapCrossDebugViewWithMipMaps(result.getPrefilteredEnvMap(), assetManager);
//((BoundingSphere) lightProbe.setAreaType(LightProbe.AreaType.Spherical)).setRadius(radius);
lightProbe.setAreaType(LightProbe.AreaType.Spherical);
lightProbe.getArea().setRadius(radius);
if(lastLightProbe != null){
lastLightProbe.setEnabled(false);
probeNode.removeLight(lastLightProbe);
}
lightProbe.getColor().multLocal(0.2f);
lightProbe.setPosition(vector);
probeNode.addLight(lightProbe);
LOGGER.log(Level.INFO, "generated and re-attatched lightprobe light");
environmentCamera.setEnabled(false);
isReady = true;
}
});
}
}
maybe it will help you somehow too.
edit:
for further discussion lets create new topic or PM
edit:
oh i just now noticed, the yellow ball is shield not sphere right?
so it looks like reflection works correctly, but for some reason envmap is “yellow”. do you maybe have yellow background before you generate skybox? or something like this? there is something wrong with envmap i think.
The best way to solve this would be anyway copy paste JME PBR Test, add your model there and slowly add your changes to see what cause problem.
nice!
but why 19 fps is this screenshot area taker that freeze app making it low?
or is it just that low? if it is, then this shield would need have like milions of tris.
Nah, the windows snipping tool freezes the screen and does that. This is running at about 3100 fps on my 1080ti.
Bugs in progress.
It’s been a while since I’ve been able to get much work done, but lately I’ve managed to get back to working on some tools for my external scene editor, specifically aiming to make it easier to edit large maps that contain many scenes.
Here’s a demo video showing the Terrain Editing tool.
The few main features in the video:
Next on my agenda is to finish the Advanced PBR Terrain shader I mentioned a few months ago, and then integrate that into the editing tool as well.
wow, its really much customizable, i like it
Hey monkeys! I haven’t posted anything on the WIP thread in a long time, mainly because all of your posts completely outshine anything I can show
Regardless, I decided to post something here, just to be a bit more active.
I worked on a platformer game, where you must have money to live. The goal is to gather all the supporters and complete the level, while avoiding obstacles and collecting money, because if you die, you lose some money and the more times you die, the more money you lose. If you have no more money, you lose the game. The ideal goal is to finish the level with the least amount of deaths and the most money, but take note the longer you take, the worse a death will be on your money!
Everything is in an early state right now, and development is a bit slow due to personal reasons, but I plan to add new things to the game (custom model, a better background/textures because looking at it hurts my eyes, sounds, etc.)
Besides this, I enjoy the jMonkeyEngine very much! Experimenting with all the features you guys support is so much fun, and I’m glad to be apart of this community.
nice, but my eyes are blowing!
Posting in the last day of the month .
I am working on a platformer game. The game offers to the player designing levels and playing other player’s levels that are uploaded to the game server. The game currently supports electrical circuits so the level designer could take decisions when there is another one playing his level e.g: opening doors, opening chests so the player could go to the home and win the level. I feel that the creatures or enemies mechanics should be developed more so they would be more interesting to the player. The only creatures in the game are the mouse included in the video and the spider which can clamp walls. So what do you think guys because I got bored now .