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

#41
Support / How to Model Humanoids
March 21, 2008, 12:31:24 PM
Could anyone direct me to a good guide (or three) for learning how to model 3D humanoid characters in 3D Studio Max?  I am a pretty good sketch artest, but 3D modeling is a whole 'nother beast.  My initial attempts have been disasterous!  :o
#42
Support / Camera position and orientation
March 15, 2008, 12:45:50 AM
Hello, I have another simple question.  I need to be able to access the camera's position, a look-at point, and a point in the up-direction.  Looking through the classes, it looks like the methods I will need to use are:

getPosition()        // World Position
getDirection()       // look-at *direction*
getYAxis()           // up-direction *normalized*

My theory is that to get a look-at point, I would add getDirection() to getPosition(), and to get a point in the up-direction, I would add getYAxis() to getPosition().  Since I will be using this idea in methods which are not related to graphics, it would be difficult for me to test if this theory is correct, so I thought it would be smart to ask the experts first ;D  Thanks!
#43
Support / Translation Tipoff
March 14, 2008, 10:55:59 PM
Hey, I was wondering if there is a method in Object3D that gets called from a child object when it's parent gets translated.

I want to bind to an object to know when it gets moved.  The way I was thinking of doing this, is to create a class that extends Object3D and registering it as a child to the object in question.  Then, I would just need a way to be tipped of that a translation has taken place, and then figure out what that translation is ( I could use getTranslation() for the later, right? )
#44
Projects / 3D Sound System
March 11, 2008, 02:38:51 AM
-- This slot is reserved for the most recent working releases --

Downloads:

Sound System  Version date:  October 23, 2010
The core SoundSystem library, independent from 3rd-party libraries.  It is stripped down to the bare essentials, and designed to be easily customizable with various sound library and codec plug-ins.  If memory is a concern (such as in an applet) this may be a good option, because it allows you to choose as many or as few plug-ins as you require for your project.  NOTE: The core SoundSystem library without any plug-ins is only capable of playing MIDI files.  Additional plug-ins should be added for more capabilities.  The source code and license are included in the .zip file.

Sound System jPCT  Version date:  October 23, 2010
The jPCT-friendly 3D sound library.  The SoundSystemJPCT class overrides the core SoundSystem libray, and provides a number of methods to make adding 3D sound to any jPCT project easy.  It includes methods for binding Listener to Camera and Sources to Object3Ds, as well as using SimpleVector parameters.  SoundSystemJPCT utilizes the LWJGL binding of OpenAL (with JavaSound as a backup option), and the J-Ogg library for .ogg support.  NOTE: The core SoundSystem library, source code, and all relevant licenses are included in the .zip file.

SoundSystem Utils  Version date:  August 8, 2009
Includes a SoundSystem loader, and an example XML file.


Plug-ins:

JavaSound library plug-in  Version date:  October 23, 2010
Interface to the Java Sound API.  More compatable than OpenAL, but not as high quality and fewer features.  This plug-in utilizes JavaSound's panning and volume control methods to simulate an reasonable-quality 3D sound system.  Known bug: quickPlaying sounds will begin playing them at full volume for a split second, before switching to the correct volume.  This is a bug with the Java Sound API itself, and therefore beyond my control to correct.  An easy workaround is to add 0.02 seconds of silence to the beginning of each sound effect (the free Audacity sound editor works well for this).

