[Editor] Scene Worker

[Editor] - SceneWorker

Project name: Scene Worker

Game type:  Editor

Links:  http://code.google.com/p/scenemonitor/

Links:  http://jmonkeyengine.com/blog/sceneworker/

Linkshttp://www.youtube.com/user/ncomptube

License:  BSD

Recruiting  Yes

Contact:  ncomp

Status:  active



Abstract:

SceneWorker is a tool to create and edit scenes using jme and built on nymons SceneMonitor framework. It can be executed as a standalone application or plugged into your source code. It is a Swing application/framework and it is extensible.



Current Release is version 1.1 alpha 2. Both standalone and jars can be found here;



http://code.google.com/p/scenemonitor/downloads/list



I'm looking for people to help out with coding or testing.

Caveats for this release : mouse based transformation tools are very very buggy, most of the features have not been stress tested.



Demos with incomprehensible irish man mumbling over them can be found here;



http://www.youtube.com/user/ncomptube



Feature List



Features



General
- spatials, renderstates can be cut, removed or pasted from the scene graph
- objects can be copied by reference or copied by data i.e. cloned
- all classes implementing savable can be saved to disk
- SceneWorker can be run as standalone or plugged directly into source code with less than 5 lines of set up

Tools
- spatial selection tool allows spatials to be selected from the scenegraph by clicking on them
- triangle selection tool allows individual triangles to be selected from the currently selected spatial, this will also update the mesh buffer inspector
- free translation tool allows spatials to be translated by clicking and dragging in the window
- rotation, translation and scale axis modifiers are present
- rotator tool allows you to specify rotations about x, y, z for the selected spatial
- front, top and left camera buttons
- align along x aligns selected spatials along x axis
- align along y aligns selected spatials along y axis
- align along z aligns selected spatials along z axis
- space along x spaces selected spatials along x axis
- space along y spaces selected spatials along y axis
- space along z spaces selected spatials along z axis

Preferences
- can set the far planne of the camera
- edit the background colour of the scene
- toggle integer snap on for translation of spatials
- toggle zooming of camera to objects selected from the scene tree
- toggle placement of newly created objects at cameras position
- OpenGL Extensions can be inspected and searched
- GLSL shader language info can be inspected

Primitives Creation and Editing
- support for editing and creation of Quad, Box, Sphere, Text, Dome, Cylinder, Disk, Pyramid, Capsule, Torus, Tube, RoundedBox, PQTorus and TeaPot

Import
- following formats are supported for importing; jme, ogre xml (mesh and scene types), eds, ms3d, obj, x3d, md3, md2, ase, dae
- there is also an interface to the resource locator tool so resource locations can be set prior to import

Scripting
- beanshell controller can be added to a spatial so that spatials can be scripted in their update method
- execute beanshell editor can be used to execute a script on a selected spatial
- script snippets include Simple Ambient Occlusion Shader Attribute Calculator, Tangent Binormal Shader Attribute Calculator
- java 2D textures can be created

Utilities
- update render state, geometric state and bounds can be called on any selected spatial
- objects can update their translations to track the camera
- normals can be recalculated on a node, recursive function
- normals can be inverted on a node, recursive function
- texture coordinates can be copied from one unit to another
- all controllers can be restarted in a node, recursive function
- spatials can be dropped onto other spatials or the ground
- spatials can be dropped onto other spatials bounds
- children of a node can be reorganised

Ogre Mesh Animation Controller
- animations associated with MeshAnimationController can be inspected

TriMesh
- conversion to CLODMesh and AreaCLODMesh supported
- export of tri mesh with parent transformations and buffer selection supported
- normals can be calculated afresh from the vertices of the mesh
- mesh's can be "smoothed" by connecting common vertices
- mesh triangle index buffer and texture coordinates can be inspected, also can be updated from the triangle pick tool
- simple and i mean very simple trimesh editor

LOD
- DiscreteLODNodes can be added to the scenegraph and distance data can be edited
- TriMeshs can be converted to CLODMesh or AreaCLODMesh
- CLODMesh targets can be inspected

LightState
- lights can be removed, added and edited for LightState renderstates
- pointlights and derivatives are rendered with sphere representation if selected

SpatialTransformerController
- can be added to the spatial
- transformations and key frames can be edited for the controller via the SpatialTransformation editor

Shader Support
- ability to create GLSLShaderObjectsState and apply to spatials
- can load, save and edit shaders
- shader editor has GLSL code completion and formating
- shaders can be compiled and errors reported
- can create and edit/update all jme supported uniforms
- shader snippets including : Basic Texture Shader, Diffuse Lighting Fragment Shader, Basic Texture with Diffuse Lighting Fragment Shader, Diffuse and Specular Lighting Vertex Shader, Diffuse Lighting Vertex Shader, GreyScale Shader, Inversion Shader, Ambient Occlusion Shader, Convolution Kernel Filter Fragment Shader, Mean Blur Shader, Texture Combined with Alpha Shader, Normal Map Diffuse Shader, Normal Map With Specular Hilights Shader, Pastel Shader, Sepia Shader

