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

Pages: 1 [2] 3
16
Support / Re: Some questions about KeyMapper
« on: August 02, 2007, 11:05:50 am »
Thanks for the suggestion, I already have this following but no workie as JApplet under linux but fine in Windows.

Code: [Select]
        //
        // Input devices.
        //
        theUI.componentOwner = this;
        theUI.keyMapper      = new KeyMapper(theUI.componentOwner);


        //
        // Set focus.
        //
        setFocusable(true);
        requestFocus();
        requestFocusInWindow();

wounder if it may be to do with this:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6448462

17
Support / Re: Some questions about KeyMapper
« on: August 02, 2007, 10:56:08 am »
I think it's because I have switched to JApplet.  Works fine as Applet.

18
Support / Re: Some questions about KeyMapper
« on: August 02, 2007, 10:28:09 am »
no its very idle.  But i think its something silly i've done because after checking an older version i see that it worked on linux.  Just weird that it would work on one platform and not another.  Joys of java :D

Thanks for the quick response.

S.

19
Support / Re: Some questions about KeyMapper
« on: August 02, 2007, 09:23:08 am »
Hi,

I've just noticed that the Keymapper doesn't seem to work in my applet under linux/firefox.  It works fine under windows/firefox.

Any advise?

Thanks.

S.

20
Support / Re: Using project3D2D & reproject2D3D
« on: July 18, 2007, 10:14:10 am »
thanks for your help! will give it a try.

21
Support / Re: Using project3D2D & reproject2D3D
« on: July 18, 2007, 09:10:28 am »
Odd in which way? The coordinates are in camera space, not in world space. Maybe this causes the confusion? Anyway, i should document this better...

odd as in the X and Y are in the 10000's in world space and reproject2D3D returns x=51 and y=27.


When you say camera space, does that mean distance from the cameras origin?  Would I just need to add the cameras position to that then to get the world space?

Thanks so much.

S.

22
Support / Using project3D2D & reproject2D3D
« on: July 18, 2007, 12:32:13 am »
Hi,

I'm trying to draw a line that is 25 pixels away based on a position in my 3D scene but reporject2D3D seems to be not working for me.

Code: [Select]
vertex1 = new SimpleVector(centerX, topY, minZ);

// Get the point in 3D space and convert to 2D screen space.
point1  = Interact2D.project3D2D(theWorld.getCamera(), fb, vertex1);

if(point1 != null)                   
{
   // Add 25 to the screen X and convert back to 3D world space.
   vertex2 = Interact2D.reproject2D3D(theWorld.getCamera(), fb, (int)point1.x+25,  (int)point1.y, minZ);

vertex2 gives me back odd results.
 
Am I using this right?

Thanks for all the help thus far.

S.

23
Support / Re: poly clipping outside box.
« on: July 18, 2007, 12:14:11 am »
I was trying to make a floating scale/grid box around the surface of my scene.  The grid would start at the full view and have a variable depth.  As you moved it around the scene only the objects or parts of the objects that fell within the boxed scale would be rendered.  I would always have a reference point to the XYZ scale this way.  It wasn't absolutely necessary for me to do this - I just thought it would be a cool useful effect.   If anyone one has ideas I'm all ears :-)  Thanks for the input.

S.

24
Support / poly clipping outside box.
« on: July 02, 2007, 06:25:03 am »
Hi, is there a way that I can clip the world outside a defined box?  That is, I want to define a box around my scene and only see the poly's that are contained inside the box no matter where I place the camera.

Thanks for any suggestions.

S.

25
Support / Re: maxPolysVisible ceiling in software render mode
« on: June 25, 2007, 07:46:41 am »
Yes.  ;D

I suppose that makes sense now.  Thanks Egon

26
Support / Re: maxPolysVisible ceiling in software render mode
« on: June 24, 2007, 08:11:27 pm »
Are you actually instantiating the World after setting the Config-value?

