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 - hytparadisee

Pages: 1 2 3 [4] 5 6
46
any idea what is causing this kind of error when loading md2 models? I get this error on every md2 model i created on my own. And recent incidents cause the program not running at all. This warning just keep printing on new lines forever.

47
Support / Re: Using ITexture Effect
« on: June 11, 2007, 05:58:27 pm »
Sorry my bad ;D, "BufferedImage.TYPE_INT_RGB" also works. And i don't have to reorder the channels.

48
Support / Re: Using ITexture Effect
« on: June 11, 2007, 05:48:32 pm »
Thanks Egon. Problem solved... to some extent

I forgot to mention that by image source come from a BufferedImage. Now i can render the image on the fly.

However there happens to be a very wierd thing.

Quote
jPCT uses ARGB32 (without the alpha being used in software mode)

Therefore i tried all BufferedImage_TYPE_blahblah and finally found only one that works correctly. Surprisingly the only one worked was

Code: [Select]
new BufferedImage(256, 256, BufferedImage.TYPE_INT_BGR);
And idea why it is like that? I can do the painting, but all my colors are in the wrong order, in other words
Code: [Select]
new Color(255, 0, 0) now has to be
Code: [Select]
new Color(0, 0, 255)

49
Support / Re: Using ITexture Effect
« on: June 11, 2007, 04:59:44 pm »
An accompanying shot:


50
Support / Using ITexture Effect
« on: June 11, 2007, 04:54:08 pm »
I am trying to get started with implementing the ITextureEffect interface. I did the following.

Code: [Select]
public void apply(int[] dest, int[] source) {
            Graphics g = image.getGraphics();
            g.setColor(new Color(0, 0, 0));
            g.fillRect(i, i, 100, 100);
            image.flush();
            PixelGrabber grab = new PixelGrabber(image, x, y, w, h, false);
            System.out.println("number: " + i);
            try {
                grab.grabPixels();
            } catch (Exception ex) {
                ex.printStackTrace();
            }
            Object o = grab.getPixels();
            int[] array = (int[] )o;
           
            System.arraycopy(array, 0, dest, 0, Math.min(array.length, dest.length));
        }

First of all, it somehow works and it is much better than replacing texture for each frame (actually much much better, at least the memory usage is about the same, unlike the latter which soars up 7MB per second >:() But I m sure i didn't get it right. What I tried to do, clearly is to fill a black rect on the 0,0 of the texture, but when i run the app, it is green instead. I am afraid i copied my int array wrongly?

51
Support / Re: How to "Render to texture"
« on: June 11, 2007, 02:19:27 pm »
Quote
Rendering to texture means to render the current scene into a texture instead of the framebuffer.

:) No wonder you said:

Quote
do the usual stuff as you would do it when rendering directly to screen, remove it and render the scene one again, but now with the correct camera view

52
Support / Re: How to "Render to texture"
« on: June 11, 2007, 02:12:03 pm »
Sorry today something wrong with my head. ;D Ya how come I mixed them up, render to texture basically means capturing whatever it is in the buffer to an external texture right?

53
Support / Re: How to "Render to texture"
« on: June 11, 2007, 02:00:59 pm »
Now see whether my understanding is correct.

1. Create the object as usual.
2. Apply the initial texture as usual.
3. Before that series of rendering commands, do FrameBuffer.setRenderTarget()
4. Now update the texture (drawing, painting etc)
5. Render

54
Support / Re: How to "Render to texture"
« on: June 11, 2007, 01:40:55 pm »
in other words, FrameBuffer.setRenderTarget() before calling FrameBuffer.update()?

55
Let's say i'm given a rectangular plane, with a known and fixed pair of width and height (e.g. 512 x 512 or 128 x 128 etc.) How could i position my camera so that it fits exactly into my screen. (exactly doesn't mean totally covered, because i know the screen won't be square! and also i do not want to change the fov or frustrum)

I know this question was asked before, but i think at that time this was not possible because the dimension of the object is unknown. Now i have the dimension of my plane defined and fixed, is it a possibility then?

56
Support / Re: How to "Render to texture"
« on: June 11, 2007, 01:03:48 pm »
Thanks, i tried it and get it solved.

New question: what's the best way to update the image rendered to the texture on the fly? Is TextureManager.replaceTexture() alone enough? If that's the case, does it matter to produce so many Texture objects just because we need to update it every frame? I am inexperienced in all kinds of realtime app so i am sort of newbie about whether creating a new object per frame kills the app.

57
Support / How to "Render to texture"
« on: June 11, 2007, 08:22:34 am »
By looking at the "window_blinds" video i think that is something i need to use in the near future. Any hint on how is it done? And is it possible that image created on the fly (e.g. ImageIcon painted by Graphics) can be used as textures to be drown in this manner, and in GLCanvas mode?

58
Support / Re: Skeletal API
« on: June 05, 2007, 04:21:31 am »
Hey Cyber! Send one too me too ;D. Much appreciated.

59
News / Re: Two videos...
« on: June 03, 2007, 07:13:12 pm »
Damn good Egon!

Regarding projective textures, how does the material on the TV screen work? I don't think reflection should look like that or maybe you didn't intend to use reflection at all - I mean what effect is that?

The rest works perfect, any idea what's the fps?

60
News / Re: Version 1.14 has been released!
« on: May 30, 2007, 09:01:29 am »
OMG, this one is fast. I'll take a look soon. 8)

Pages: 1 2 3 [4] 5 6