SkyBox
- skyboxes can be created and edited

Lensflare
- lens flares can be created

Billboard
- Billboards can be created

Arrows and Axis Rods
- Arrows and Axis Rods can be created

Topic Help
- topic based help dialog for SceneWorker and jme
- topics include examples, links and theorey

Blend Calculator
- simple tool to work out blend factors

Terrain Creation
- terrain pages can be created from height maps
- height maps can be defined as HillHeight, FaultFractal, MidPoint or ImageBased
- terrain data such as step scale etc can be defined at creation

Textures
- textures can be loaded into texture states
- textures can be loaded into texture units via the texture unit editor
- TextureRenderer can be created with screen dimensions if preferred and assigned to a texture state
- TextureRenderer's scene graph can be inspected and edited the same as a jme spatial/node
- TextureRenderer's camera can be modified or locked into the display systems camera
- TextureRenderer's background can be edited
- TerrainPages can have procedural textures generated
- Textures can be generated from a scripted java 2d interface

PassNode
- can be added to the scene graph

PassNodeState
- can be added to PassNodes
- renderstates can be added to PassNodes

Pass Manager
- PassManager's passes can be inspected
- passes can be added to the pass manager

Pass
- spatials can be added to a pass
- pass spatial scene graph can be explored and edited the same as a jme spatial/node
- renderstates can be added to a pass
- full screen quad can be created for a pass

KeyBindingManager
- ability to inspect commands and associated keys of KeyBindingManager

Used API's:

  • jME2

  • jme physics

  • Scene Monitor

  • BeanShell

  • MigLayout



Active Members:






Name

Role

Status
ncomp

Project Leader

active
nymon

Scene Monitor Project Leader

active



Latest Threads

http://www.jmonkeyengine.com/jmeforum/index.php?topic=9330.0



Noel, you have done an excellent job on this! I really enjoyed the video tutorials.

d0minicB said:

I amazed you havnt had more posts. This looks really nice.
That is a funny assumption of number of posts equals level of skill ^^ Make it a habit to 'go deeper' if you're curious whether or not someone is as 'solid' as they seem. A google search on a nick, name or e-mail can usually get you a long way ;)

Sorry for sidetrack, back to topic! ncomp, are you still recruiting for this project? If so, I'm sure we could help you out a bit with another project spotlight and some tweeting.

i am always looking for help  :smiley:

currently for the next version i've revamped all object modifier controls and camera system to be more in line with traditional 3d editors, ie transformation represented by arrows, orbit about object etc…

i've also implemented a texture from java 2d, ie you can script a java 2d interface to build a texture and save this script so you build textures independent of the actual screen size (i.e. graphics.fillRect(0, 0, width, height) will give a filled texture no matter what screen size the user selects)…

i'm in the middle of implementing a rudimentary texture painter…

mainly want to get this going with splatting…

also adding a number of wizards to the shader editor…

currently i have vertex diffuse lighting, vertex diffuse + specular lighting, fragment diffuse lighting, fragment diffuse + specular lighting, texturing, median blur, convolution kernel filter, sepia, grayscale, colour operations etc…

you can now build a simple bloom using scene worker's pass manager and shader editor, no coding required  :slight_smile:

on the todo list is mapspinner terrain and gbui ui system…

plus a shed load of help files and tutorials…

i'm planning on releasing version 1.1 alpha 2 at the start of september…



if you have a feature that you would like to see in a scene editor for jme then just pm me…

this tool is being built for the community, i'm adding things to it that i hope will make it easier for people to work with jme…

i have no specific project in mind when i'm developing this so there is no agenda in terms of the direction of the project…

i just add things as i think of them…

can u  start this from within your own code, I think scene Monitor was like that, if so how? and if so when u make charges with this how is it saved…or whatever…yes this is the first time I'll be checking it out

yeah scene worker can be plugged into code the same as scene monitor…

NOTE : that there are two types of “plugging” in you can do…



1 is the standard scene monitor dialog and scene worker editors and inspection ie









2 is object editors, updaters and renderers ie







the first one gives you all the aspects of scene monitor plus all the editors and functionality of scene worker’s menus…

the second one allows you to use tools on objects in the scene itself such as transformation editing, alignment, spacing etc…



to plug 1 into source all you have to do is in your init method add the following



// set up all extensions for scene worker
SceneWorker.inst().initialiseSceneWorkerAndMonitor();

