[SOLVED] Jme-Vehicles Failed to run

Hi @sgold , i have cloned jme-Vehicles the latest , build is fine , but when trying to run , it opens fine , jaime animation displays , then i ses the car for less than 1 second & the game crashes with logs :

java.lang.UnsupportedOperationException: No technique 'Default' on material 'Afflicted PBR Terrain' is supported by the video hardware. The capabilities [GLSL150] are required.
	at com.jme3.material.Material.selectTechnique(Material.java:770)
	at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:599)
	at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:266)
	at com.jme3.renderer.queue.RenderQueue.renderShadowQueue(RenderQueue.java:275)
	at com.jme3.shadow.AbstractShadowRenderer.renderShadowMap(AbstractShadowRenderer.java:439)
	at com.jme3.shadow.AbstractShadowRenderer.postQueue(AbstractShadowRenderer.java:412)
	at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1103)
	at com.jme3.renderer.RenderManager.render(RenderManager.java:1158)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:272)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:530)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:632)
	at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:466)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
	at com.jme3.app.SimpleApplication.start(SimpleApplication.java:127)
	at com.jayfella.jme.vehicle.lemurdemo.MavDemo1.main(MavDemo1.java:227)

as i understand my laptop graphic card driver openGL3.0 mesa doesnot support the technique used by a physics world , the problem is i cannot find the shader Afflicted PBR Terrain , i must replace it w/ the standard PBRLighting.j3md instead or must i do something else . Any Clue ?? i hope , i can edit it through code , not the SDK(as i would have to render it , which i really cannot)

thanks,

my drivers are :

INFO: OpenGL Renderer Information
 * Vendor: Intel Open Source Technology Center
 * Renderer: Mesa DRI Intel(R) Kabylake GT2F 
 * OpenGL Version: 3.0 Mesa 19.3.3
 * GLSL Version: 1.30
 * Profile: Compatibility

NB ; i run both Mavdemo1 & HelloMav runnable classes , both of which , gives me the same exception

EDIT :
Tried to open vehicle-playground.j3o through the JME-SDK i got this exception :

image

1 Like

Can you try with OpenGL 3 core profile.

You need to set this on AppSettings:
settings.setRenderer(AppSettings.LWJGL_OPENGL32);

Also does your laptop have a dedicated graphics card (AMD or NVidia)?

2 Likes

No.

I will try.