No, should i be?  :-[

Code: [Select]
    public void init()
    {
        getAppletContext().showStatus("Initializing...");


        //
        // Setup applet graphics.
        //
        resize(500,350);

        frameBuffer = new FrameBuffer(500, 350, FrameBuffer.SAMPLINGMODE_NORMAL);
       
       
        //
        // Initialize 3D World.
        //
        theWorld     = new World();                     // Genisis the 3D world.
        texManager   = TextureManager.getInstance();    // Easy access to the Texture Manager.
        theCamera    = theWorld.getCamera();            // Easy access to default Camera.
        dumCamera    = new Camera();                    // Dummy camera.

        //
        // Input devices.
        //
        componentOwner = this;
        keyMapper      = new KeyMapper(componentOwner);
       

        //
        // TODO: Load textures here...
        //
        Texture  tex = new Texture(getCodeBase(), "data/grass.jpg");
        texManager.addTexture("grass", tex);

        //
        // Start creating our world.
        //
        Config.tuneForOutdoor();  // Use the default settings for outdoor scenes.
        Config.maxPolysVisible    = 65000;
        Config.farPlane           = 3000;
        Config.fadeoutLight       = false;
        Config.useMultipleThreads = true;
       
        createLand();

27
Support / Re: maxPolysVisible ceiling in software render mode
« on: June 24, 2007, 05:12:35 pm »
Quote
Are you by any chance doing multiple calls to renderScene() without calling draw() in between?
Nope, but I am calling Draw twice in some situations.  I want a wire frame around my landscape.  Haven't figured out how to wire frame just one object yet.
Could this have anything to do with it?

Thanks.


Code: [Select]
        while(!exit)
        {
            poll();                                 // Poll keybaord.

            frameBuffer.clear(Color.black);         // Clear frame- and z-buffer and make white background.

            //
            // Render the scene. Rotations and movement is done inpendently in the timer thread.
            //
            theWorld.renderScene(frameBuffer);      // Do all the stuff except the scanline conversion


            //
            //  Draw wireframe.
            //
            if(modeLand != 2)
            {
                theWorld.drawWireframe(frameBuffer, Color.gray);        // frame buffer
            }  // if

            theWorld.draw(frameBuffer);             // Do the scanline conversion (into buffer)

            frameBuffer.update();                   // Postprocess the framebuffer (if needed) and copy back- to
                                                    // frontbuffer

            //
            // This is just performance counter code:
            //
            cntFrames++;

            cntPoly += theWorld.getVisibilityList().getSize();

            endTime = System.currentTimeMillis();

            if(endTime-startTime > 1000)
            {
                renderTime = (cntFrames-lastFrames);
                lastFrames = cntFrames;
                startTime  = endTime;
                rendPoly   = cntPoly;
                cntPoly    = 0;
            }  // if
           
            frameBuffer.display(this.getGraphics());  // NOTE: do this instead of below
            myUpdate(this.getGraphics());             // calls  myUpdate()-method, where the rendered frame will
                                                      // be displayed

            Thread.yield();                           // Give other threads the possibility to do something
        }  // while

28
Support / Re: Nonuniform Scaling
« on: June 23, 2007, 10:33:44 pm »
If you ever get the time, this would be a nice feature ^_^

Thanks.

29
Support / Re: maxPolysVisible ceiling in software render mode
« on: June 23, 2007, 08:42:18 pm »
Do you have a test case that shows this behaviour?
Hi Egon,
Thanks for the quick reply.  I don't always get the message. Just intermittently.  I'll try to find out more about what conditions are that generates the notice message and post an example w/ code.

Any comments about what is a reasonable number of polys in a scene?

Cheers,

S.


30
Support / maxPolysVisible ceiling in software render mode
« on: June 23, 2007, 08:23:20 am »
Hi,

When in software render mode is there a ceiling limit to the number of visible polygons?  I've noticed in some examples maxPolysVisible is set to 10000 even 64000.

I get this error message intermittently:
Code: [Select]
WARNING: You've exceeded the configured triangle limit for the visibility list. Consider adjusting Config.maxPolysVisible!

I've set mine to         
Code: [Select]
Config.maxPolysVisible = 20000;
I'm never seeing any more than 3800 polygons in a scene
Code: [Select]
theWorld.getVisibilityList().getSize();
I really only have about 350 five faced cylinders randomly plotted in the world and a couple of planes. So there isn't really that many polygons to display in a scene.  Why would I be getting this error?

Also, what is a reasonable visible polygone count in a scene in software mode?  (I know this is a vague question, but just looking for some sort of guidelines or references).

Thanks for any help :-)

S.


Pages: 1 [2] 3