Unsupported pass directive: zero (solved)

Hi.

I tried setting up a first demo game and it works fine. I could manage importing a single cube mesh from Blender 2.5 into jMonkey via the ogre xml exporter. And I was able to convert the xml files into .j3o, add collision detection and add some texture (unfortunately the texture chosen in Blender wasn´t used unit I explicitly assigned it in jMonkey).

Now I tried importing a complexer model a friend created. And I can create the .j3o file for the barrel mesh. But the scene can´t be converted. Everytime I try, I get an exception:


Checking extension..
Found assets-impl.xml
Checking extension..
Found assets-impl.xml
Checking extension..
Found assets-impl.xml
Cannot locate resource: Scenes/barrel.material
Unrecognized version number in dotScene file: 1.0.1
Child (Camera) attached to this node (Scenes/barrel-scene_node)
Child (Lamp) attached to this node (Scenes/barrel-scene_node)
Child (plank) attached to this node (Scenes/barrel-scene_node)
Material wood not found. Applying default material
Loaded material definition: Unshaded
Child (plankCube-sharedgeom) attached to this node (plankCube-ogremesh)
Child (plankCube-geom-1) attached to this node (plankCube-ogremesh)
Child (plankCube-ogremesh) attached to this node (plankCube-entity)
Child (plankCube-entity) attached to this node (plank)
Unsupported pass directive: emissive
Loaded material definition: Phong Lighting
Unsupported pass directive: emissive
Unsupported pass directive: zero

another import, same result:



Cannot locate resource: Scenes/dungeon.material
Unrecognized version number in dotScene file: 1.0.1
Child (Camera) attached to this node (Scenes/dungeon-scene_node)
Child (Cube) attached to this node (Scenes/dungeon-scene_node)
Child (Cube-ogremesh) attached to this node (Cube-entity)
Child (Cube-entity) attached to this node (Cube)
Child (Lamp) attached to this node (Scenes/dungeon-scene_node)
Child (Point) attached to this node (Scenes/dungeon-scene_node)
Child (Point.001) attached to this node (Scenes/dungeon-scene_node)
Child (Spot) attached to this node (Scenes/dungeon-scene_node)
Child (Sun) attached to this node (Scenes/dungeon-scene_node)
Unsupported pass directive: emissive
Loaded material definition: Phong Lighting
Unsupported pass directive: emissive
Unsupported pass directive: zero

and some additional information: i crosschecked again my own import which works with the simple mesh. it is also “scene version 1.0.1” but it works. even if there are also warnings as seen below:



Checking extension..
Found assets-impl.xml
Checking extension..
Found assets-impl.xml
Checking extension..
Found assets-impl.xml
Cannot locate resource: Scenes/Cube.material
Material Material not found. Applying default material
Loaded material definition: Unshaded
Child (Cube-sharedgeom) attached to this node (Cube-ogremesh)
Child (Cube-geom-1) attached to this node (Cube-ogremesh)
Cannot locate resource: Scenes/Tutorial.material
Unrecognized version number in dotScene file: 1.0.1
Child (Camera) attached to this node (Scenes/Tutorial-scene_node)
Child (Cube) attached to this node (Scenes/Tutorial-scene_node)
Child (Cube-ogremesh) attached to this node (Cube-entity)
Child (Cube-entity) attached to this node (Cube)
Child (Lamp) attached to this node (Scenes/Tutorial-scene_node)
Unsupported pass directive: emissive
Loaded material definition: Phong Lighting
Unsupported pass directive: emissive
Unsupported pass directive: zero
Unsupported pass directive: {
Unsupported pass directive: tex_address_mode
Unsupported pass directive: scale
Unsupported pass directive: env_map
Unsupported pass directive: colour_op_ex

Am I the only one that has problems with importing models? Just did another try. Just made an empty scene, added a cube, expanded it, added an UV Texture with a grass texture. Then exported the ogre xml. The cube.xml can be converted into .j3o, the scene is not working :frowning: And everytime the IDE shows “Converting model”, but the converting doesnt stop. Needs a IDE restart :frowning: Can´t work like that :frowning: That´s a showstopper, when there is no model working and 99% of the level design is imported models :(((

I dont get it. Even the ogre exporter works different everytime I try. Sometimes only the scene gets exported, other times also a cube.mesh.xml and cube.xml are getting created… ??? ;(

tashtego said:
I dont get it. Even the ogre exporter works different everytime I try. Sometimes only the scene gets exported, other times also a cube.mesh.xml and cube.xml are getting created... ???? ;(


it seems you have to select all items in blender before chosing export, else not all meshes / materials... are being exported. at least this problem could be solved. but it would be great to hear a solution for the other problems ;(

Can you post the .material file for models that had the “Unsupported pass directive: zero” issue?

@Momoko_Fan sure, but it looks unspectacular to me:





scene.material:



material _missing_material_
{
receive_shadows off
technique
{
pass
{
ambient 0.1 0.1 0.1 1.0
diffuse 0.8 0.0 0.0 1.0
specular 0.5 0.5 0.5 1.0 12.5
emissive 0.3 0.3 0.3 1.0
}
}
}

material Material
{
receive_shadows on
technique
{
pass
{
cull_hardware none
ambient 0.060716722160577774 0.060716722160577774 0.060716722160577774 1.0
diffuse 0.04857337845226195 0.04857337845226195 0.04857337845226195 1.0
specular 0.12722015380859375 0.13848040997982025 0.15540294349193573 1.0 12.5
emissive 0.0 0.0 0.0 1.0
scene_blend one zero
}
}
}

the problem is so easy to repeat. i cant understand i am the only one facing this bug every and every over again. just open a new blender file with the default mesh → export via ogrexml → convert the mesh, then convert the scene and already it crashes and the scene cant be converted. :frowning: i cant get my models running. is is so sad :frowning:

well to me this is a bug.



Product Version: jMonkeyPlatform Alpha-4

Java: 1.6.0_23; Java HotSpot™ Server VM 19.0-b09

System: Windows 7 version 6.1 running on x86; Cp1252; de_DE (jmonkeyplatform)



in my opinion the scene importer is unfunctional. i am stopping development until we can clear this. cant do anything anyways, now. without my scene. if you need any further information, files or stuff, please let me know.

java.nio.BufferOverflowException

at java.nio.Buffer.nextPutIndex(Buffer.java:495)

at java.nio.DirectFloatBufferU.put(DirectFloatBufferU.java:250)

at com.jme3.scene.plugins.ogre.MeshLoader.pushAttrib(MeshLoader.java:420)

Caused: java.nio.BufferOverflowException

at com.jme3.scene.plugins.ogre.MeshLoader.pushAttrib(MeshLoader.java:424)

at com.jme3.scene.plugins.ogre.MeshLoader.startElement(MeshLoader.java:570)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:812)

Caused: java.io.IOException: Error while parsing Ogre3D mesh.xml

at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:817)

[catch] at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:243)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:379)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:389)

at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(SpatialAssetDataObject.java:81)

at com.jme3.gde.core.assets.actions.ConvertModel$1.run(ConvertModel.java:63)

at java.lang.Thread.run(Thread.java:662)

You’re using an outdated version of jME3. Download the nightly builds or update your jMonkeyPlatform to use nightly builds

@Momoko_Fan



So the result of my tests:



I completely deinstalled the SDK, deleted all files under AppData and Programm folder.

I downloaded the SDK again, and installed it

I updated the whole SDK to the latest version

I downloaded the latest nightly build of the engine.

I created a new project and removed all libs

I added the libs from the nightly build

I created a new simple template mesh in blender 2.5, selected all and exported

I compiled the mesh to j3o which always works

I tried compiling the scene to j30 and again it fails.



So it is an actual problem in the latest version. What now?



Running on jMonkey Engine 3 Alpha 0.6
Extraction Directory #1: file:/C:/Program%20Files/jmonkeyplatform/jmonkeyplatform/modules/ext/
Extraction Directory #2: C:UsersMater.jmonkeyplatform
Extraction Directory #3: C:Program Filesjmonkeyplatform
EDT: Creating OGL thread.
Using LWJGL 2.7.1
Display created.
Adapter: nvd3dum
Driver Version: 8.15.11.8631
Vendor: NVIDIA Corporation
OpenGL Version: 3.0.0
Renderer: GeForce GT 120M/PCI/SSE2
GLSL Ver: 1.30 NVIDIA via Cg compiler
Timer resolution: 1000 ticks per second
Caps: [FrameBuffer, FrameBufferMRT, FrameBufferMultisample, OpenGL20, OpenGL21, OpenGL30, ARBprogram, GLSL100, GLSL110, GLSL120, GLSL130, VertexTextureFetch, TextureArray, TextureBuffer, FloatTexture, FloatColorBuffer, FloatDepthBuffer, PackedFloatTexture, SharedExponentTexture, PackedFloatColorBuffer, TextureCompressionLATC, MeshInstancing, VertexBufferArray]
DesktopAssetManager created.
Camera created (W: 640, H: 480)
Camera created (W: 640, H: 480)
Mouse created.
Keyboard created.
AudioRenderer supports 64 channels
Audio effect extension version: 1.0
Audio max auxilary sends: 1
Camera created (W: 120, H: 120)
Loaded material definition: Unshaded
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Stats Gui Node)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (BitmapFont) attached to this node (null)
Child (null) attached to this node (Statistics View)
Child (Statistics View) attached to this node (Stats Gui Node)
Loaded material definition: Wire Color
Valid jMP project, extending with ProjectAssetManager
DesktopAssetManager created.
Add locator:D:/Entwicklung/jMonkeyProjects/NewInstall/assets/
Checking extension..
No assets-impl.xml found
Creating assets-impl.xml
Creating extension assets
Cannot locate resource: Scenes/Cube.material
Material Material not found. Applying default material
Loaded material definition: Unshaded
Child (Cube-sharedgeom) attached to this node (Cube-ogremesh)
Child (Cube-geom-1) attached to this node (Cube-ogremesh)
Cannot locate resource: Scenes/newInstall.material
Unrecognized version number in dotScene file: 1.0.1
Child (Camera) attached to this node (Scenes/newInstall-scene_node)
Child (Cube) attached to this node (Scenes/newInstall-scene_node)
Child (Cube-ogremesh) attached to this node (Cube-entity)
Child (Cube-entity) attached to this node (Cube)
Child (Lamp) attached to this node (Scenes/newInstall-scene_node)
Unsupported pass directive: emissive
Loaded material definition: Phong Lighting
Unsupported pass directive: emissive
Unsupported pass directive: zero

Using the nightly build that material loads fine for me

great :frowning: … what about the scene file. can you see any problem here?



[xml]

<?xml version="1.0" ?>

<scene export_time="1308178863.323" exported_by="Mater" formatVersion="1.0.1" previous_export_time="0">

<nodes>

<node name="Camera" uuid="f36f6b3f677e84460558f06f35535828">

<position x="-7.481132" y="5.343665" z="-6.507640"/>

<quaternion w="0.781600" x="-0.481707" y="0.334251" z="0.212922"/>

<scale x="1.000000" y="1.000000" z="1.000000"/>

<game>

<sensors/>

<actuators/>

</game>

<camera fov="28.841546255021967" name="Camera" projectionType="perspective">

<clipping farPlaneDist="100.0" nearPlaneDist="0.10000000149011612"/>

</camera>

</node>

<node name="Cube" uuid="517b060d8e7001a6e0ecc4564ec5c32b">

<position x="-0.000000" y="0.000000" z="0.000000"/>

<quaternion w="1.000000" x="-0.000000" y="0.000000" z="0.000000"/>

<scale x="1.000000" y="1.000000" z="1.000000"/>

<game>

<sensors/>

<actuators/>

</game>

<entity actor="False" anisotropic_friction="False" damping_rot="0.1589999943971634" damping_trans="0.02539999969303608" friction_x="1.0" friction_y="1.0" friction_z="1.0" ghost="False" inertia_tensor="0.4000000059604645" lock_rot_x="False" lock_rot_y="False" lock_rot_z="False" lock_trans_x="False" lock_trans_y="False" lock_trans_z="False" mass="1.0" mass_radius="1.0" meshFile="Cube.mesh" name="Cube" physics_type="STATIC" velocity_max="0.0" velocity_min="0.0"/>

</node>

<node name="Lamp" uuid="ea3c5916fc66ed117365bb1dbe350764">

<position x="-4.076245" y="5.903862" z="1.005454"/>

<quaternion w="0.570948" x="-0.169076" y="0.755880" z="0.272171"/>

<scale x="1.000000" y="1.000000" z="1.000000"/>

<game>

<sensors/>

<actuators/>

</game>

</node>

</nodes>

<externals>

<item type="material">

<file name="Scene.material"/>

</item>

</externals>

<environment>

<colorDiffuse b="0.05087608844041824" g="0.05087608844041824" r="0.05087608844041824"/>

<colorBackground b="0.05087608844041824" g="0.05087608844041824" r="0.05087608844041824"/>

<colorAmbient b="0.0" g="0.0" r="0.0"/>

</environment>

</scene>

[/xml]

see last comment.



and here the actual error message when reloading the sdk. am i right that users cant even use nebeans with jmonkey? because only the sdk has the model importer / converter? how could i get models into the normal netbeans version? and is there already a release plan for the next alpha or maybe beta version of the sdk? thanks for the patience… i´m quite frustrated but i hope you can get this thing running anyways.



java.lang.NullPointerException
at com.jme3.scene.Node.attachChild(Node.java:251)
at com.jme3.scene.plugins.ogre.SceneLoader.startElement(SceneLoader.java:269)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at com.jme3.scene.plugins.ogre.SceneLoader.load(SceneLoader.java:340)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:243)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:379)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:389)
[catch] at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(SpatialAssetDataObject.java:81)
at com.jme3.gde.core.assets.actions.ConvertModel$1.run(ConvertModel.java:63)
at java.lang.Thread.run(Thread.java:662)

ok i finally managed to get it running. SDK → Tools → Plugins → Settings → activate “nightly” ----> gold worth :frowning:

downloading the trunk of the sdk didnt help but activating these settings in the normal ide works fine as it seems.

thanks for the patience.

You can use NetBeans/Eclipse with jME. The importers are all there so you can actually load .scene and .mesh.xml files directly