1 Like
com.jme3.renderer.RendererException: Shader failed to link, shader:Shader[numSources=2, numUniforms=85, numBufferBlocks=0, shaderSources=[ShaderSource[name=MatDefs/frag/AfflictedPBRTerrain.frag, defines, type=Fragment, language=GLSL150], ShaderSource[name=MatDefs/vert/AfflictedPBRTerrain.vert, defines, type=Vertex, language=GLSL150]]]
error: fragment shader input `wTangent' has no matching output in the previous stage

	at com.jme3.renderer.opengl.GLRenderer.updateShaderData(GLRenderer.java:1564)
	at com.jme3.renderer.opengl.GLRenderer.setShader(GLRenderer.java:1576)
	at com.jme3.material.logic.SinglePassAndImageBasedLightingLogic.render(SinglePassAndImageBasedLightingLogic.java:259)
	at com.jme3.material.Technique.render(Technique.java:166)
	at com.jme3.material.Material.render(Material.java:1026)
	at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:614)
	at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:266)
	at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:305)
	at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:877)
	at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:779)
	at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1108)
	at com.jme3.renderer.RenderManager.render(RenderManager.java:1158)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:272)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:530)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:632)
	at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:466)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
	at com.jme3.app.SimpleApplication.start(SimpleApplication.java:127)
	at com.jayfella.jme.vehicle.lemurdemo.MavDemo1.main(MavDemo1.java:227)


Process finished with exit code 1

it uses GLSL150 , my deviceā€™s Shader preprocessor is GLSL130 , so no way to run this version without removing AflictedPBRTerrain.j3md from the playground , anyway i have my old fork in PBRLighting.j3md & its working fine . thanks

The vehicle-playground world uses the standard ā€œPBR Lightingā€ material definitions, not the @yaRnMcDonuts ā€œPBR Terrainā€ definitions. (The world using PBR Terrain is the one named ā€œMountainsā€.)

Since ā€œMountainsā€ is the initial world for both ā€œHelloMavā€ and ā€œMavDemo1ā€, this issue is going to block you from running both apps. Sorry!

1 Like

I will fix this to also allow your version, this must have been a mistake I made while working on the advanced shader that required glsl150 + for texture arrays, but the basic copy of the shader doesnt need them so I should be able to add an allowance for lower versions. I will try to update the code asap. My apologies for breaking the MAV app for you.

2 Likes

I just uploaded a version that should work for you now, let me know if it gives you any trouble still.

2 Likes

Thanks, @yaRnMcDonuts ! I updated the jme-vehicles build script to use the new version of PBR Terrain.

2 Likes

Thank you both , seems the problem is with my laptop :smile: , i have changed the AfflictedPBR to use v1.0.2 but i get this exception :

SEVERE: Uncaught exception thrown in Thread[main,5,main]
com.jme3.renderer.RendererException: Shader failed to link, shader:Shader[numSources=2, numUniforms=85, numBufferBlocks=0, shaderSources=[ShaderSource[name=MatDefs/frag/AfflictedPBRTerrain.frag, defines, type=Fragment, language=GLSL130], ShaderSource[name=MatDefs/vert/AfflictedPBRTerrain.vert, defines, type=Vertex, language=GLSL130]]]
error: fragment shader input `wTangent' has no matching output in the previous stage

	at com.jme3.renderer.opengl.GLRenderer.updateShaderData(GLRenderer.java:1564)
	at com.jme3.renderer.opengl.GLRenderer.setShader(GLRenderer.java:1576)
	at com.jme3.material.logic.SinglePassAndImageBasedLightingLogic.render(SinglePassAndImageBasedLightingLogic.java:259)
	at com.jme3.material.Technique.render(Technique.java:166)
	at com.jme3.material.Material.render(Material.java:1026)
	at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:614)
	at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:266)
	at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:305)
	at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:877)
	at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:779)
	at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1108)
	at com.jme3.renderer.RenderManager.render(RenderManager.java:1158)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:272)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:530)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:632)
	at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:466)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
	at com.jme3.app.SimpleApplication.start(SimpleApplication.java:127)
	at com.jayfella.jme.vehicle.lemurdemo.MavDemo1.main(MavDemo1.java:224)

So, i have deactivated Mountains world , & used the Racetrack as default .

2 Likes

The problem is actually on my end again I think. A friend that was testing my game actually had the same error with the ā€˜wtangentā€™ variable recently, but I procrastinated fixing it, since they were not running the app in an IDE and they couldnā€™t find the error in the logs to give me a complete error message as you have, which meant I had no clue which of my shaders was causing it. So i appreciate your help finding this bug.

Shader versions can be tricky to work with sometimes, since a minor mistake in shader code can slip by depending on the version of GLSL and the GPU the developer is using, but will still cause crashes like this on other GPUs. I will try to fix it and re-upload again soon, since it should be an easy fix.

2 Likes

Just ping me here , to test it :slight_smile:

2 Likes

@Pavl_G Iā€™ve just uploaded a new version 1.0.3 to bintray that should fix the error. Iā€™ve also cleaned up the shaders to remove any other unused variables and defines I left laying around that could also cause more issues on other glsl versions - it should all work now, but let me know if it causes anymore trouble for you.

2 Likes
com.jme3.asset.AssetLoadException: An exception has occurred while loading asset: /Materials/Vehicles/Mountains.j3m
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:262)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:374)
	at com.jme3.asset.DesktopAssetManager.loadMaterial(DesktopAssetManager.java:395)
	at com.jayfella.jme.vehicle.examples.worlds.Mountains.load(Mountains.java:98)
	at com.jayfella.jme.vehicle.gui.menu.WorldMenu.setWorld(WorldMenu.java:71)
	at com.jayfella.jme.vehicle.gui.menu.WorldMenu.lambda$createItems$1(WorldMenu.java:46)
	at com.simsilica.lemur.core.CommandMap.runCommands(CommandMap.java:61)
	at com.simsilica.lemur.Button.runClick(Button.java:359)
	at com.simsilica.lemur.Button$ButtonMouseHandler.mouseButtonEvent(Button.java:436)
	at com.simsilica.lemur.event.MouseEventControl.mouseButtonEvent(MouseEventControl.java:122)
	at com.simsilica.lemur.event.PickEventSession.buttonEvent(PickEventSession.java:657)
	at com.simsilica.lemur.event.MouseAppState.dispatch(MouseAppState.java:98)
	at com.simsilica.lemur.event.MouseAppState$MouseObserver.onMouseButtonEvent(MouseAppState.java:114)
	at com.jme3.input.InputManager.processQueue(InputManager.java:841)
	at com.jme3.input.InputManager.update(InputManager.java:917)
	at com.jme3.app.LegacyApplication.update(LegacyApplication.java:724)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:246)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:530)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:632)
	at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:466)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
	at com.jme3.app.SimpleApplication.start(SimpleApplication.java:127)
	at com.jayfella.jme.vehicle.lemurdemo.MavDemo1.main(MavDemo1.java:226)
