Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - manumoi

#1
News / Re: Version 1.15 has been released!
October 07, 2007, 08:37:16 PM
just great. Thanks you
#2
News / Re: Version 1.15 has been released!
October 06, 2007, 02:06:44 PM
hello Egon, great work as usual.

I m particularly interested in your new Texture constructor,  would it be possible to add a variant with a Color object (or 3 int for rgb values) to create a texture with the given color instead of always black?

Texture(int width, int height, java.awt.Color color)

#3
Support / Re: merging objects and keeping translation
September 17, 2007, 04:02:43 PM
Sorry guys, just found the solution in a previous post (i.e. making the translation permanent by confirming it with translateMesh() ).

So no more question   :P
#4
Support / merging objects and keeping translation
September 17, 2007, 03:56:30 PM
Hello everybody, got a little problem

I m doing more or less a tile based level editor. Each tile is refering to an Object3D... For some kind of tile I will need to do the combination of two Objects. I will naturally merge them. But it seems that mergeObjects doesn t keep a previous translation aimed at positioning the first object depending on the second.
For instance I have two objects : a square and a tree, and i want to obtain one final object (the tree in the middle of the square). Even if i use different combinations of setOrigin setCenter or translate, after merging, the tree remains at one corner of my square.

Unfortunately i have to have only one Object3D as a result so i can t use a child-parent relation between 2 Object3D.
So my questions are :
Do i correctly understand that merge object will not keep previous translation ?  (which i can understand)
- If yes, is there a way to do something similar and to obtain only one final object,  ???
- if no, what is the exact process behind merge object in order that I understand where my problem is.  ???

Thanks
#5
hello, changed to the Beta 1.15 and now everything is ok... I feel ashamed... the previous thread talking about this problem was launched more than 1 year ago... So i m surprised but it seems that i was using a "very" old version of JPCT. Anyway it works fine now.

Thanks egon

PS: Melssj, in the previous picture the problem was that the textures didn t appear on the object on the bottom right side of the picture
#6
News / Re: Beta of 1.15 released!
July 24, 2007, 06:55:22 AM
Congratulation for the shadow texturing Egon... that s definetely a huge improvement (and huge work i suspect).

Also happy to see that Rolz is still in the field.
#7
hello

Got a strange thing. and i don t know if it is a bug of the TextureManager or not

I have an app with 2 different world objects (rendered using the same loop in two different canvas using AWTGLRenderer). One is supposed to show the selected object while the other one is displaying the whole map.

I don t know why but i am unable to have the same texture (registered in the TextureManager displayed in both world).

When texture are different there is no problem at all... I have spent hours checking my code and it seems to be correct, the good texture indice is called in order to paint a polygon...
In fact the first world where a texture will be called to be displayed will not be a problem. The problem will occur in the second one (i tested the order and the problem can be inversed)

So 3 questions.

Did anyone already do something similar that worked?

Do you have any idea what may cause this problem?

Here is a screenshot




here is the code i use to register texture in the texture manager

protected void addTexture(String textureName, String textureFile){
if (!TextureManager.getInstance().containsTexture(textureName)){
    Texture tmpTexture = new Texture(Constants.TEXTURE_PATH+textureFile);
    TextureManager.getInstance().addTexture(textureName, tmpTexture);
}
    }

    protected void addTexture(String textureFile){
addTexture(textureFile,textureFile);
    }



Here is my general loop:

public void startLoop(){
while (true){
    [...]
            myPanel3D.updateLoop();   // panel with the first JPCT world
    menuTabbedPanel.getMyPreviewPanel().updateLoop(); // panel with the second JPCT world
            // both these panels have a JPCTPanel super class that implements the updateLoop method
    [...]
            try{
Thread.sleep(10);
    }
    catch (InterruptedException ie){
System.err.println("startLoop");
ie.printStackTrace();
    }
    Thread.yield();
}
    }


and here is the update loop method


    public void updateLoop(){
buffer.clear();
updateCamera();
theWorld.renderScene(buffer);
theWorld.draw(buffer);
buffer.update();
synchronized(evt3DList){
    this.processEvt3DList();
}
synchronized(draggedCoordinateList){
    this.processDraggedCoordinate();
}
buffer.display(null);
myCanvas.repaint();
    }



So any idea????

thanks
#8
Support / Re: two small questions about textures
July 11, 2007, 11:38:04 PM
great egon, works perfectly. Thanks a lot
#9
Support / Re: two small questions about textures
July 11, 2007, 10:55:16 PM
hehe ok no problem... so i will make my grid in white ;)
#10
Support / Re: two small questions about textures
July 11, 2007, 10:34:50 PM
Sorry Egon, i didn t read correctly your answer but I wanted to replace, not to add. As Melssj said (and also because it would simplify my life ;)), i think it would be a nice option.

By the way, good trick melssj... But i think it will not work for my own case. I am making a tile-based map editor for an application... So for each tile, I will save the texture name... When loading in the app, the grid should not appear so if i modify the texture itself, i will have some kind of black grid... Maybe i can use pairs of textures (one with extruded borders for the editor and the full one for rendering into my application) but i don t think it s a beautiful solution... Anyway, thanks all for these answers.
#11
Support / Re: two small questions about textures
July 11, 2007, 09:40:03 PM
hello Egon, thanks for the quick answer...
I m a little bit surprised by the first answer given the fact that s what i have done first.

Here is my code

  public Object3D[][] generateSplittedGroundMap(){
Object3D [][] splittedMap = new Object3D[zSize][xSize];
for (int i =0; i<zSize; i++){
    for (int j = 0; j<xSize; j++){
MapElement me = mapData[i][j];
if (me.getGround()!=null){
    splittedMap[i][j] =elementFactory.getObject(me.getGround());
    TextureInfo ti = new TextureInfo(texMan.getTextureID("ground"));
    ti.add(texMan.getTextureID("blueGrid"),TextureInfo.MODE_ADD);
    splittedMap[i][j].setTexture(ti);
}
    }
}
return splitedMap;
    }


and here are ground texture

http://www.iro.umontreal.ca/~blanchae/images/screenshots/woodpanel5.gif

blueGrid texture,

http://www.iro.umontreal.ca/~blanchae/images/screenshots/blue_cell.GIF

and the final result

http://www.iro.umontreal.ca/~blanchae/images/screenshots/final.JPG

As you can see, the blue border appears to be violet.
Am I missing something? (i am using  AWTGLRenderer)


#12
Support / Re: Skeletal API
July 11, 2007, 08:18:46 PM
Great,

Thanks for the hard work cyberkilla ;)
#13
Support / two small questions about textures
July 11, 2007, 07:42:15 PM
Hello,

When using multi texturing, supposing that i have one base texture and an upper texture with transparent parts (a square that i could use for showing the borders of a tile), is it possible to replace only the visible parts of the upper texture? I didn t find any mode for this.

Also, looks dummy to me but is it possible to access texture names or IDs from an Object3D?

Thanks,

Manu
#14
Support / Re: Skeletal API
July 05, 2007, 05:52:28 PM
Don t worry, i think everybody here can understant what it is to be in a rush... As long as you don t forget us, we will be patient. Just that your API seems to be extremely cool :D So many of us would like to try it
Cheers,

Manu

PS : and try to look as good as Raft on the picture ;)
#15
Support / Re: Skeletal API
June 18, 2007, 09:30:35 PM
Finally, is there some example posted somewhere? :P
Now i have some time and would be very interested in benching through this API ...