// add whichever of the three you want to inspect/edit
SceneMonitor.getMonitor().registerNode(rootNode, "root");
SceneMonitor.getMonitor().registerNode(pManager, "Pass Manager");
SceneMonitor.getMonitor().registerNode(KeyBindingManager.getKeyBindingManager(), "Key Binding Manager");



and in your update method add this....


SceneMonitor.getMonitor().updateViewer(tpf);



and in the render method add


SceneMonitor.getMonitor().renderViewer(display.getRenderer());



to get 2 working you need to implement an interface for the application scene handler to work with your code...
it's pretty straight forward but it's easier to look at the code...
an example of it is in com.sceneworker.app.SceneWorkerAppMain

scene worker saves everything in jme format....
but it's up to you to actually save it  :)
just select what node/spatial you want saved, right click and select save from the menu...

it's probably best to work off the source code as it's still in alpha mode so i've fixed a few things here and there....
any questions please don't hesitate to pm me...
i know the instructions for this are very poor but it's on my list of things to do...

k thanks I'll get it from svn soon and check it out :slight_smile:

ncomp said:

you can now build a simple bloom using scene worker's pass manager and shader editor, no coding required  :)
That is amazing. I am very glad you make an effort to make it this accessible. My first tests will have wait however until my hectic first term has come to an end and...
ncomp wrote:
on the todo list is mapspinner terrain and gbui ui system...
plus a shed load of help files and tutorials...
... this is in the bag ;D

I'm trying to check this out, but svn repo is more than s bit confusing…to me anyways XD can u outline what I need to get :-o :?, it'll save me allot of time

This may help you out…

http://code.google.com/p/scenemonitor/wiki/CheckingOutAndCompilingSceneWorker



I agree its a bit confusing, we have a few different projects/components in there. You can blame me.

thanks nymon appreciated :slight_smile:

version 1.1 a2 of scene worker up…

a new blog is here (thanks sbook)



http://jmonkeyengine.com/blog/sceneworker/



hopefully i'll start adding some much needed docs to this blog as well…

please feel free to let me know if there is any feature you'd like to see in scene worker or if you are having problems/issues with how it's working…

as always looking for help…especially if someone is looking to write terrain editing or texture painting code  :slight_smile:

thanks…

huurrah! :slight_smile: dunno if Skye told you already, but we were planning to ask you any time now anyways :wink: Nice to see the incentive come from the other side around though.



This blog, is it intended just for you and Scene Worker, or would nymon maybe be interested in posting about Scene Monitor here as well?



Also, would you mind if I set up your account with a forum integration? It makes your blogposts automatically posted by you in this forum as well, so that users can discuss each blogpost individually and also remain on the forum instead of the blog becoming an annoying alternative for discussion. In this case I will of course turn off comments for your blog.

erlend_sh said:

huurrah! :) dunno if Skye told you already, but we were planning to ask you any time now anyways ;) Nice to see the incentive come from the other side around though.


Totally off-topic, but I think you mean initiative ;)
sbook said:

erlend_sh said:

huurrah! :) dunno if Skye told you already, but we were planning to ask you any time now anyways ;) Nice to see the incentive come from the other side around though.


Totally off-topic, but I think you mean initiative ;)
right ;D
erlend_sh said:

This blog, is it intended just for you and Scene Worker, or would nymon maybe be interested in posting about Scene Monitor here as well?


i'd wouldn't mind at all for SceneMonitor updates to be posted although nymon seems to be pretty busy these days....


Also, would you mind if I set up your account with a forum integration? It makes your blogposts automatically posted by you in this forum as well, so that users can discuss each blogpost individually and also remain on the forum instead of the blog becoming an annoying alternative for discussion. In this case I will of course turn off comments for your blog.


no problem, fire away....
thanks again.....

This sounds like a very interesting project! I must say though that im quite new to jme so bare with me if i ask some stupid questions :). I have been looking through the SceneWorker documents, and have got SceneWorker and SceneMonotor up and running beautifully. Right now it only takes 3 lines of code to get everything working (very nice :)), will i be able to see the code that SceneWorker generates?



I'm making a game with jme and i therefore will need to manipulate objects imported by SceneWorker (chacters, builings ect.). How do i go about doing that? How will i select object imported by SceneWorker?



Fumble

it's funny that you should mention this because i'm in the process of adding a code export of your scene to scene worker…

i.e. it will generate a source code representation of your scene…

i currently only have nodes and spatials exporting so it may be a while before this is fully functional…

however for the time being i would suggest you work with exporting objects in the jme format…



to modify objects in the scene you can just use the scene monitor inspector or else set up your app to use scene worker tools…

there's a small bit more to this than just getting the monitor dialog up but i'm planning on writing a tutorial to do this as soon as possible…

One question, where can I find the code for the translation and rotation?

I would like to use the code and the model, if you allow?

sorry i don't think i understand…

what translation and rotation are you referring to?