SceneGraphDump

Finally I found something that doesn't have 1000 dependencies to my project…

This is a little utility called SceneGraphDump, it takes a scene element object and then prints the scene graph for it.

Here's an example output:


RenderState keys:
A    - AlphaState
C    - CullState
L    - LightState
M    - MaterialState
T    - TextureState
Z    - ZBufferState
F    - FogState
St    - StencilState
W    - Wireframestate
Cm    - ColorMaskState
D    - DitherState
Sh    - ShadeState
Fp    - FragmentProgramState
Vp    - VertexProgramState
Glsl    - GLSLShaderObjectsState

Geometry Buffer keys:
V   - Vertex
N   - Normal
C   - Color
T   - Tangent
B   - Binormal
I   - Index
T#   - Texture Coordinate

Node: Model
Children: SkinNode/wee man-mesh-skin_node  Bone/ex_Bip01-node 


SkinNode: wee man-mesh-skin_node
Children: TriMesh/wee man-mesh 
TriMesh: wee man-mesh
.......................
TriangleBatch: 02_Default
RenderStates: MT
0: /E:/Project Essence/Source Code/jME/bin/jmetest/data/model/collada/OldMan_Face-low.tga - RGB888-DXT1x512x512
r.rgb = r.rgb * tex0.rgb;
r.a = r.a * tex0.a;

Batches set: VINT0
Vertex: 1084
Triangles: 1326
.......................
TriangleBatch: orig_13_-_Default
RenderStates: MT
0: /E:/Project Essence/Source Code/jME/bin/jmetest/data/model/collada/BLAZER-RGB.tga - RGB888-DXT1x512x512
r.rgb = r.rgb * tex0.rgb;
r.a = r.a * tex0.a;

Batches set: VINT0
Vertex: 994
Triangles: 974
.......................
TriangleBatch: Material__74
RenderStates: MT
0: /E:/Project Essence/Source Code/jME/bin/jmetest/data/model/collada/ED_4900CompleteMap.tga - RGB888-DXT1x256x256
r.rgb = r.rgb * tex0.rgb;
r.a = r.a * tex0.a;

Batches set: VINT0
Vertex: 1809
Triangles: 2128
.......................
TriangleBatch: 15_-_Default
RenderStates: MT
0: /E:/Project Essence/Source Code/jME/bin/jmetest/data/model/collada/slacks_rgb.tga - RGB888-DXT1x512x512
r.rgb = r.rgb * tex0.rgb;
r.a = r.a * tex0.a;

Batches set: VINT0
Vertex: 1939
Triangles: 1822
Bone: ex_Bip01-node
Controllers: [com.jme.animation.AnimationController@1de9ac4]
Children: Bone/ex_Bip01_Pelvis-node 
Bone: ex_Bip01_Pelvis-node
Children: Bone/ex_Bip01_Spine-node 
Bone: ex_Bip01_Spine-node
Children: Bone/ex_Bip01_L_Thigh-node  Bone/ex_Bip01_R_Thigh-node  Bone/ex_Bip01_Spine1-node 
Bone: ex_Bip01_L_Thigh-node
Children: Bone/ex_Bip01_L_Calf-node 
Bone: ex_Bip01_L_Calf-node
Children: Bone/ex_Bip01_L_Foot-node 
Bone: ex_Bip01_L_Foot-node
Children: Bone/ex_Bip01_L_Toe0-node 
Bone: ex_Bip01_L_Toe0-node
Children: Bone/ex_Bip01_L_Toe01-node 
Bone: ex_Bip01_L_Toe01-node
Children: Bone/ex_Bip01_L_Toe02-node 
Bone: ex_Bip01_L_Toe02-node
Bone: ex_Bip01_R_Thigh-node
Children: Bone/ex_Bip01_R_Calf-node 
Bone: ex_Bip01_R_Calf-node
Children: Bone/ex_Bip01_R_Foot-node 
Bone: ex_Bip01_R_Foot-node
Children: Bone/ex_Bip01_R_Toe0-node 
Bone: ex_Bip01_R_Toe0-node
Children: Bone/ex_Bip01_R_Toe01-node 
Bone: ex_Bip01_R_Toe01-node
Children: Bone/ex_Bip01_R_Toe02-node 
Bone: ex_Bip01_R_Toe02-node
Bone: ex_Bip01_Spine1-node
Children: Bone/ex_Bip01_Spine2-node 
Bone: ex_Bip01_Spine2-node
Children: Bone/ex_Bip01_Spine3-node 
Bone: ex_Bip01_Spine3-node
Children: Bone/ex_Bip01_Neck-node 
Bone: ex_Bip01_Neck-node
Children: Bone/ex_Bip01_Head-node  Bone/ex_Bip01_L_Clavicle-node  Bone/ex_Bip01_R_Clavicle-node 
Bone: ex_Bip01_Head-node
Bone: ex_Bip01_L_Clavicle-node
Children: Bone/ex_Bip01_L_UpperArm-node 
Bone: ex_Bip01_L_UpperArm-node
Children: Bone/ex_Bip01_L_Forearm-node 
Bone: ex_Bip01_L_Forearm-node
Children: Bone/ex_Bip01_L_Hand-node 
Bone: ex_Bip01_L_Hand-node
Bone: ex_Bip01_R_Clavicle-node
Children: Bone/ex_Bip01_R_UpperArm-node 
Bone: ex_Bip01_R_UpperArm-node
Children: Bone/ex_Bip01_R_Forearm-node 
Bone: ex_Bip01_R_Forearm-node
Children: Bone/ex_Bip01_R_Hand-node 
Bone: ex_Bip01_R_Hand-node



BTW, the output is from the model neakor gave me to check for missing images.

And here is the code, to use just call SceneGraphDump.dump on your root node or model.
http://www.jmonkeyengine.com/wiki/doku.php?id=scenegraphdump#code

I just realized how useful this is for troubleshooting on the forum. Thank you in the name of everybody having scenegraph problems in the future! :slight_smile:

Shouldn't go this in JME? E.g. in a new package "com.jmex.tools" or so?

Im too agree, when have problem this helps to tell problem

A lot of things posted under User Code should have been included in jME, but they weren't… Is there a particular reason why code posted here is not considered to be included?

de-zombifying :slight_smile:



I agree in full, this should be included directly into jME.

In this case, I agree with the sentiment that this is a useful little tool for core inclusion.  In general though, I thought code posted here is considered part of jME?  We also have a user google code repo for code that needs revision history and such.