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

Topics - ErDetEnAnd?

#1
Support / Hardware examination
March 30, 2010, 05:58:31 PM
A change of OpenGL video settings might cause the screen image to go blank, since the hardware doesn't support the new settings.
Is it somehow possible to look into the VRAM pixels of the rendered image, and this way determine however the current video mode is supported or not?

- Ducky.
#2
Support / Applet how?
February 25, 2010, 04:24:46 PM
Hi.

How is an JPCT applet using LWJGL correct painted without using a render loop?
I cannot construct an applet that renders on mouse event, and dont flicker when paint(g) is called (e.g. when another window is dragged on top of it, and applet area is revealed).

Please help.
#3
Support / Drawing a line on the AWTGLCanvas
April 16, 2009, 10:24:56 AM
Hello again!

How is it possible to draw a simple line using the AWTGLRenderer and its buffer capabilities?

A feasible approach is to draw the line using the canvas' graphics, after signaled to lwjgl that the framebuffer content can be displayed. This approach flickers since the line is not drawn before displayed, so how can I use simple gl draw operations with buffered AWTGLRenderer?
#4
Support / Init AA when not supported
January 22, 2009, 05:40:52 PM
Hey. I've read that jPCT should fall back to normal sampling if antialiasing initialization fails. This is not the case with the current beta and a Intel onboard 945GM.
#5
Support / Good litterature on matrices is hard to find.
January 19, 2009, 05:09:03 PM
Hello.

Again I'm sitting trying to figure out why the translation/rotation is acting the way it is. Does anyone have any good references.

I'm dragging an object in the scene, by turning mouse x,y coords into world x,z coords (y is constant). Its works fine (except the perspective distortion), but how to I keep translation according to the mouse when its parent is rotated?

newDraggingObject3DPosition.matMul(parent.getRotationMatrix().cloneMatrix());
#6
Support / Wrong polygon z-value
January 12, 2009, 08:32:39 PM
Hello.

I've constructed one 3DS as depicted below. If made transparent (like in the picture) I get the wrong polygon on top. The model consists of 4 walls and a floor (no planes).



Did I make something wrong in the 3DS, or is this a render issue?
#7
Support / Applet flickering with LWJGL
January 08, 2009, 10:51:42 PM
Hello again!

I'm trying to turn my application into an applet. In the appletviewer software and  hardware render (AWTGLCanvas) works fine. Same for software render when applet is loaded within a browser. The problem arises when using the AWTGLCanvas render inside the browser. What I get is a rendered image every second time, else it's a "near white" color - which is not the background from the rendered image.

The render code only runs on user/event input, thus it has no active render thread. Now, the render problem does not show here, but only on applet repaint eg when another window is dragged on top of the browser or the browser window is dragged from outside the screen and towards the screen center.

