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

Pages: 1 2 [3] 4
31
Support / Mouse Mapper
« on: May 22, 2007, 07:15:22 am »
Hi
 
   I am trying to implement mouse in JPCTDemo.java type example. I want to move into environment like We do by keyboard.

  Any one could help me out with suggesion or code to implement mouse in such type of example..


With Regards
San14

32
Support / Re: Up Movements
« on: March 20, 2007, 08:29:41 am »
Thanks  EgonOlsen

   
      It worked. I am able to move UP and Down in linear direction...Thanks A Lot.

   
With Regards
San 

33
Support / Re: Mouse Movement
« on: March 19, 2007, 01:40:33 pm »
Hi EgonOlsen


    I have extended MouseMapper to my JPCTDemo.java type example. I could get couse click and mouse draged. But I am not able to zoom in environment and turn in environment.
I get this error.


Software renderer disposed
Software renderer (OpenGL mode) initialized
117-133 -> using splitted buffer access!
Can't find desired videomode (850 x 500 x 32) - searching for alternatives
[ Mon Feb 19 06:17:32 PST 2007 ] - ERROR: Can't find any suitable videomode!
[ Mon Feb 19 06:17:32 PST 2007 ] - ERROR: Can't set videomode - try different settings!
Software renderer disposed
[ Mon Feb 19 06:17:32 PST 2007 ] - WARNING: Couldn't create LWJGL-mouse - initialize the OpenGL renderer first!


Can you suggest me how to use mouse for movement in to JPCTDemo.java type example.

With Regards
San

34
Support / Re: Up Movements
« on: March 19, 2007, 01:36:29 pm »
Hi EgonOlsen
     I am looking for a linear UP movement. I am able to move in Up in linear direction, But as soon as I release Page UP Key the camera take the initial possion.
 

if (up) {
       theWorld.checkCameraCollisionEllipsoid(new SimpleVector(0,1,0), UP_MOVEMENT, -1,8 );
           
        }


How can i get camera position to the place I have moved up through Page UP key.  I tried with camera.getPosition(); But could not make it.


With Regards
San

35
Support / Re: Up Movements
« on: March 17, 2007, 01:26:55 pm »
HI

   Thanks it worked But It gives jurk up words And comes back to same position

Looks overcomplicated...try something like:

Code: [Select]
if (up) {
        theWorld.checkCameraCollisionEllipsoid(new SimpleVector(0,-1,0), UP_MOVEMENT, 1, 8);
}

 I want to go up words till it tuch the roof..How can i controll this movements.?

With Regards
San

36
Support / Up Movements
« on: March 17, 2007, 08:43:00 am »
Hi
    I am trying to move UP and Down In JPCTDemo.java type example. I am using Page UP and Page down key. But as soon as I press the page UP key it moves out of environment in infinity. I have writen code as


 private final static float COLLISION_SPHERE_RADIUS = 6f;
 private final static float PLAYER_HEIGHT = 25f;
 private SimpleVector playerTop = new SimpleVector();
 private final static SimpleVector UP_MOVEMENT =new SimpleVector(COLLISION_SPHERE_RADIUS,PLAYER_HEIGHT/1f,COLLISION_SPHERE_RADIUS);


 playerTop = theWorld.getCamera().getZAxis();
For Page UP
if (up) {
        changed = true;
        camera.moveCamera(new SimpleVector(1, 0, 0), UP_MOVEMENT.z);
        SimpleVector temp = new SimpleVector(playerTop);
        temp.scalarMul( -1f);
        theWorld.checkCameraCollisionEllipsoid(temp, UP_MOVEMENT, 1, 8  );
       
       camera.rotateX(ts);
     
    }


Am i doing the right thing ? can some one suggest me
The Movement should stop as soon as it tuches the sealing of the room. and should move right up and down.

With Regards
San

37
Support / Re: Requirement For 3ds To get Texture
« on: March 16, 2007, 11:26:27 am »
Hi
 
