Recent Posts

Pages: [1] 2 3 ... 10
Support / Re: texture not shown
« Last post by Sethe on 03. January 2017, 07:35:05 AM »
be a great idea to start the environment and loop, not static, and multi-threading available

First I recommend you to read

That link is dead I think.
Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by jomaveger on 06. October 2016, 11:03:30 AM »

I've uploaded the project to Google Drive. It's a maven project and it uses the compiled trunks of the xith and jagatoo projects, which I have in my maven local repository as versions 0.9.8 and 1.1.2, respectively. The link is

Please, tell me if you have any problem downloading it.

Thanks for all.

Kind regards,

Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by lonesomeStranger on 05. October 2016, 07:49:29 PM »
Jomaveger could you please send me some of your code/assets?

First, I've reproduced your bug (wrong  skin name) but after that I've broke the build,  (I dunno how ...) and I'd have attempted to  revive it during the half of the day, but I decided to stop this crappy work.

In short, I'd like to build a fragment of your application to finish debugging.
Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by jomaveger on 04. October 2016, 11:10:11 AM »
Oh, good news! It's great! Thanks a lot! I'll be waiting anxiously  ;D

Kind regards, lonesomeStranger

Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by lonesomeStranger on 03. October 2016, 07:50:34 PM »

Thank you for your patience, jomaveger.

I'll try to fix issue until the weekend.

Looks like the problem is trifling.

I hope it's the single bug :) .
Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by jomaveger on 28. September 2016, 11:43:15 AM »

Are there any news about this issue? Thanks in advance.

Best regards,

Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by jomaveger on 07. September 2016, 10:52:53 AM »
Hi lonesomeStranger:

Thank you very much. Don't worry if you take some time to fix the issue. I understand that you're busy.

I'll follow your advice and stay with the SVN-trunk version of Xith3d.

Thanks a lot again and in advance.

Kind regards,

Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by lonesomeStranger on 06. September 2016, 02:23:49 PM »
Hi jomaveger,

I'm very sorry that can't help you quickly and completely. I'm very busy by now.

Nevertheless I'd suggest you stay with the SVN-trunk version of XIth3d. 'xith3D-0.9.8' is quite ancient and buggy.

I'll try to fix the issue ASAP.

Btw Frankly, looks like I stay alone at the Xith3d. So, I'm not sure that it won't be discontinued.
Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by jomaveger on 05. September 2016, 11:46:32 AM »
Hello again!

I solved the problem returning to Xith3D version v0.9.7-dev-B1831. At least, I can load and see one of the Quake 3 maps that comes with the Xith3D demos. I add some models with their skins to the map and it works fine.

But I'm working on collision and I've found a problem. I don't want to walk through the MD2 characters/models, the same I don't walk through the walls of the map. For every MD2 model, I've created a Collideable and added to the CollideableGroup of the ClusterManager and nothing happens. It's very strange. My code is the following:

Code: [Select]
public class BSPManager extends Window {
    private final static Logger logger = Logger.getLogger(BSPManager.class);
    private PhysicsEngine physEngine;
    private CollisionEngine collEngine;
    private CollisionEnabledClusterManager clusterManager;
    private BranchGroup scene;
    private FirstPersonInputHandler firstPersonHandler;
    private final String levelName;
    private Level level;
    private CollideableGroup levelGroup;
    private Model bspScene;
    private final List<Enemy> enemy;
    private final Random generator;
    public BSPManager(Engine loop, int width, int height, String title, boolean isFullScreen, String level) {
        super(loop, width, height, title, isFullScreen);
        this.levelName = level;
        this.enemy = new ArrayList<>();
        this.generator = new Random();
    public void loadLevelData() {
        LevelReader levelReader = new LevelReader(levelName);
        level = levelReader.buildMap();

    public void buildScene() {
        try {
            if (bspScene.getSpawnTransformsCount() > 0) {
                for (int i = 0; i < bspScene.getSpawnTransformsCount(); i++) {
                    int j = generator.nextInt(level.getEnemyList().size());
                    addEnemyInsideTheMap(level.getEnemyList().get(j), bspScene.getSpawnTransform(i), i);                   
        } catch (Exception ex) {
            logger.error("Exception building the scene!", ex);

    private void setPhysicsAndCollisionEngine() {
        physEngine = new JoodePhysicsEngine();
collEngine = physEngine.getCollisionEngine();

    private void setBSPMap() throws IOException {
        this.bspScene = ModelLoader.getInstance().loadModel(ResourcesLoader.getResourceLocator().getResource(level.getMapName()));
        if (bspScene.getMainGroup() instanceof BSPTreeGroup) {
            BSPTreeGroup bspTG = (BSPTreeGroup) bspScene.getMainGroup();
            this.clusterManager = new CollisionEnabledClusterManager((BSPClusterManager) bspTG.getBSPVisibilityUpdater(), bspScene, collEngine);
            if (this.clusterManager != null) {
                this.levelGroup = this.clusterManager.getCollideableGroup();
            } else {
                this.levelGroup = null;

    private void addEnemyInsideTheMap(Enemy e, Matrix4f matrix, int spawnLocationIndex) throws IOException {
        Model enemyModel = ModelLoader.getInstance().loadModel(ResourcesLoader.getResourceLocator().getResource(e.getModelURL()), e.getModelSkin(), 0.1F);
        enemyModel.addAnimationListener(new EnemyListener(enemyModel));
        Transform t = new Transform();
        if (spawnLocationIndex == 2) {
            t.addTranslation(5.0F, 2.0F, 5.0F);
        t.addChild(new AmbientLight(Colorf.WHITE));

    private void configureBSPMap() {
        if (bspScene.getSpawnTransformsCount() > 0) {

        if (bspScene.getSkyBox() != null) {
        this.scene = new BranchGroup(this.bspScene);
        RenderPass renderPass = environment.addPerspectiveBranch(this.scene);
    private void setFirstPersonHandler() {
        for (Enemy e : enemy) {
            CollideableGroup newTriMesh = collEngine.newTriMeshGroup(e.getModel());
            physEngine.getGFXManager().add(newTriMesh, e.getTg());
        boolean mouseYInverted = false;
        firstPersonHandler = new FirstPersonInputHandler(environment.getView(), canvas, 1.0f, 1.0f, mouseYInverted, 1.0f);

        SimulationWorld world = physEngine.getSimulationEngine().newWorld();
        world.setGravity(0f, -9.81f, 0f);
        firstPersonHandler.setPhysicsObject(new FPIHPhysics(1.5f, 3.0f, new Vector3f(0f, -1.1f, 0f), physEngine, world, true, false));
        if (!collEngine.isEnabled()) {
        firstPersonHandler.getPhysicsObject().setSlidingColliderCheckCallback(physEngine.getCollisionEngine(), this.clusterManager.getCollideableGroup());

Thanks in advance,
Best regards,

Support / Re: Problem with some textures loading Quake 3 bsp levels
« Last post by jomaveger on 04. September 2016, 05:07:49 PM »
Hello lonesomeStranger:

Thank you for the idea. But I've run into new problems.

I've downloaded the SVN-trunk at sourceforge and build it. Now I use that distribution of Xith3D with Maven and I call it xith3D-0.9.8. I had a problem with:


After investigating, I downloaded the SVN-trunk at sourceforge of the jagatoo project and build it. With this new compilation, there is no problem creating a window.

Before I use the new Xith3D and Jagatoo versions, I could load a Quake 3 map and some MD2 models in it with their skins, but now I cannot. Well, there is a map, there are the models but not their skins.

This is my line of code:

Model enemyModel = ModelLoader.getInstance().loadModel(ResourcesLoader.getResourceLocator().getResource(e.getModelURL()), e.getModelSkin(), 0.1F);

where e is of class Enemy with the properties read from an XML file and the fact is "e.getModelSkin()" returns "usmc.pcx" and "e.getModelURL()" returns "models/marine/tris.md2". Well, the exception is:

   at org.jagatoo.util.streams.StreamUtils.buildByteArray(
   at org.jagatoo.util.streams.StreamUtils.buildByteArray(
   at org.jagatoo.loaders.textures.formats.TextureImageFormatLoaderPCX.loadTextureImage(
   at org.jagatoo.loaders.textures.AbstractTextureLoader.tryToLoadFromTextureImageFormatLoaders(
   at org.jagatoo.loaders.textures.AbstractTextureLoader.loadTextureFromStream(
   at org.jagatoo.loaders.textures.AbstractTextureLoader.loadTextureFromURL(
   at org.xith3d.loaders.texture.TextureLoader.loadTexture(
   at org.xith3d.loaders.models.conversion.XithAppearanceFactory.loadTexture(
   at org.xith3d.loaders.models.conversion.XithAppearanceFactory.loadOrGetTexture(
   at org.jagatoo.loaders.models.md2.MD2File.loadTexture(
   at org.jagatoo.loaders.models.md2.MD2File.createSkin(
   at org.jagatoo.loaders.models.md2.MD2File.readSkins(
   at org.jagatoo.loaders.models.md2.MD2File.<init>(
   at org.jagatoo.loaders.models.md2.MD2File.load(
   at org.xith3d.loaders.models.ModelLoader.loadModel(
   at org.xith3d.loaders.models.ModelLoader.loadModel(
   at org.xith3d.loaders.models.ModelLoader.loadModel(
   at org.xith3d.loaders.models.ModelLoader.loadModel(

What happens is that, inside the method org.jagatoo.loaders.models.md2.MD2File.readSkins, jagatoo tries to read the skinName with the instruction:

String skinName = fixPath( in.readCString( 64, true ) );

Well, it returns "ne/usmc.pcx" where it should be "usmc.pcx". I've been debugging jagatoo code but I don't know how to fix it.

Thanks in advance,
best regards,

Pages: [1] 2 3 ... 10