LWJGL OpenAL library plug-in  Version date:  August 24, 2010
Interface to the LWJGL binding of OpenAL.  The LWJGL library (http://www.lwjgl.org) is required for this plug-in to work.  This library sounds much better than Java Sound, but is not as compatable.  I recommend using the JavaSound library plug-in as a backup option.  NOTE: Please read the included LWJGL license.

JOAL library plug-in  Version date:  August 29, 2011
Interface to the JOAL binding of OpenAL.  The JOAL library (http://jogamp.org) is required for this plug-in to work.  As mentioned previously, this library sounds much better than Java Sound, but is not as compatable.  I recommend using the JavaSound library plug-in as a backup option.  NOTE: Please read the included JOAL license.

WAV codec plug-in  Version date:  October 23, 2010
Adds support for .wav files.

JOgg codec plug-in  Version date:  August 24, 2010
Adds support for .ogg files using the J-Ogg library.  This codec is less compatible than the JOrbis codec, but the license is less restrictive.  Sometimes running incompatable .ogg files through a converter will make them compatable.  NOTE: Please read the included JOgg license.

JOrbis codec plug-in  Version date:  November 23, 2010
Adds support for .ogg files using the JOrbis library.  More compatible than the JOgg codec, but reads data more slowly (it may not be possible to stream more than one file simultaneously when using this codec).  This plug-in is licensed by the LGPL.  NOTE: Please read the included LGPL document.

IBXM codec plug-in  Version date:  August 24, 2010
Adds support for Protracker, Fast Tracker 2, and Scream Tracker 3 (.s2m, .mod, and .xm) files using the IBXM library.  File sizes for these formats tend to be quite small, so this may be a good option for background music.  This plug-in is based on or using the IBXM library, which is bound by the BSD License.  NOTE: Please read the included license document.

JSpeex codec plug-in  Version date:  August 24, 2010
Adds support for .ogg or .wav files encoded with Speex (a compression optimized for human voice).  See http://www.speex.org/ for more information.


Documentation:

JavaDoc  Version date:  October 23, 2010
Also includes the JavaDocs for SoundSystemJPCT and all library and codec plug-ins, and the utils library.

3D Sound with SoundSystem  PDF (download the example programs)
A tutorial-style guide to using the core SoundSystem library (last updated: April 14, 2009).

Guide to SoundSystemJPCT  PDF (download the example programs)
Another tutorial-style guide to using SoundSystemJPCT. (last updated: April 14, 2009).


Demos:
(last updated: August 21, 2010)

Sound Effects Player  (download the Source Code)
Demonstrates library switching on the fly, streaming background music, playing MIDI, and playing multiple sources simultaneously.

Bullet / Target Collision  (download the Source Code)
Demonstrates the LibraryJavaSound plug-in.

Holy Bouncing Helicopter Balls!  (download the Source Code)
Currently uses the SoundSystem core -- I'm currently working on a version for SoundSystemJPCT, which will be much simpler.  Demonstrates moving through a world with multiple sources.


What's new?

- Fixed JOAL package name from the old net.java.games.joal to the new com.jogamp.openal
- Updated CodecWav link to current version
- Improved LibraryJavaSound performance slightly in non-Sun Java versions
- Handled rare pan-control exception
- Fixed fadeOutIn bug which caused fade-in effect to be silent
- Fixed a bug where certain types of .ogg files created in versions of Audacity were cut off just before the end of the sample
#45
Support / How to Hardware Mode
February 24, 2008, 09:04:22 PM
I am having a little trouble getting my applet to run in SAMPLINGMODE_HARDWARE_ONLY.
The Sun Java Console shows:

Java version is: 1.6.0_03
-> support for BufferedImage
Version helper for 1.2+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
java.lang.NoClassDefFoundError: org/lwjgl/opengl/Display
at com.threed.jpct.GLHelper.findMode(Unknown Source)
at com.threed.jpct.GLHelper.init(Unknown Source)
at com.threed.jpct.GLRenderer.init(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at jPCTGears.init(jPCTGears.java:48)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Here is the code in question:

    // Initialize all components of the applet
    @Override
    public void init()
    {
        // sign the applet up to receive mouse messages:
        addMouseListener( this );
        addMouseMotionListener( this );
       
        world = new World();  // create a new world
       
        World.setDefaultThread(Thread.currentThread());

        // create a new buffer to draw on:
        buffer = new FrameBuffer( width, height, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY );
        buffer.enableRenderer( IRenderer.RENDERER_OPENGL );
        buffer.disableRenderer( IRenderer.RENDERER_SOFTWARE );

        // load some 3D objects and make sure they have the correct orientation:
        redGear = loadMeshFile( "RedGear.3ds" );
        redGear.rotateY( (float)Math.PI / 2.0f );
        redGear.rotateMesh();
        redGear.setRotationMatrix( new Matrix() );
        redGear.setOrigin( new SimpleVector( 0, 0, 0 ) );
        redGear.build();
        greenGear = loadMeshFile( "GreenGear.3ds" );
        greenGear.rotateY( (float)Math.PI / 2.0f );
        greenGear.rotateZ( 0.35f );
        greenGear.rotateMesh();
        greenGear.setRotationMatrix( new Matrix() );
        greenGear.setOrigin( new SimpleVector( -145.0f, 0, 0 ) );
        greenGear.build();
        blueGear = loadMeshFile( "BlueGear.3ds" );
        blueGear.rotateY( (float)Math.PI / 2.0f );
        blueGear.rotateZ( 0.40f );
        blueGear.rotateMesh();
        blueGear.setRotationMatrix( new Matrix() );
        blueGear.setOrigin( new SimpleVector( 0, 135.0f, 0 ) );
        blueGear.build();

        // Set up a pivot point for the entire gear assembly:
        //assemblyPivot = new Object3D(1);
        assemblyPivot = Object3D.createDummyObj();
        assemblyPivot.setOrigin( new SimpleVector( 0, 0, 0 ) );
        // Make the gears children to assemblyPivot.
        // Translations and rotations to assemblyPivot
        // will affect the entire gear assembly:
        assemblyPivot.addChild( redGear );
        assemblyPivot.addChild( greenGear );
        assemblyPivot.addChild( blueGear );
               
        // add the objects our world:
        world.addObject( redGear );
        world.addObject( greenGear );
        world.addObject( blueGear );
        world.buildAllObjects();
       
        lookAt( redGear );  // make sure the camera is facing towards the object
        letThereBeLight();  // create light sources for the scene
    }


The applet only works when I use SAMPLINGMODE_NORMAL and RENDERER_SOFTWARE.  I am sure it is something simple I am doing incorrectly.  I am just having a little trouble figuring out what.
#46
Support / Switching Between Pivot Points
February 22, 2008, 05:29:16 AM
Each frame, I am trying to change the rotation pivot of an object from (0,-135,0) to (0,0,0) before doing a rotateAxis() on it, and then change the rotation pivot back to (0,-135,0) afterwards.  It seems like the following code should work:


        myObject.setRotationPivot( new SimpleVector( 0, 0, 0 ) );
        myObject.rotateAxis( myObject.getZAxis(), radZ );
        myObject.setRotationPivot( new SimpleVector( 0, -135.0f, 0 ) );


Instead, the object just rotates around the original pivot (0,-135,0), the same as if I don't put any setRotationPivot()'s in there at all.  I am sure there is a simple solution to this, but I can't seem figure it out.