samedi 31 mai 2008

Tablespaces organized and scaled according to their allocated size

Finally, my tablespaces look good. The size of the "container" is proportional to the allocated size of the tablespace:



Also I've included picking feature to be able to select one tablespace and (in the future) get detailed information. However, I note right now that the BoundingBox class that I use for bounding volumes (mainly used for collisions detection and picking) is not very good for cylinders...

vendredi 30 mai 2008

At last, normals work (flat and auto-smooth)

Well how may I say that... the normals present in a .blend file must not be used. They must be recomputed on a per face basis. For auto-smoothing, one must recompute per vertex normals. I've used this doc to do it.

Now I get auto-smoothed models and "faceted" models:

lundi 26 mai 2008

Translation, scaling and rotations for import

Oups I forgot to say that when a model is build in Blender then moved, scaled or rotated, these transformations are not "permanent". To make them permanent, select the object(s) then Apply the transformations using CTRL + A in Object mode.

Normals... the sequel

Well I've fought some days because of strange behaviour regarding normals in Blender and I'm beginning to know what I'm talking about (at last).

To export a Blender model in JME, consider modeling as if the rendering view (JME) is Y axis Up (keypad 7). Thus you won't have to rotate by yourself while exporting (or worse importing).

After that you'll have to deal with the normals as I've done. Your normals can be displayed in Edit mode using the Edit Panel called "Mesh Tools 1" (F9 key):



Note that the panel may be hidden on the right of the window so either scroll or collapse some panels (see in red). To display the vertices normals, you'll have to push down the "Draw VNormals" button.

Then you'll perhaps be able to detect normals inconsistencies as I did: a same point had several different normals.

Also it would be useful not to rely on vertices normals but preferably to recompute the normals for every faces. Thus you get a "solid" looking object but at least you don't get annoying effects when moving your objects while lights are activated.

Finally, you may want to flip the normal when in Object mode, a face seems to disappear.

mardi 20 mai 2008

Next steps: material and UV-mapping!

The next steps in my Java Blender file reader/parser: interpret material data and particularly UV-mapping :) How fun this will be, I've no idea ^_^;

Blender and normals argh!!

Being relatively a newbie to Blender, I fought to render properly my tablespace object during days until today! I've found that some normals of the faces of the fan are fliped thus producing a very bad render!

After fliping them back to normal (W key in Edit Mode), the rendering is now good; at least not more "annoying light effect" :)

samedi 17 mai 2008

First JME contribution; the DevelopmentState

Screen shot:

A JME forum thread can be consulted here.

Rotation and normals weird behaviour

As I'm struggling with JME 2.0, I encountered a strange issue, while applying a continual rotation on my object, I can see different light applications which produce weird effects. Displaying the normals (thanks to the DebugGameState), it appears that the rotation is not applied to them :(

Rotation 1:


Rotation 2 (the rendering is quite different!):


Rotation 1 and normals:


Rotation 2 and normals:

Development state

As it is really hard to distinguish something in the default black world of JME, I'm developping a DevlopmentState inspired by Blender "3D view" and DebugGameState:


But as you can see, it seems my Lines are subject to light. Now looking in the Spatial class, I've found quite easily (thanks to the documentation and the simplicity brought by Java 5 Enums) that I should have set the LightCombineMode of my Lines. Setting it to Off solved my problem:

mercredi 14 mai 2008

Multiple mesh to build an object... or a Node

Now, the BlenderReader class can interpret Blender parent/children hierarchy and implements it as Node/Geometry for JME. :)

mardi 13 mai 2008

Blender to JME 2.0 - very first rendering

My tablespace now renders:

JME 2.0 - pre alpha

JME version 2.0 is currently under development, more information: here

After having downloaded Subversion and Maven 2, a quick installation of the thirdparty libraries (see: ./lib/mvn-lib-install); a simple mvn install run successfully!

Just one very small mistake: the version in the pom.xml file should be set to "2.0-SNAPSHOT".

And the tests run with success, well done!

Now I'm waiting for the wiki to have more information on this release ;o)

vendredi 2 mai 2008

Lamp, Camera and Object data blocks

Each Lamp and Camera is linked to an Object through there blockAddress. This address can also be found in the correponding Object in the data property.

Now, I can import lights into JME!!!

Next: meshes!