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.


Topics - ToddMcF2002

Pages: [1] 2
1
Support / Transparency and Object Fade
« on: May 19, 2007, 03:45:42 pm »
Egon:

Is it possible to expose more aggressive transparency in JPCT?  I want to take a look at object fade instead of fog like alot of games but I hate the "popping" effect off Objects.  Going from transparency to invisible and removeObject() - and back again.

The transparency options right now look like a half alpha.




2
Projects / DevKit / Level Editor
« on: May 19, 2007, 05:05:58 am »
OK so, I've got the basic mechanics complete.  Here is where I'm at:

- Multiple Object Selection and Visual indicator
- Apply change to multiple selection
- Delta tracking of changes from initial values
- Dynamic Object Loading (3DS single, multipart)
- Load from XML persistence
- Orbital camera with zoom, pan, etc
- Floating FengGui UI

To do's:
- Better camera tracking (it is still chasing Werdy).
- Marker placement for object spawning (see that Marker Toggle button? in marker mode you set a marker on the terrain and the load will occur there)
- Persistence to XML across the board
- custom property extentions per object for game content
- Texture Loader (right now I'm just using my XML texture loader for Werdy)

So what you are seeing in the pic: 
I selected 3 of the tree canopy sections and altered the transparency as a group - notice the ones not affected.  Also I detached Werdy's head and messed with the rotations and translations.  If you select the various objects on the screen you can see all the property delta's in the floater screen - and use the "Stepping" box to get back if necessary.  No undo feature yet.  Its hard to see in the pic but right above the "key" label there is a ComboBox which is always in the context of selected objects - so just the 3 canopy objects are in the list since they are highlighted.  You can lock object selections by using the "Select Toggle" which gives you a special cursor.  Turn it on, select some objects and turn it off and the objects will be locked highlighted.  A regular cursor does nothing but show terrain coords on mouse move. 





 
 

3
Support / Can some Object3D Properties Be Exposed?
« on: May 17, 2007, 03:38:10 pm »
Namely Culling, Transparency, Blending, Texture?  Assuming of course you have this state.  If not I'll track them in a wrapper but I wanted to avoid abstracting the API in case anyone else wants to use this devkit app I'm making without stumbling on a bunch of custom wrappers.

 

4
I started a tree and before positioning a 100 or so leaf clusters I decided (smartly!) to give it a whirl in JPCT and of course I've got a new issue now  ;D

Leaf transparency and culling.  I don't want to set the whole merged terrain to CULLING_DISABLED and setTransparency(X).

So how do I solve this issue with compound objects like this?  Do I need to load all trees seperately from the level or use a custom XML loader to generate the leaves for the tree on the fly using Object3D primatives?  Here is pic of my problem - the first leaf cluster lacks the appropriate transparency and culling properties.


5
Support / Support for UVW Angle?
« on: May 14, 2007, 04:22:46 am »
I was doing a tiling textures test in Max and came up with an unexpected result in JPCT.  In the pic below I've circled the UVW angle adjustment settings in red.  If I zero out those values I get what I'm seeing in JPCT.  Is the loader ignoring those values?

Is there a suggested way to do this sort of texture tiling if angles are not supported???


6
Projects / Werdy World - A Childrens Game
« on: May 12, 2007, 04:19:14 am »
A basic 3rd person non violent platform type.  This is just a test level for framerate, lighting and some crude landscape models.  I did all the modeling except the "hut" which was a turbosquid freebie.  The framerate is about 70-140 on my Centrino IBM T60 with a Radeon x1400.  The test level is pretty large - the OC Tree size is 30800 for the landscape alone.

 

7
Support / WaterTextureEffect Question
« on: May 10, 2007, 04:10:52 pm »
I've been playing around with WaterTextureEffect.  The confusion I have is over the intensity and when to call applyEffect.

If I set the "intensity" to 2000 (is this duration in milliseconds???) and applyEffect every 1000 ms there is cumulative effect and after about 30 seconds it is "rippling" alot.

If I set the intensity to 1000 and applyEffect every 1000 ms not a heck of alot of rippling happens, just small pockets.

Is the intensity in milliseconds?  Should I overlap the applyEffect or am I misusing this class?


8

Strange issue:

If I have a sloped plane, meaning the terrain itself is sloped, calcMinDistance with breakIfLarger works just fine.  However, if I'm running up a sloped surface that is an object on the plane, using breakIfLarger causes the slope to not be detected and I fall through to the plane under it.  This is especially true where the sloped object meets the plane.  So if I'm running down the slope, toward the bottom I suddenly fall through.

Using the "normal" calcMinDistance takes care of it - but I'm curious why this is happening?


9
Support / Got Bloom?
« on: May 07, 2007, 03:14:08 pm »
I need to create a bunch of glowing objects and maybe fake a sun.  I've played with the lighting model and just can't seem to get the right effect.  I heard a rumor this might be coming up in the next release?  Any details?  Thanks!

10
Support / Gamepad?
« on: May 05, 2007, 10:07:52 pm »
Anyone try to map a USB gamepad in OpenGL mode?  I have not tried it but I've been animating a character for my son to play with and he'd be better off on the Saitek than the keyboard.

I was thinking about making some kids games but without gamepad support it will be sorta tough.  Ideas?




11
Support / 3DS baked textures?
« on: April 28, 2007, 10:01:54 pm »
Does JPCT support or ignore baked in textures?  If it supports it - is it more or less efficient than loading textures independently?

I know it limits how I can display my models but I was curious.  Some monsters won't have any variation or equipment.

Thanks!
- Todd

12
Feedback / Members' backgrounds...
« on: April 18, 2007, 02:39:24 pm »
Thanks.  I appreciate the encouragement.  I read the whole Karga thread and it was amazing to watch your project transform from the raw basics to the end result - very inspiring.

I'm very curious what peoples backgrounds are here.  I'm a developer in the financial industry with about 2 years of C++, 6 of Java and 8-10 with VB.  I mostly do Java middle tier services now.  I have no gaming development experience but I've played tons of RPG's.  I think Temple of Elemental Evil was the pinnacle of turn based combat gaming and there is a great void today for that kind of gameplay. 

That's my story and why I'm here anyway... 

13
Support / RotateMesh() and addChild()
« on: April 12, 2007, 03:48:36 am »
Just trying to verify something:

I have to rotate my MD2's in order to orient them properly on the X/Z plane otherwise they run sideways.
Code: [Select]
         
          // build character
          build()

          // fix mesh alignment on xz plane
  yRot = (float)Math.PI*1.5f;
  rotateY(yRot);
  rotateMesh();

          // this calls addChild() for weapons...
          checkLoadWeapons(c, w);
No matter what sequence combination I use of checkLoadWeapons(), build() and rotateMesh() I always end up having to manually adjust the weapon orientation since rotateMesh() seems to "break" the MD2's origin for the weapon.  In the sequence above I end up cloning the character's rotationMatrix for the weapon and then adjusting X and Z until the weapon matches the hand.  After that all is well.

This is hardly a showstopper since its pretty easy to translate the adjustment.  But - is this expected or am I doing something wrong?

Thanks!


14
Support / 3DS Animated Model Error
« on: April 10, 2007, 03:18:47 pm »
Can't seem to get this working.  Every time I add a mesh for an animation frame I get an error such as:

Object 'object_1_jPCT20' created using 570 polygons and 558 vertices.
[ Tue Apr 10 08:38:30 EDT 2007 ] - ERROR: Bounding box missing in this mesh!

The model does appear in the world.  He's lying on his back but I know how to fix that.  When I call
Code: [Select]
_monster.setAnimationSequence(anim);
I get:

[ Tue Apr 10 08:38:30 EDT 2007 ] - ERROR: This Animation is empty!


Which is expected given the other errors on each Mesh.

BTW I didn't create the model - its from the book "Killer Java Game Programming" and it was created with Poser
I can't seem to find a basic animated 3DS file anywhere for testing.  Could someone upload one??? 

Here is the underlying code.

Code: [Select]
private void testLoad3DS2(){
try{
Loader.setVertexOptimization(false);

Object3D[] animArray=Loader.load3DS("models/3ds/skel_stand.3ds", 100f);
_monster=animArray[0];
_monster.build();

_monster.rotateX((float)-Math.PI/2);
              _monster.rotateMesh();
              _monster.setRotationMatrix(new Matrix());
     
              _monster.createTriangleStrips(2);
              _monster.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
              _monster.setCollisionOptimization(Object3D.COLLISION_DETECTION_OPTIMIZED);

_monster.setTexture("select");
_monster.setVisibility(true);

_monster.translate(new SimpleVector(0, -50, 0));

theWorld.addObject(_monster);



Animation anim=new Animation(5);
Object3D [] o = null;

anim.createSubSequence("stand");
o = Loader.load3DS("models/3ds/skel_stand.3ds", 100f);
anim.addKeyFrame(o[0].getMesh().cloneMesh(false));

anim.createSubSequence("walk");
o = Loader.load3DS("models/3ds/skel_walk1.3ds", 100f);
anim.addKeyFrame(o[0].getMesh().cloneMesh(false));
o = Loader.load3DS("models/3ds/skel_walk2.3ds", 100f);
anim.addKeyFrame(o[0].getMesh().cloneMesh(false));

anim.createSubSequence("punch");
o = Loader.load3DS("models/3ds/skel_punch1.3ds", 100f);
anim.addKeyFrame(o[0].getMesh().cloneMesh(false));
o = Loader.load3DS("models/3ds/skel_punch2.3ds", 100f);
anim.addKeyFrame(o[0].getMesh().cloneMesh(false));

System.out.println("MoveTest::testLoad3DS2() setting sequence...");
_monster.setAnimationSequence(anim);

}catch(Exception e){
System.err.println("MoveTest::testLoad3DS2() " + e.getMessage());
e.printStackTrace();
}
   }




    private void checkAnimate3DS(){
    // CALLED IN GAME LOOP...

try{
long ltime = System.currentTimeMillis();
    if((ltime - _last3DSms) > 60){
_last3DSms = ltime;

if(_anim3DS > 1)
_anim3DS=0;
else
_anim3DS+=0.05f;
_monster.animate(_anim3DS, 2); // walk sequence...
}

}catch(Exception e){
System.err.println("MoveTest::checkAnimate3DS() " + e.getMessage());
e.printStackTrace();
}
   }


15
This is design question really - impacting code efficiency and its performance impact.

Currently I'm composing variable length/width lines out of Vectors of Object3D Primitive Plane.   

I can't work with a model because of the variability ie. the rectangle resizes its length and rotation on the x/z plane based on the mouse coords.  Think Lightning Bolt for example.  It can be strait or have variable directional adjustments between SimpleVector source and target.

The question is this:

Its it "worth" investigating building a Rectangle primitive for performance?  Its really a question of whether there is an advantage to having a single Object3D I'll have to create and destroy or a vector of them (which is my current approach).  In the end, the total number of underlying Triangle faces is the same isnt it? 

Is there any performance advantage or disadvantage?

This is an important issue for me since I'm using this approach to build other "pathing" objects as part of a larger Particle effect factory.




 

Pages: [1] 2