My applet painting methods look like this (like i've read http://www.jpct.net/forum2/index.php/topic,202.0.html):

    public void paint(Graphics g) {
        super.paint(g);
        if (worldFrame!=null)
            worldFrame.paint(g);
    }

    public void update(Graphics g) {
        paint(g);
    }


Where the worldframe is a JPanel which is the canvas is added to. The painting is done like this:

        if (buffer.usesRenderer(IRenderer.RENDERER_OPENGL))
            if (cGLScene!=null) {
                buffer.displayGLOnly();
                cGLScene.repaint();
            }


Does anyone have any idea?
#8
Support / Darker texture with sw renderer
January 04, 2009, 09:53:53 PM
Hello.

I'm experiencing darker textures when using the software render, like the guy here:

http://www.jpct.net/forum2/index.php/topic,1016.0.html

I've been trying using the suggested TRANSPARENCY_MODE_ADD, but cant control it.

My textures should be light yellow (like with gl render), but with sw rendering they're dark yellow. I'm using white as additional color to overrule the scene light.

Do you have any ideas?
#9
Support / Objects selectable only on visible part
January 03, 2009, 12:02:34 PM
Hello again.

Selection works on polygons, so if a selectable object carries a (partial) transparent texture, it would also be selected when clicked on the invisible part. Is there some kind of solution for this?

Regards.
#10
Support / Texture not using UV map in software mode
December 30, 2008, 06:04:26 PM
If the texture fits a 2^x size, say 1024x1024, it is not scaled according to the UV map - this behaviour only for the software render. If it doesn't fit a 2^x size it is scaled and UV assigned correctly.

I've only tried this for textures larger than the object its assigned to.
#11
Support / Rotation pivot
December 29, 2008, 04:19:39 PM
A billboard object3d should rotate around its center rather than its corner when transformed in the world. I'd guess setRotationPivot is the answer. Nomatter what I give this method the object is still rotation around its corner. Build is called before setting the pivot. What is wrong?
#12
Support / How is the alpha-value information used?
December 28, 2008, 02:07:22 PM
Take a look at the left texture below. The gray background is not this texture, but another texture on another object behind it.



The "a" has an outline which is painted using antialiasing (which is shown on the right image, which has no alpha values).

It seems to me that the alpha-channel is used, but not the values. Is this supported?

Edit: Using render with 4xAA
#13
Support / Changing render at runtime
December 25, 2008, 12:17:16 PM
How is this done?

I want to use the opengl renderer, but if acquiring of the opengl render fails I should use the software renderer (see code).

If once used opengl, and then requiring to initialize the render again and fails, then the software renderer is not probably initialized. What do I miss? This reinitialization works fine on software renderer only.

try {
    // Set up open gl
    buffer = new FrameBuffer(width, height, glOversampling);
    buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
    cGLScene = (AWTGLCanvas)buffer.enableGLCanvasRenderer();
} catch (Exception _) {
    // Use software-renderer
    buffer = new FrameBuffer(width, height, swOversampling);
    buffer.enableRenderer(IRenderer.RENDERER_SOFTWARE);
}
#14
Support / Transparent blitting
December 22, 2008, 04:18:33 PM
Hello!

How do I blit a dark picture (r/g/b<0x0F) using transparency?

When blitting images the image must fit into a texture, even though the extra space in unwanted. The image cannot be scaled, thus the extra space is made transparent using an alpha channel (see image).



Using a dark(er) image as destination, and a transparent border as source to fit into a texture, blitting by

public void blit(Texture src,
                 int srcX,
                 int srcY,
                 int destX,
                 int destY,
                 int width,
                 int height,
                 boolean transparent)

doesn't make use of the alpha values. So how do I fit a darker image into a texture, showing only the image?
#15
Support / Blit with z-value.
December 18, 2008, 09:13:03 AM
Hello again guys.

I need text to appear among the object3ds, and cant find the right way to go.

Can it be achieved by assigning the texture to an object3d, and make the object invisible by using alpha-values in the texture?

Please help.
#16
Support / Get world position of untransformed object.
December 10, 2008, 11:28:34 AM
Hi.

I've imported an object3d an need to translate it to world origo, but how to I get the objects world position when it hasn't been transformed?
#17
Support / Translation on rotation
November 27, 2008, 04:57:52 PM
Put sense into this.

// I read a 3DS file that contains 2 object3ds.
Object3D[] obj = Loader.read(...)

// I have translation and rotation offsets for both object3ds.
obj[0].translate(translation_offset1);
obj[1].translate(translation_offset2);
obj[0].translateMesh();
obj[1].translateMesh();

obj[0].rotateX(rotation_offset1);
obj[1].rotateX(rotation_offset2);
obj[0].rotateMesh();
obj[1].rotateMesh();

Object3D o3d = o3ds[0];
           for (Object3D o: o3ds)
               if (o!=o3d)
                   o3d = Object3D.mergeObjects(o3d, o);

o3d is added to the world etc.

Why is mesh translation/rotation necessary when merging objects?
Without rotation the translation part works, but then I rotate and the obj moves!? Why does it move on rotation?
#18
Support / GLCanvasRender performance and mouse events
September 30, 2008, 09:17:01 PM
Hello.

The following code gives many fps when using the GLCanvasRender:

while (true) {
            matrix.rotateY(0.1f);
            renderScene();
}


But when the rotating is done by using the mouse (drag event), the fps I get is somewhat opposit the mouse speed. To avoid unnecessary rendering drag events are ignored if mouse point equals previous mouse point. Test shows that the mouse speed does not affect the number of events. So why the low fps when using the mouse? Any ideas?
#19
Support / Access canvas in GLCanvasRender from LWJGL
September 28, 2008, 10:06:25 PM
Hello!

I need to paint on the canvas after it has been painted in lwjgl (when the canvas has been displayed and repainted from jpct). Does anyone have any ideas?

- Lwjgl suggests that one overrides the paint/paintGL method, but since the JPCT render gives the canvas this approach is not possible.

Thanks in advance.
#20
Hi.

I have 3 objects. 1 parent and 2 children. The parent should always be in the middle of the screen, and when clicking on a child, the clicked child center should transform to the parent center. The children share the same matrices, thus the children are transformed by same vector.

My approach only works when the objects are neither transformed nor rotated.
I calculate the subvector between the parent and the clicked child, then translates their matrix, but the result is dependant on ealier transformation and rotation. I dont think I have the correct understance of the two.

Where am I wrong?