XithConverter fixed and pimped

I have added recent xith jars to the JOODE SVN, which now contains a basic Capsule Shape3D. The Plane was not correctly converted into a Xith shape. And I have used a Rectangle instead of a Cube for the plane. The Ray is now represented by an OpenGL line (pixel-size 1). I have enabled lighting and pimped the shapes to look a lot better. (Don’t worry. It’s not noticeable slower).

Enjoy :).

Marvin

mmh I think capsule is wromg, because, at the ends of capsule there are supposed to be sphere-halves and not streched sphere-halves (because collision with spheres is easier than wit other stuff).

  • how do I configure that shadow stuff? It somehow does no look even worse…

Arne

Edit: Have you made the floor transparent or something? The walls below it seem to shine through…

Now the Geoms have Textures. Looks again much better.

No, the Capsule is not wrong. It’s just, that you should not apply an inhomogenous scale to it. the radius and length of the sphere must be known at creation time (well, at least their proportion). After creation only a scalar scale can be applied (because it is a single geometry now). Where do you see the wrong Capsule?

It is no shadowing (unfortunately) it’s just simple lighting. And it is quite simple to be configured. Just add a DirectionalLight to the main scene BranchGroup (see XithConnection line #60). Then add lighting enabled Materials with correct color settings to the shapes’ Appearances. This can be seen in XithConverter. Oh, and the shapes need to have normals. Just do it like in XithConverter (or simply use it ;)).

Yes, the floor was about 20% transparent. I did that, because before I started with the fixes, the Capsule was falling through the floor. Now the floor is opaque and has a grass texture :).

Marvin

i only applied a rotation, and it was correct before.
The example is shown in the image, I posted in the post above.

The reason, why I’m sure the Xith-representation of the Capsule is, because the rendered geometry of the capsule intersects with the other geometry and doesn’t cause a collision.

nah - I was using XithConverter, but I didn’t add that light source. So no surprise there actually :wink:

Arne

Well, I had a look at the image. And I can’t find a capsule on it (not even a deformed one). But I am quite sure, that the Capsule shape is correct. I guess, I just did something wrong about the link between the JOODE Capsule and the Xith one. I haven’t understood more than 2% of JOODE I suppose. Well, the Capsules in teh collision tests behave correctly. Could you maybe compare the Capsule handling of the test cases and your code? Unfortunately I cannot help you more. I’m pretty sure, taht the bug is on my side, but I don’t know where. But baybe we can track it together.

Marvin

As we found out together, the deformation happended when the radius as != 1.0f. This is fixed now.

Marvin

Ahhh great stuff. Textures were well needed.
Sorry again, I am still beavering away on my end of year report, God I hate writing! My deadline is end of June, though I suspect I will not make it in on time, but expect me back around the beginning of July.

Tom

I have added a XithManager to replace XithBindingManager. The problems with the binding manager was:-

  1. you have to manually alter your rendering loop to upate all the bindings each time step
  2. you have to manually pass the Joode geometry object to the XithConverter to create a binding each time.

With the new Event system all of these steps can be automatically done by listeneing to worldStep events and Geometry events. Thats what XithManager does, so
connecting the graphics engine to the physics is now a one line creation of the XithManager. Its much like how I altered the way the collision system to work.

PS I am still writing this bloody 1st year report so I am not back for full development quite yet. I just need a few 3D experiments to put in so I doing a little dev work at the moment, but nothing heavy yet.

very neat :smiley:

OK. I want to colour my shapes in different ways. I have create a XithGeomAppearance which wrapps a Geom so that a custom appearance can be stored in the user data storage area (with fully typed access). XithConverter now checks whether an appearance has been defined or not before using the defaults. That works nicely, I can make Geoms any colour of the rainbow, and set their textures individually.

However, what I would like to do is colour each box face with a different texture, and possible a different colour as well… how can I do that Xith Lords??

Even if I never tried this, I would guess, you should use a TextureCubeMap.

Marvin