Caused by: java.io.IOException: The material parameter: ProbeColor is undefined.
	at com.jme3.material.plugins.J3MLoader.readValueParam(J3MLoader.java:422)
	at com.jme3.material.plugins.J3MLoader.readExtendingMaterialParams(J3MLoader.java:441)
	at com.jme3.material.plugins.J3MLoader.loadFromRoot(J3MLoader.java:771)
	at com.jme3.material.plugins.J3MLoader.load(J3MLoader.java:800)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:260)
	... 23 more


Process finished with exit code 1

removed ProbeColor attribute from the Mountains.j3m & it works but quality is not satisfying :

@yaRnMcDonuts what do you think ?

1 Like

That is strange, it appears like the probe is getting scaled to be way too bright, but the textures also looks stretched. I was meaning to run the MAV library myself yesterday to see if I get the same results on my GPU, but did not get a chance

I looked through my own scenes and didnā€™t notice anything like this, so I will try to run MAV soon and see. If it doesnā€™t occur with this GPU, then I will also try to run the shaders on my old device to see if I can reproduce the problem there.

2 Likes

The scene looked normal on this device, so I will give it another look with my other device. I havenā€™t booted it up in a while, but from past experience, Iā€™ve noticed that thereā€™s a slew of shader errors that this device manages to bypass while the other device will usually catch them.

Also, it sounds like you have managed to load up JMEā€™s PBRLighting.j3md shader without this problem, so the car model in MAV is not causing the same problem is that correct?
And if so, have you also ever been able to use the stock JME terrain with the stock shader called TerrainLighting.j3md?

If the answer is yes to both of these questions, then I can be almost certain that it is indeed a problem in my shader that I should be able to fix.

1 Like

All the cars are already standard PBRLighting.j3md , as for TerrainLighting.j3md , i havenot tried it before , its better we use a testcase , if we want to reproduce the problem.

1 Like

That is a good idea, I actually have this single class test case for a pbr terrain already made that we can use. You can press the ā€˜pā€™ key to toggle between triplanar and non-triplanar texturing mode to see if the problem still happens in both modes.

This example is similar to the basic terrain example in the wiki, and uses the same textures from jme3-test-data.

It also uses a light probe that you can find in the same examples directory that the test case above is located in.

2 Likes

Any news about this issue? @Pavl_G, did you run the single-class test?

Once all known issues are resolved, Iā€™d like to add PBR terrain to JMonkeyEngine. It would be a nice feature to include in v3.4 .

2 Likes

Exams last 2 more other days & I will be free to try the single test :slightly_smiling_face: , I am having it in my schedule donot worry .

2 Likes

That would be great, Iā€™ll do as much final testing as I can as well, and Iā€™ll also get the advanced test case/example uploaded soon.

I actually finished the test case for AdvancedAfflictedPBRTerrain.j3md, but hit a dilemma in regards to using additional textures as test assets.

My first test case uses the tetxures in jme-test-data, but the second test case will require additional textures for roughness/ao/metallic maps, and also requires that all of the textures are the same size and format to work with a texture array, which is unfortunately not the case for the existent terrain textures in the jme-test-data folder.

So I was wondering if I should just upload my own textures to the PRTerrain test case folder where I also put the light probe for my test case - or would it be preferred that I add these new textures to the jme-test-data library?

I am also curious, if I have access commercially licensed textures from a paid source (such as Substance Source subscription), is it okay for me to include any of those textures in my open source test case as long as I state that the assets arenā€™t open source/creative commons in a license? Or should I avoid doing that altogether and just find some new textures? IT would be easier to use my current textures so I donā€™t have to resize and reformat new ones again in preparation for the texture array but I figured I should get some input before going any further with that.

1 Like