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.


Messages - fardke

Pages: [1]
1
Support / Anti-aliasing
« on: June 27, 2008, 09:07:39 pm »
Hi,

I want to activate antialiasing without using openGL renderer. I draw a line between 2 objects and the link is very aliased (ugly, like stairs).

Is it possible? And how?

Thank you!
 ???

2
Support / Re: Camera fadeout
« on: June 12, 2008, 05:56:37 pm »
Thank you. it works great!

3
Support / Camera fadeout
« on: June 12, 2008, 04:54:08 pm »
Hello everybody,

i have a problem with my camera. When i zoom out until a certain point, i can't see anything on my level. I tried to play with Config.fadeoutLight (false), Config.linearDiv and Config.lightDiscardDistance but it does not work, even when i put big big values.
For example, when i look at my level from the above, when i reach y=-1000 for my camera, this is the point where i am 'blind'.

 ???

thank you for your help

4
Support / translate a 3ds object
« on: June 02, 2008, 10:32:03 pm »
Hello,

I want to do an animation with my object 3ds (i want to see it move vertically until y=-50 while i do the translate()).
Here is the code i use for that :

Code: [Select]
while(selected.getTransformedCenter().y>-50){
System.out.println("x : "+x);
x=Math.sqrt(x);
selected.translate(new SimpleVector(0,-x,0));
try {
        Thread.sleep(500);
} catch (InterruptedException e) {
        // TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("selected y : "+selected.getTransformedCenter().y);
x++;
repaint();
}

The problem is that i only see the object at its last position, i don't see the animation.
When i drag the object with the mouse, it works perfectly (i do the same thing, a translate() then a repaint()) but it doesn't work "manually".


Help me please  ???

5
Support / Re: Texture UV Mapping on a 3ds object with Blender
« on: May 30, 2008, 08:30:02 pm »
It was a mistake, sorry.

 :-[

6
Support / Texture UV Mapping on a 3ds object with Blender
« on: May 30, 2008, 04:53:58 pm »
Hello,
Hello Egon  8),


i made an object 3ds with blender and it generates the uv mapping of the texture. Then i painted the texture with paint to get a jpeg. then, in my jpct class, i load the object with Loader.load3ds() and i do a setTexture() with my jpeg. The problem is that sometimes the texture is correctly applied to the object and sometimes not (like the uv points does not correspond; there is the texture but not correctly applied).


Help me please  ???

7
Support / Re: Problem with getAbsoluteCoordinates()
« on: May 27, 2008, 06:54:45 pm »
Wow thank you very much!
it works great when we removed the getInsets() and setSize() of the JFrame and also when we use it in fullscreen.

thanks again  :D

8
Support / Re: Problem with getAbsoluteCoordinates()
« on: May 27, 2008, 04:42:09 pm »
We have changed our code and we are now doing that to pick an object :

Code: [Select]
SimpleVector rayTemp = Interact2D.reproject2D3D(camera, buffer, e.getX(), e.getY());
int[] tableau = Interact2D.pickPolygon(theWorld.getVisibilityList(), rayTemp);

if(tableau!=null){
selected = theWorld.getObject(Interact2D.getObjectID(tableau));
selected.setTexture("red");
}

But the problem is the same. All the objects are visible and selectable (in the vislist list) but we still have to click a little bit outside the object to select it. it is still not accurate (the same unaccuracy than with getAbsoluteCoordinates()).


i guess we have to wait for egon  ???

9
Support / Re: Problem with getAbsoluteCoordinates()
« on: May 27, 2008, 03:32:42 pm »
The 2x and 4x sampling mode are for the openGL renderer only. We are using the software renderer.

We made bigger objects and it was better but still not accurate. We want to keep small objects because we have a lot of objects in our level.

Help me  ???


Thanks,

10
Support / Problem with getAbsoluteCoordinates()
« on: May 26, 2008, 09:47:54 pm »
Hello,

I have a problem with the following getAbsoluteCoordinates() function (it wat posted on the forum) :

Code: [Select]
public SimpleVector getAbsoluteCoordinate(Camera camera, FrameBuffer buffer, int x, int y, Object3D object) {
SimpleVector rezult = null;
if (camera != null && buffer != null) {
    SimpleVector rayTemp = Interact2D.reproject2D3D(camera, buffer, x, y);
    rayTemp.normalize();

    Matrix orient = camera.getBack();
    float[] dump = orient.getDump();
    SimpleVector ray = new SimpleVector();
    ray.x = dump[0] * rayTemp.x + dump[1] * rayTemp.y + dump[2] * rayTemp.z + dump[3] * 1;
    ray.y = dump[4] * rayTemp.x + dump[5] * rayTemp.y + dump[6] * rayTemp.z + dump[7] * 1;
    ray.z = dump[8] * rayTemp.x + dump[9] * rayTemp.y + dump[10] * rayTemp.z + dump[11] * 1;
    float distance = object.rayIntersectsAABB(camera.getPosition(), ray, true);

    if (distance != Object3D.RAY_MISSES_BOX) {
    //rezult = new SimpleVector(camera.getPosition());
    ray.scalarMul(distance);
    rezult=new SimpleVector(ray);
    //rezult.add(ray);
    }
    else{
    rezult = new SimpleVector(SimpleVector.ORIGIN);
    }
    }
    return rezult;
} // getAbsoluteCoordinate()


I have a level with objects on it and i want to select an object to move it. So, when i click on the level, i call getAbsoluteCoordinates() with each objet in my list (the parameter object in the function) and if it returns something (something different than the origin vector), it means that an object has been found.

The problem is that it is not very accurate (sometimes i even have to click outside the object  :o). The more the camera is far and the more it is not accurate.

I absolutely don't know if it comes from my object that is not at the position i see it or if it comes from the coordinates returned by the function.


Help me please  ???

Thank you very much

Pages: [1]