Quote
Why don't you use a texture to blit a crosshair on screen.

Can you suggest me how to do it. I want small cross hair on screen. But i am going to take camera coodinates to what object it points. Will camera coodnates and croshair give same coordinates?


With Regards

San

38
Support / Re: Mouse Movement
« on: March 16, 2007, 09:51:23 am »
Sorry for that. I did it by mistake.(Poll).

Paradroidz-sources

I tried to run but It gives message Texture not found. From where can i find texture.


With Regards
san

39
Support / Re: Requirement For 3ds To get Texture
« on: March 16, 2007, 07:29:11 am »
Hi
Thanks EgonOlsen

I have changed .3ds object and it worked.
But I am not geting weapon in the seen I have changed it with crosshair. I tried with different coordinate  and translate  weapon.translate(0, 3, 5);

I have this pice of error

My question is:-
Does it loads the object and has problem with translte or texture it is looking for. I am not able to resolve the erorror


Loading file 3ds\crosshair1_200207.3DS
File 3ds\crosshair1_200207.3DS loaded...1472 bytes
Processing new material 01 - crosshair!
Processing object from 3DS-file: crosshair1
Object 'crosshair1_jPCT0' created using 44 polygons and 24 vertices.



With Regards
San

40
Support / Mouse Movement
« on: March 16, 2007, 06:41:53 am »
Hi
   I am trying to implement Mouse in JPCTDemo.java type example Plz can any one help me out with suggesions or example.


With Regards
San

41
Support / Re: Requirement For 3ds To get Texture
« on: March 10, 2007, 12:16:50 pm »
HI
    I how can i know what is the name given to texture to .3ds file,  In  JPCTDemo.java type example.
I have one .3ds object with some texture but i dont know what is the name given to its texture. I have to load and give texture when it gets loade in JPCTDemo.java  3ds object is geting loaded but is not taking texture.  Its taking default white color. I am geting errors. 1 for resize the texture  and not geting any texture other then one table in room.

   ??? My que is seeing to error can I find out what is the name given to 3ds objects texture so that i can change the .jpg name to get texture when i load it to environment


