Hello @ll:
For my university project last year I created a WYSIWYG Scene-Editor based on the Particle-Editor provided with the jME. Since my project was finished some months ago I decided to release the source code and documentation for it. It initially was planned as a course with the goal to acquire a certain amount of fundamental practical and theoretical knowledge in the development of contents in virtual reality no matter which game engine one would choose. As a base for the practical part of the course the participant would be guided step-by-step into the implementation of an interactive scene editor in jME. During this guide beginners would also encounter different topics such a game logic, 3D technology, matters of light and shadow etc. in order to combine practise with theory.
Overview of the chapters involved:
1 ) Starting jME in Swing
2 ) Orientation in virtual reality
3 ) Mouse- and Keyboard input
4 ) Structuring a scenegraph
5 ) Adding objects (cube, sphere, .obj files)
6 ) Mousepicking
7 ) Concept and implementation of a gizmo (translation, rotation, scale)
8 ) Manipulation of objects with a gizmo
9 ) Refreshing & changing objectdata in realtime
10) Create lightobjects
11) Specialeffect: shadows
12) Save & Load scenes
13) Extras
Each chapter has its own fully autonomous code and each chapter builds upon its previous chapter. The guide itself is a single PDF-file with text, illustrations, code fragments and covers all chapters. The number of the chapter also determines the number of the sourcecode from the finished chapter. Each chapter starts with a picture giving a hint of what is to be achieved in the current chapter (except c. 4). This way everything is cleanly structured, beginners will not get mixed up or need to do “file hopping” (although this system created spaghetti code…). The sourcecodes were successfully tested on Windows and Linux. So long for the good part…
Now to the bad parts: the step-by-step guide is in German language only (!) and unfortunately I don’t have the time to translate it into English anymore. Still I want to offer this guide to the community, in case some other German speaking people use jME or babelfish translations would be enough to understand. Also the code itself uses English variable names only therefore might be enough to understand while reading through it. While talking about the bad side… on looking back I also think some things could have been implemented in a better way now (e.g. the gizmo is not implemented in a real good way; also an OpenGL GUI would have been much faster than any 2D GUI, though I didn’t use FengGUI because it had some bugs which were disturbing me). There seems to be an additional minor bug when activating shadows (light on object edges). Well, you never learn out, I guess…
Aside from these issues please feel free to hack into the codes and use its guts or part of it for your own purpose without restrictions. I hope it can be a help to others, especially to beginners. The whole application is a mere ~2400 lines of code, so nothing starters would get knocked off.
SceneEditorDemo controls:
W…move forward
S… move backward
A… strafe left
D… strafe right
Space, Q... move up
C, Z... move down
LMB... select objects
RMB... click/hold gizmo to translate/rotate/scale
MMB... 360 degree view
H... activate/deactivate shadow volumes
Using gizmo: select any object and then press the gizmo-button you want
Shadow volumes: activation might take some seconds, DepthPass only
I am not sure if the editor works with the current version of jME, since I used some revision of November or December 2008, using jME 2.0. There shouldn’t be too much errors though. I also packed a single executable Jar-File for Windows users which works out of the box. The size is about ~30mb and is available on rapidshare. The editor also includes a version of Andrew Carter’s “SceneMonitor” which will start at the same time the editor is started (of course I mentioned any 3rd party libraries and sources I used in my project including the specific licenses).
Small note on the side: I didn’t use any code from other World-Editors such as MonkeyWorld3D because at that time my knowledge was simply too low to understand such large projects and its hundreds of classes and therefore built the editor solely from what I’ve learned by the tutorials, sample codes and forum questions.
With that small contribution I hope to give something back and want to thank the community, forum, and people who I don’t even know but have read & learned a lot from their questions as well while digging through the forums.
http://rapidshare.com/files/287709311/Demo.zip.html (~30mb)
http://rapidshare.com/files/287713318/course.zip (~ 3.5mb)
Files in course.zip:
guide.pdf (step-by-step guide in german language)
SceneEditorDemo1-13.java (sourcecodes)
Szene.jme (a prebuilt scene you can load into the editor)
house.obj (a basic house created in blender)
house.mtl
TesselatedBox.obj (a box with additional subdivisions to show proper vertex lighting)