Loading Texture...textures\other\numbers.jpg
Loading Texture...textures\other\envmap.jpg
Loading Texture...textures\BEN.JPG
[ Sat Mar 10 04:34:06 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\BENEDETI.JPG
[ Sat Mar 10 04:34:06 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\BL1.jpg
Loading Texture...textures\BL2.jpg
Loading Texture...textures\BR1.jpg
Loading Texture...textures\BR2.jpg
[ Sat Mar 10 04:34:06 PST 2007 ] - WARNING: Unsupported Texture height...resizing to a height of 256 pixels!
Loading Texture...textures\BRICK MU.JPG
[ Sat Mar 10 04:34:06 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\BRICK PA.JPG
[ Sat Mar 10 04:34:07 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\BUBING.JPG
[ Sat Mar 10 04:34:07 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\BW1.jpg
[ Sat Mar 10 04:34:07 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\BW2.jpg
Loading Texture...textures\GR1.jpg
Loading Texture...textures\GRY1.jpg
Loading Texture...textures\MV1.jpg
Loading Texture...textures\PINK.jpg
Loading Texture...textures\RED1.jpg
[ Sat Mar 10 04:34:07 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\RED2.jpg
Loading Texture...textures\ROOM_FLOOR.jpg
Loading Texture...textures\T1.jpg
[ Sat Mar 10 04:34:07 PST 2007 ] - WARNING: Unsupported Texture height...resizing to a height of 256 pixels!
Loading Texture...textures\T2.jpg
[ Sat Mar 10 04:34:07 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\T3.jpg
[ Sat Mar 10 04:34:08 PST 2007 ] - WARNING: Unsupported Texture width...resizing to a width of 256 pixels!
Loading Texture...textures\T4.jpg
Loading Texture...textures\T5.jpg
[ Sat Mar 10 04:34:09 PST 2007 ] - WARNING: Unsupported Texture height...resizing to a height of 256 pixels!
Loading Texture...textures\tv.jpg
Loading file 3ds\jyu00.3ds
File 3ds\jyu00.3ds loaded...4204 bytes
Processing new material DEFAULT!
Processing object from 3DS-file: DEFAULT   
Object 'DEFAULT   _jPCT0' created using 205 polygons and 163 vertices.
Loading file 3ds\scene090.3ds
File 3ds\scene090.3ds loaded...210942 bytes
[ Sat Mar 10 04:34:09 PST 2007 ] - ERROR: Not a valid 3DS file!
Created 0 triangle-strips for object3 in 1 pass(es)
Building octree for 0 triangles!
Octree constructed with 1 nodes / 0 leafs.
Adding Lightsource: 0
Java version is: 1.5.0_06
-> support for BufferedImage
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
105-125 -> using splitted buffer access!




42
Support / GUI which Support JPCT
« on: March 03, 2007, 08:37:35 am »
Hi
   Can some one tell me Which are GUI that support JPCT. ???

With Regards
San

43
Support / Swings with JPCT
« on: February 27, 2007, 06:10:41 am »
:)  I too donít look at two side's...Thanks for your suggestion FingGui. Could you suggest more technologies by which I can create login and admin part and then I can call my JPCTDemo type example on it.


With Regards
San

44
Support / Swings with JPCT
« on: February 24, 2007, 08:35:40 am »
Hi
    I am adding two objects Sphere and cube to same world but at different positions. I have set same camera to both the object.


Am I doing in right way?

In this I have followed your first suggestion


Quote

In your example, one object contains the other because they are both located at (0,0,0). If you want to have it different, translate them to where you want them to be.



Code: [Select]

import java.io.File;

import javax.swing.JButton;

import org.lwjgl.opengl.Display;

import com.threed.jpct.Camera;
import com.threed.jpct.Config;
import com.threed.jpct.FrameBuffer;
import com.threed.jpct.IPostProcessor;
import com.threed.jpct.IRenderer;
import com.threed.jpct.Loader;
import com.threed.jpct.Matrix;
import com.threed.jpct.Object3D;
import com.threed.jpct.Primitives;
import com.threed.jpct.SimpleVector;
import com.threed.jpct.World;
import com.threed.jpct.util.Light;

public class HelloWorld3 {

public static void main(String[] arg0){
     HelloWorld3 goSo=new HelloWorld3();
     goSo.creJPCTFrame();
     
}
public void creJPCTFrame(){

    FrameBuffer buffer=new FrameBuffer(800, 600,200);  
   
    buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
    buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
     
    //Create an world Object  
    World world=new World();
 
     
   //I am createing Object3D with Shpere of size 10,
     Object3D sphere=Primitives.getPyramide(8f,5f);    
   //I am adding Cube to Object3D
     Object3D cube=Primitives.getCylinder(5) ;  
     
   
 
    //Add the object to the world
    world.addObject(sphere);
    world.addObject(cube);
   
  //I have created two Matrix object  
     Matrix m=new Matrix();
     Matrix n=new Matrix();  
   
   /**I am adding translate to Matrix object
    * This will give position to the object in the world(x,y,z)
    *  Or can say Layout to OBject Defines position to object
    */
    m.translate(0.65f,6f,5f);
    sphere.setTranslationMatrix(m);
   
    n.translate(0f,100f,5f);
    cube.setTranslationMatrix(n);
     
  //We need to Build The Object to be viewed
    world.buildAllObjects();
   
     
     //We create Object for Light
    Light light=new Light(world);
     
   
     //We have to set intency to light
    light.setIntensity(255, 50, 50);
   
     
   //We Set the light Position
    light.setPosition(new SimpleVector(0,-200,-50));
   
     
   
   //We set Camera to world;
    Camera cam=world.getCamera();
           
     //Set Camera movement ...
    cam.moveCamera(Camera.CAMERA_MOVEOUT,60);
      cam.moveCamera(Camera.CAMERA_MOVEUP, 130);
       
     
     //This set The positon of camera to Spehere
      cam.lookAt(sphere.getTransformedCenter());    
      cam.lookAt(cube.getTransformedCenter());
         
     while(!Display.isCloseRequested()) {
        buffer.clear();        
        world.renderScene(buffer);
   
        world.draw(buffer);
       
        buffer.update();
        buffer.displayGLOnly();
       
     }
     
       buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
       buffer.dispose();
         
       System.exit(0);
  }

}



I will try with two different world.
Could you suggest how do I add button to world?


With Regards
San[/quote]

45
Support / Swings with JPCT
« on: February 23, 2007, 08:33:01 am »
HI

    I am using world object to add two Object3D with sphere and cube to them But able to see only one of those. Is there any Layout so i can decide position and area  and size of Objects3D in the World object


Code: [Select]

import java.io.File;

import org.lwjgl.opengl.Display;

import com.threed.jpct.Camera;
import com.threed.jpct.Config;
import com.threed.jpct.FrameBuffer;
import com.threed.jpct.IPostProcessor;
import com.threed.jpct.IRenderer;
import com.threed.jpct.Loader;
import com.threed.jpct.Object3D;
import com.threed.jpct.Primitives;
import com.threed.jpct.SimpleVector;
import com.threed.jpct.World;
import com.threed.jpct.util.Light;

public class HelloWorld3 {

public static void main(String[] arg0){
     HelloWorld3 goSo=new HelloWorld3();
     goSo.creJPCTFrame();
     
}
public void creJPCTFrame(){

    FrameBuffer buffer=new FrameBuffer(800, 600,200);  
   
    buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
    buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
   
    //Create an world Object  
    World world=new World();
     
  // I am createing Object3D with Shpere of size 10,
    Object3D sphere=Primitives.getPyramide(15f,5f);
   //I am adding Cube to Object3D
    Object3D cube=Primitives.getCube(5);  
   
 
   //Add the object to the world
    world.addObject(sphere);
    world.addObject(cube);
     
     
  //We need to Build The Object to be viewed
    world.buildAllObjects();
     
    //We create Object for Light
    Light light=new Light(world);
   
    //We have to set intency to light
    light.setIntensity(255, 50, 50);
     
    //We Set the light Position
    light.setPosition(new SimpleVector(0,-200,-50));      
     
   
    //We set Camera to world;
    Camera cam=world.getCamera();
       
      //Set Camera movement ...
    cam.moveCamera(Camera.CAMERA_MOVEOUT,60);
      cam.moveCamera(Camera.CAMERA_MOVEUP, 130);
       
      //This set The positon of camera to Spehere
      cam.lookAt(sphere.getTransformedCenter());
     
      cam.lookAt(cube.getTransformedCenter());
     
     while(!Display.isCloseRequested()) {
        buffer.clear();        
        world.renderScene(buffer);
        world.draw(buffer);
        buffer.update();
        buffer.displayGLOnly();
       
     }
     
       buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
       buffer.dispose();
         
       System.exit(0);
  }

}




 
Quote

                     --------------------------------------------------------
                    |                                                                      |
                    |                                                                      |
                    |                                                                      |
                    |                             Sphere                               |
                    |                                                                      |
                     --------------------------------------------------------
                    |                                                                      |
                    |                                                                      |
                    |                                                                      |
                    |                                                                      |
                    |                                   cube                            |
                    |                                                                      |
                    |                                                                      |
                    |                                                                      |
                     --------------------------------------------------------


I wanted to put sphere and cube in two different Canvas in same world.


With Regards
San

Pages: 1 2 [3] 4