Can't See Debugging Mesh and No Force Shooting Projectiles

DieHard

18-11-2006 09:16:05

1. I using the same debug code from your "tutorialApplicationDagon.h", but I don't see the debug lines (or collision mesh)?

I see everything else, all the NxOgre debug stats. I added the packs in my "resource.cfg", it includes "boot.zip" and "tutorialmedia.zip".

My NxOgre Debug code:
if (glbConfig->isKeyDown(mKeyboard, "impulse5") && mTimeUntilNextToggle <= 0) {
glbObject->physicsWorld->showDebugOverlay(cam, glbObject->renderWindow);
glbObject->physicsWorld->debug(glbObject->physicsWorld->isDebugRendering()^1);
mTimeUntilNextToggle = 1;
}


2. Following your tutorials I used "addForce()" to shoot projectiles, but no force. I tried playing with the numbers like 10000, no force. It just falls, any idea?

Method:
void ObjectManager::addForceObjectDynamic(Ogre::String name, Ogre::Vector3 direction) {
nxOgre::body* mPhysicsBody = physicsScene->findBody(name);
mPhysicsBody->addForce(direction);
mPhysicsBody->wakeUp();
}


Calling the Method:
void DebugControl::Shoot() {
// Declaration.
Ogre::Vector3 vecDirection, vecDirectionPreset;
Ogre::Quaternion quatCameraOrientation;
Ogre::Vector3 vecCurPosition;
Ogre::String strName = "Shoot_" + Ogre::StringConverter::toString(count++);

// Get camera position and orientation.
quatCameraOrientation = ctrlCamera.getOrientation();
vecDirectionPreset = Ogre::Vector3(0, 0, -1);
vecDirection = quatCameraOrientation * vecDirectionPreset;
vecCurPosition = ctrlCamera.getPosition();

glbObject->createObjectDynamic(strName, "box.mesh", Ogre::Vector3(4, 4, 4), 90.0, vecCurPosition, quatCameraOrientation);
glbObject->setMaterialObjectDynamic(strName, "Examples/10PointBlock");
glbObject->addForceObjectDynamic(strName, vecDirection * 10000.0);
}


Please help! Thanks!

betajaen

18-11-2006 09:31:48

Your code looks fine.

But rough estimates your cube is 5760 Kilograms (if my math is correct 90*64) that's heavier than your car.

Remember your supplying the density per m^3 not the mass.

I can't understand why debug lines isn't showing up, without a screen shot or two. Or even a reference to scale.

DieHard

18-11-2006 09:44:21

About addforce(), what do I need to do add more than 10000? Or reduce the mass from 90 to 10?

Also, I'm confused with your measurements, do you mean kg^3?

Here is the screenshots you ordered:

No lines anywhere:


Something weird happening in the sky, its like a mirror from behind:

betajaen

18-11-2006 09:52:06

Density and Forces:

Alright. Your right, density is KG^3.

NxOgre uses the SI system. So we deal with meters for measurement, kilograms for mass and newtons for forces.

Since your cube is incredibly heavy, you'll have to reduce the density down to at least 1/4 or increase the force.

Lines:

Weird. I haven't seen anything like that before. what happens if you don't supply an entity to those 10 cubes? Would the render lines be hiding inside?

As for your second picture, I know about that one. It's a bug.

DieHard

18-11-2006 10:17:27

I still don't see the debug lines (collision mesh lines). I comment-out the "setscale". The white box with no texture have no "mEntity" and "mNode" applied.



Method called:
void ObjectManager::createObjectDynamic(Ogre::String uniquename, Ogre::String filename, Ogre::Vector3 scale, Ogre::Real mass, Ogre::Vector3 position, Ogre::Quaternion orientation) {
nxOgre::body* mPhysicsBody;
mPhysicsBody = physicsScene->createBody(uniquename, filename, new nxOgre::cubeShape(scale), mass, nxOgre::pose(position, orientation));
//mPhysicsBody->mNode->setScale(scale);
mPhysicsBody->updateNode();
}


resource.cfg:
# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../../../media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=media
FileSystem=media/models
FileSystem=media/scene
FileSystem=media/overlays
FileSystem=media/materials/scripts
FileSystem=media/materials/textures
Zip=media/packs/tutorialmedia.zip
Zip=media/packs/boot.zip
FileSystem=../../../../media
FileSystem=../../../../media/fonts
FileSystem=../../../../media/materials/programs
FileSystem=../../../../media/materials/scripts
FileSystem=../../../../media/materials/textures
FileSystem=../../../../media/models
FileSystem=../../../../media/overlays
FileSystem=../../../../media/particle
FileSystem=../../../../media/gui
FileSystem=../../../../media/DeferredShadingMedia
Zip=../../../../media/packs/cubemap.zip
Zip=../../../../media/packs/cubemapsJS.zip
Zip=../../../../media/packs/dragon.zip
Zip=../../../../media/packs/fresneldemo.zip
Zip=../../../../media/packs/ogretestmap.zip
Zip=../../../../media/packs/skybox.zip


I played with the "resource.cfg" a little, moving it into the "[Bootstrap]" didn't do much.

betajaen

18-11-2006 10:23:19

Is anything in the Ogre log or NxOgre log that seems weird?

DieHard

18-11-2006 10:28:51

I deleted the logs and started the program fresh with new logs.

NxOgre.physics.log
05:22:35.000000 Starting up NxOgre using versions:
-> PhysX SDK 2.6.2
-> Hardware None installed or none found.
-> NxOgre NxOgre 0.4.RC2.Debug (Compatible: yes) (Debug version)
-> Ogre 1.2.4 'Dagon'
05:22:35.000000 Started.
05:22:35.000000 Creating scene 'PhysicsScene'.


Ogre.log
05:22:33: Creating resource group General
05:22:33: Creating resource group Internal
05:22:33: Creating resource group Autodetect
05:22:33: Registering ResourceManager for type Material
05:22:33: Registering ResourceManager for type Mesh
05:22:33: Registering ResourceManager for type Skeleton
05:22:33: MovableObjectFactory for type 'ParticleSystem' registered.
05:22:33: Loading library OgrePlatform_d.dll
05:22:33: OverlayElementFactory for type Panel registered.
05:22:33: OverlayElementFactory for type BorderPanel registered.
05:22:33: OverlayElementFactory for type TextArea registered.
05:22:33: Registering ResourceManager for type Font
05:22:33: ArchiveFactory for archive type FileSystem registered.
05:22:33: ArchiveFactory for archive type Zip registered.
05:22:33: DevIL version: Developer's Image Library (DevIL) 1.6.7 Nov 9 2005
05:22:33: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw
05:22:33: Registering ResourceManager for type HighLevelGpuProgram
05:22:33: Registering ResourceManager for type Compositor
05:22:33: MovableObjectFactory for type 'Entity' registered.
05:22:33: MovableObjectFactory for type 'Light' registered.
05:22:33: MovableObjectFactory for type 'BillboardSet' registered.
05:22:33: MovableObjectFactory for type 'ManualObject' registered.
05:22:33: MovableObjectFactory for type 'BillboardChain' registered.
05:22:33: MovableObjectFactory for type 'RibbonTrail' registered.
05:22:33: Loading library .\RenderSystem_Direct3D9
05:22:33: D3D9 : Direct3D9 Rendering Subsystem created.
05:22:33: D3D9: Driver Detection Starts
05:22:33: D3D9: Driver Detection Ends
05:22:33: Loading library .\RenderSystem_GL
05:22:33: OpenGL Rendering Subsystem created.
05:22:33: Loading library .\Plugin_ParticleFX
05:22:33: Particle Emitter Type 'Point' registered
05:22:33: Particle Emitter Type 'Box' registered
05:22:33: Particle Emitter Type 'Ellipsoid' registered
05:22:33: Particle Emitter Type 'Cylinder' registered
05:22:33: Particle Emitter Type 'Ring' registered
05:22:33: Particle Emitter Type 'HollowEllipsoid' registered
05:22:33: Particle Affector Type 'LinearForce' registered
05:22:33: Particle Affector Type 'ColourFader' registered
05:22:33: Particle Affector Type 'ColourFader2' registered
05:22:33: Particle Affector Type 'ColourImage' registered
05:22:33: Particle Affector Type 'ColourInterpolator' registered
05:22:33: Particle Affector Type 'Scaler' registered
05:22:33: Particle Affector Type 'Rotator' registered
05:22:33: Particle Affector Type 'DirectionRandomiser' registered
05:22:33: Particle Affector Type 'DeflectorPlane' registered
05:22:33: Loading library .\Plugin_BSPSceneManager
05:22:33: Registering ResourceManager for type BspLevel
05:22:33: Loading library .\Plugin_OctreeSceneManager
05:22:33: Loading library .\Plugin_CgProgramManager
05:22:33: *-*-* OGRE Initialising
05:22:33: *-*-* Version 1.2.4 (Dagon)
05:22:33: Creating resource group Bootstrap
05:22:33: Added resource location '../../../../media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
05:22:33: Added resource location 'media' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location 'media/models' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location 'media/scene' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location 'media/overlays' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location 'media/materials/scripts' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location 'media/materials/textures' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/fonts' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/materials/programs' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/materials/scripts' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/materials/textures' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/models' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/overlays' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/particle' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/gui' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location '../../../../media/DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
05:22:33: Added resource location 'media/packs/tutorialmedia.zip' of type 'Zip' to resource group 'General'
05:22:33: Added resource location 'media/packs/boot.zip' of type 'Zip' to resource group 'General'
05:22:33: Added resource location '../../../../media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
05:22:33: Added resource location '../../../../media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
05:22:33: Added resource location '../../../../media/packs/dragon.zip' of type 'Zip' to resource group 'General'
05:22:33: Added resource location '../../../../media/packs/fresneldemo.zip' of type 'Zip' to resource group 'General'
05:22:33: Added resource location '../../../../media/packs/ogretestmap.zip' of type 'Zip' to resource group 'General'
05:22:33: Added resource location '../../../../media/packs/skybox.zip' of type 'Zip' to resource group 'General'
05:22:33: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
05:22:33: D3D9 : RenderSystem Option: Anti aliasing = None
05:22:33: D3D9 : RenderSystem Option: Floating-point mode = Fastest
05:22:33: D3D9 : RenderSystem Option: Full Screen = No
05:22:33: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce 7800 GT
05:22:33: D3D9 : RenderSystem Option: VSync = Yes
05:22:33: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
05:22:35: D3D9 : Subsystem Initialising
05:22:35: D3D9RenderSystem::createRenderWindow "OGRE Render Window", 800x600 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 useNVPerfHUD=false vsync=true
05:22:35: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 800x600, 32bpp
05:22:35: Registering ResourceManager for type Texture
05:22:35: Registering ResourceManager for type GpuProgram
05:22:35: RenderSystem capabilities
05:22:35: -------------------------
05:22:35: * Hardware generation of mipmaps: yes
05:22:35: * Texture blending: yes
05:22:35: * Anisotropic texture filtering: yes
05:22:35: * Dot product texture operation: yes
05:22:35: * Cube mapping: yes
05:22:35: * Hardware stencil buffer: yes
05:22:35: - Stencil depth: 8
05:22:35: - Two sided stencil support: yes
05:22:35: - Wrap stencil values: yes
05:22:35: * Hardware vertex / index buffers: yes
05:22:35: * Vertex programs: yes
05:22:35: - Max vertex program version: vs_3_0
05:22:35: * Fragment programs: yes
05:22:35: - Max fragment program version: ps_3_0
05:22:35: * Texture Compression: yes
05:22:35: - DXT: yes
05:22:35: - VTC: no
05:22:35: * Scissor Rectangle: yes
05:22:35: * Hardware Occlusion Query: yes
05:22:35: * User clip planes: yes
05:22:35: * VET_UBYTE4 vertex element type: yes
05:22:35: * Infinite far plane projection: yes
05:22:35: * Hardware render-to-texture: yes
05:22:35: * Floating point textures: yes
05:22:35: * Non-power-of-two textures: yes
05:22:35: * Volume textures: yes
05:22:35: * Multiple Render Targets: 4
05:22:35: * Point Sprites: yes
05:22:35: * Extended point parameters: yes
05:22:35: * Max Point Size: 8192
05:22:35: ***************************************
05:22:35: *** D3D9 : Subsystem Initialised OK ***
05:22:35: ***************************************
05:22:35: ResourceBackgroundQueue - threading disabled
05:22:35: Particle Renderer Type 'billboard' registered
05:22:35: WARNING: Mesh instance 'NxOgre.ErrorCube' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
05:22:35: Registering ResourceManager for type NxSCM
05:22:35: Creating viewport on target 'OGRE Render Window', rendering from camera 'DefaultCamera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
05:22:35: Viewport for camera 'DefaultCamera', actual dimensions L: 0 T: 0 W: 800 H: 600
05:22:35: Initialising resource group Bootstrap
05:22:35: Parsing scripts for resource group Bootstrap
05:22:35: Parsing script OgreCore.material
05:22:35: Parsing script OgreProfiler.material
05:22:35: Parsing script Ogre.fontdef
05:22:35: Parsing script OgreDebugPanel.overlay
05:22:35: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8B8G8R8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
05:22:35: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8B8G8R8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
05:22:35: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8B8G8R8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
05:22:35: Font BlueHighwayusing texture size 512x512
05:22:35: Info: Freetype returned null for character 127 in font BlueHighway
05:22:35: Info: Freetype returned null for character 128 in font BlueHighway
05:22:35: Info: Freetype returned null for character 129 in font BlueHighway
05:22:35: Info: Freetype returned null for character 130 in font BlueHighway
05:22:35: Info: Freetype returned null for character 131 in font BlueHighway
05:22:35: Info: Freetype returned null for character 132 in font BlueHighway
05:22:35: Info: Freetype returned null for character 133 in font BlueHighway
05:22:35: Info: Freetype returned null for character 134 in font BlueHighway
05:22:35: Info: Freetype returned null for character 135 in font BlueHighway
05:22:35: Info: Freetype returned null for character 136 in font BlueHighway
05:22:35: Info: Freetype returned null for character 137 in font BlueHighway
05:22:35: Info: Freetype returned null for character 138 in font BlueHighway
05:22:35: Info: Freetype returned null for character 139 in font BlueHighway
05:22:35: Info: Freetype returned null for character 140 in font BlueHighway
05:22:35: Info: Freetype returned null for character 141 in font BlueHighway
05:22:35: Info: Freetype returned null for character 142 in font BlueHighway
05:22:35: Info: Freetype returned null for character 143 in font BlueHighway
05:22:35: Info: Freetype returned null for character 144 in font BlueHighway
05:22:35: Info: Freetype returned null for character 145 in font BlueHighway
05:22:35: Info: Freetype returned null for character 146 in font BlueHighway
05:22:35: Info: Freetype returned null for character 147 in font BlueHighway
05:22:35: Info: Freetype returned null for character 148 in font BlueHighway
05:22:35: Info: Freetype returned null for character 149 in font BlueHighway
05:22:35: Info: Freetype returned null for character 150 in font BlueHighway
05:22:35: Info: Freetype returned null for character 151 in font BlueHighway
05:22:35: Info: Freetype returned null for character 152 in font BlueHighway
05:22:35: Info: Freetype returned null for character 153 in font BlueHighway
05:22:35: Info: Freetype returned null for character 154 in font BlueHighway
05:22:35: Info: Freetype returned null for character 155 in font BlueHighway
05:22:35: Info: Freetype returned null for character 156 in font BlueHighway
05:22:35: Info: Freetype returned null for character 157 in font BlueHighway
05:22:35: Info: Freetype returned null for character 158 in font BlueHighway
05:22:35: Info: Freetype returned null for character 159 in font BlueHighway
05:22:35: Info: Freetype returned null for character 160 in font BlueHighway
05:22:35: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
05:22:35: Texture: ogretext.png: Loading 1 faces(PF_A8B8G8R8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
05:22:35: Parsing script OgreLoadingPanel.overlay
05:22:35: Finished parsing scripts for resource group Bootstrap
05:22:35: Parsing scripts for resource group Autodetect
05:22:35: Finished parsing scripts for resource group Autodetect
05:22:35: Parsing scripts for resource group General
05:22:35: Parsing script Examples.program
05:22:35: Parsing script StdQuad_vp.program
05:22:35: Parsing script deferred.glsl.program
05:22:35: Parsing script deferred.hlsl.program
05:22:35: Parsing script deferred_post_debug.glsl.program
05:22:35: Parsing script deferred_post_debug.hlsl.program
05:22:35: Parsing script deferred_post_minilight.glsl.program
05:22:35: Parsing script deferred_post_minilight.hlsl.program
05:22:35: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named lightSpecularColor.
File: e:\projects\ogrecvs\branches\dagon_vc8_clean\ogrenew\ogremain\src\ogregpuprogram.cpp
Line: 776
Stack unwinding: <<beginning of stack>>
05:22:35: Error at line 29 of deferred_post_minilight.hlsl.program: Invalid param_named_auto attribute - An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named lightSpecularColor.
File: e:\projects\ogrecvs\branches\dagon_vc8_clean\ogrenew\ogremain\src\ogregpuprogram.cpp
Line: 776
Stack unwinding: <<beginning of stack>>
05:22:35: Parsing script deferred_post_multipass.glsl.program
05:22:35: Parsing script deferred_post_multipass.hlsl.program
05:22:35: Parsing script deferred_post_onepass.glsl.program
05:22:35: Parsing script deferred_post_onepass.hlsl.program
05:22:35: Parsing script scene5export.material
05:22:36: Parsing script SlideShow.material
05:22:36: Parsing script BlackAndWhite.material
05:22:36: Parsing script Bloom.material
05:22:36: Parsing script DOF.material
05:22:36: Parsing script Embossed.material
05:22:36: Parsing script Example-DynTex.material
05:22:36: Parsing script Example-Water.material
05:22:36: Parsing script Example.material
05:22:36: Parsing script Examples-Advanced.material
05:22:36: Parsing script facial.material
05:22:36: Parsing script Glass.material
05:22:36: Parsing script hdr.material
05:22:36: Parsing script HeatVision.material
05:22:37: Parsing script Hurt.material
05:22:37: Parsing script Invert.material
05:22:37: Parsing script Laplace.material
05:22:37: Parsing script MotionBlur.material
05:22:37: Parsing script Ocean.material
05:22:37: Parsing script OffsetMapping.material
05:22:37: Parsing script Ogre.material
05:22:37: Parsing script OldMovie.material
05:22:37: Parsing script OldTV.material
05:22:37: Parsing script Posterize.material
05:22:37: Parsing script RZR-002.material
05:22:37: Parsing script SharpenEdges.material
05:22:37: Parsing script smoke.material
05:22:37: Parsing script Tiling.material
05:22:37: Parsing script deferred.material
05:22:37: Parsing script deferreddemo.material
05:22:37: Parsing script deferred_post_debug.material
05:22:37: Parsing script deferred_post_minilight.material
05:22:37: Parsing script deferred_post_multipass.material
05:22:38: Parsing script deferred_post_onepass.material
05:22:38: Parsing script nx.floor.material
05:22:38: Parsing script nx.floor2.material
05:22:38: Parsing script nx.particles.material
05:22:38: Parsing script 312.material
05:22:38: Parsing script 313.material
05:22:38: Parsing script arrows.material
05:22:38: Parsing script chair.material
05:22:38: Parsing script int.material
05:22:38: Parsing script nx.interior1.material
05:22:38: Parsing script nx.stairs.material
05:22:38: Parsing script set.material
05:22:38: Parsing script nx.shapes.material
05:22:38: Parsing script gui.material
05:22:38: Parsing script boot.material
05:22:38: Parsing script instructions.material
05:22:38: Parsing script nx.bodyguide.material
05:22:38: Parsing script fresnelenviron.material
05:22:38: Parsing script Examples.compositor
05:22:38: Parsing script sample.fontdef
05:22:38: Parsing script Ogre.fontdef
05:22:38: Parsing script Example-Water.particle
05:22:38: Parsing script Example.particle
05:22:38: Parsing script smoke.particle
05:22:38: Parsing script SlideShow.overlay
05:22:39: Parsing script Compositor.overlay
05:22:39: Parsing script DP3.overlay
05:22:39: Parsing script Example-CubeMapping.overlay
05:22:39: Parsing script Example-DynTex.overlay
05:22:39: Parsing script Example-Water.overlay
05:22:39: Parsing script Shadows.overlay
05:22:39: Finished parsing scripts for resource group General
05:22:39: Parsing scripts for resource group Internal
05:22:39: Finished parsing scripts for resource group Internal
05:22:39: Texture: clouds.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
05:22:39: Mesh: Loading box.mesh.
05:22:39: Loading the scene
05:22:39: Mesh: Loading Box1.mesh.
05:22:39: 5
05:22:39: Mesh: Loading PlayerFloor.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Building1.mesh.
05:22:39: 5
05:22:39: Texture: concrete01_d.tga: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
05:22:39: Mesh: Loading Building2.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Building3.mesh.
05:22:39: 5
05:22:39: Mesh: Loading FloorStreet3.mesh.
05:22:39: 5
05:22:39: Texture: roadway2_d.tga: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
05:22:39: Mesh: Loading Building4.mesh.
05:22:39: 5
05:22:39: Mesh: Loading PlayerFloor1.mesh.
05:22:39: 5
05:22:39: Mesh: Loading PlayerFloor2.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Wall1.mesh.
05:22:39: 5
05:22:39: Mesh: Loading FloorStreet2.mesh.
05:22:39: 5
05:22:39: Mesh: Loading FloorGround.mesh.
05:22:39: 5
05:22:39: Texture: rock05_d.tga: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
05:22:39: Mesh: Loading PlayerFloor3.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Box2.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Box3.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Box4.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Box5.mesh.
05:22:39: 5
05:22:39: Mesh: Loading FloorGround1.mesh.
05:22:39: 5
05:22:39: Mesh: Loading PlayerFloor8.mesh.
05:22:39: 5
05:22:39: Mesh: Loading PlayerFloor9.mesh.
05:22:39: 5
05:22:39: Mesh: Loading FloorGround2.mesh.
05:22:39: 5
05:22:39: Mesh: Loading FloorGround3.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Building5.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Box6.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Box7.mesh.
05:22:39: 5
05:22:39: Mesh: Loading Wall2.mesh.
05:22:39: 5
05:22:39: Mesh: Loading pCube1.mesh.
05:22:39: 5
05:22:39: Mesh: Loading pCube2.mesh.
05:22:39: 5
05:22:39: Mesh: Loading pCube3.mesh.
05:22:39: 5
05:22:39: Mesh: Loading pCube4.mesh.
05:22:39: 5
05:22:39: Finished loading the scene!
05:22:39: Texture: spot_shadow_fade.png: Loading 1 faces(PF_B8G8R8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
05:22:44: Font nxogrefontusing texture size 512x512
05:22:44: Info: Freetype returned null for character 160 in font nxogrefont
05:22:44: Texture: nxogrefontTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
05:22:46: Texture: 10points.png: Loading 1 faces(PF_A8B8G8R8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.

betajaen

18-11-2006 10:38:38

Nope, there is nothing wrong there (Except your not shutting NxOgre or Ogre down) afterwards.

However it may be a material problem. What do you see if you go into wireframe mode?

DieHard

18-11-2006 10:41:10

The addforce() is not working still. I set the density (mass?) to 1 and addforce() is multiplied by 10000. The projectile just falls down under me.

I thought maybe there is something wrong with "physicsScene->findBody(name)", so I put the addforce() after I create the body. But, that doesn't work.

DieHard

18-11-2006 10:55:36

Ah, the Ogre forum is slowing down...

Using the Ogre's own debug mode is fine. The wireframe mode, I can see my objects, but with NxOgre debug, I don't see my collision mesh lines.

Off topic, I thought I'm shutting down Ogre and NxOgre properly, they're both in my ObjectManager's destructor.

betajaen

18-11-2006 11:03:34

Most likely somebody trying to scrape the wiki, I wish someone could invent a device that I could punch somebody across the internet.

Anyway back on topic:

I was referring to see if you see in wire frame mode the debug renderer, but since I think it's the material it may be worth it creating a white material called "BaseWhiteNoLighting" and see if that does anything.

If those are your logs when the application has finished, Ogre and NxOgre have not shutdown. I'm guessing either your not calling down the shutdown function, or an error is happening during the shutting down process.

DieHard

18-11-2006 11:14:50

I tried "mPhysicsBody->mEntity->setMaterialName("BaseWhiteNoLighting");" after I create the body. It worked, my boxes are white, but no lines still. :(

If it is the material, I'll trace through the files. Do I need both "tutorialmedia.zip" and "boot.zip"? And what is the material name and file name for the debug lines?

About the shooting projectiles:
The addforce() is not working still. I set the density (mass?) to 1 and addforce() is multiplied by 10000. The projectile just falls down under me.

I thought maybe there is something wrong with "physicsScene->findBody(name)", so I put the addforce() after I create the body. But, that doesn't work.

betajaen

18-11-2006 11:21:10

No, what I meant was create a .material file with BaseWhiteNoLighting in it. I don't know why the forces aren't being applied to the body.

At this time I can only work out the problem through looking at the source code, of course which I will be very discrete about it. PM me if you want me to look at it.

DieHard

18-11-2006 12:32:37

I already private messaged you, betajaen. This is a repost of the message.

But, anyway, I played with the density (or called mass?) to 0.05 and it worked! Holy crap, NxOgre is very sensitive, very low numbers.

betajaen

18-11-2006 12:36:38

Density. It shouldn't be that sensitive, I'd dealt with planetary numbers (literally) and it was fine.

There is something else afoot.

betajaen

18-11-2006 22:32:30

Alright, I haven't look at your source yet (NWN2 distracted me).

But I did find a bug that may be related. The DebugNode can not be turned on or off in debug mode, if it does then it takes a few turns of turning it on and off before it appears again.

It's fixed now.

DieHard

19-11-2006 00:53:17

I hope so.

Oh, I forgot to tell you the keys:
6 - Toggle NxOgre debug.
5 - Switch cameras.
4 - Swtich Ogre wireframe, points, solid.
2 - Switch Ogre anisotropic.
1 - Toggle Ogre debug overlay.
E, S, D, F - Move around.
R - Shoot projectile.
SPACE - Move up (jump).
LSHIFT - Move down (crouch).
ESC - Quit

DieHard

06-12-2006 04:22:56

I took few weeks off to pamper my college final exams and my Asp.net job. Now, I'm back on the saddle doing C++ game programming.

Anyway, back on topic, I'm wonder what is the situation? The density (aka mass?) worked when setting value as low as 0.05? How about the debug lines not showing up on runtime?

Do you know what I'm doing wrong?

Thanks for the help. Can't wait to update my code to 0.4RC3. :)

DieHard

04-01-2007 03:36:39

After compiling the NxOgre 0.4 RC3 successfully on VS2005 SP1, I can continue developing my engine.

Shooting projectile is working. But, I still cannot see the debugging collision mesh (lines). I'm using your files in my own media folder. From my resources.cfg:
Zip=media/packs/boot.zip
Zip=media/packs/tutorialmedia.zip


I replaced the two zip's with a new copy from 0.4 RC3 Tutorial. Am I missing anything? It could be my side. Probably, I am overriding something. I'll look into deeper later.

I wonder do you have any new thoughts about my issue?

By the way, I still see double debug labels on the other side.

Nudel

07-01-2007 12:45:03

I got the same problem, twice. The first time, i could see the debug lines at certain camera angles. Its almost as if the collision objects are culled incorrectly. Now in a different application, i cant get them to work at all.
Could anyone tell me how to disable ogres frustum culling? Maybe thats the problem.

edit:
ok, that didnt work either.

Toby

08-01-2007 13:53:25

I have had same problem but I updated my code in way of betajean tutorial and it works now.

DieHard

08-01-2007 21:49:08

Is it something got to do with the tutorial application code??? I'm trying to think what it is so different than my code. My code pretty striaght forward base of a lot of Ogre's tutorials from wiki.

Thanks.

jchmack

10-01-2007 14:17:40

im having the same problem but it only happens when i call this function:



void projectile::Create(scene *mScene)
{
name+=Ogre::StringConverter::toString(projectilecount);

mBody = mScene->createBody
(
name, //name
"sphere.50cm.mesh", //mesh name
new sphereShape
(
.5f,
pose(),
mScene->findMaterial("BallMat")
),
1, //density
InitialPosition //pose
);

mBody->setIgnoreGravity(true);
//mBody->mNode->scale(.1,.1,.1);
mBody->setLinearVelocity(InitialDirection,InitialVelocity);

}



otherwise it works fine.

and i dont think that its the material because i call this in my start function and it works fine.


material *BallMat = mScene->createMaterial("BallMat",0,0,1);

ball = mScene->createBody
(
"ball", //name
"sphere.50cm.mesh", //mesh name
new sphereShape
(
.5f,
pose(),
BallMat
),
10.0f, //density
Vector3(-3,10,0) //pose
);


Hope this helps. Tell me if you guys figure it out.

edit: I also tried the default material and i have the same problem.

betajaen

10-01-2007 14:36:15

This raises an eyebrow:

name+=Ogre::StringConverter::toString(projectilecount);

Have you initialised name already? Wouldn't it be better as:

name= "projectile" + Ogre::StringConverter::toString(projectilecount);

jchmack

10-01-2007 14:41:16

This raises an eyebrow:

name+=Ogre::StringConverter::toString(projectilecount);

Have you initialised name already? Wouldn't it be better as:

name= "projectile" + Ogre::StringConverter::toString(projectilecount);


i initialize it in my constructor:

projectile::projectile()
{
name="default projectile name";

InitialPosition = Vector3::ZERO;
InitialDirection = Vector3(0,0,1);
InitialVelocity = 5;
}

its a tiny class... I can post it if you like. Maybe you can remake the problem and tell us what we are doing.

jchmack

10-01-2007 14:46:42

Ok ill post the class to see if you get similar problems:



#ifndef Projectile_H
#define Projectile_H

using namespace std;

class projectile
{
public:
projectile();
void Create(scene *mScene);

body *mBody;

string name;

Vector3 InitialPosition;
Vector3 InitialDirection;
float InitialVelocity;

static int projectilecount;
};

int projectile::projectilecount=0;

projectile::projectile()
{
name="default projectile name";

InitialPosition = Vector3::ZERO;
InitialDirection = Vector3(0,0,1);
InitialVelocity = 5;
}

void projectile::Create(scene *mScene)
{
name+=Ogre::StringConverter::toString(projectilecount);

mBody = mScene->createBody
(
name, //name
"sphere.50cm.mesh", //mesh name
new sphereShape
(
.5f,
pose(),
//mScene->findMaterial("BallMat")
mScene->findMaterial("default")
),
1, //density
InitialPosition //pose
);

mBody->setIgnoreGravity(true);
//mBody->mNode->scale(.1,.1,.1);
mBody->setLinearVelocity(InitialDirection,InitialVelocity);

}


#endif



and the call:
(This is just in my start function)


projectile1 = new projectile;
projectile1->InitialPosition=Vector3(0,2,-3);
projectile1->InitialDirection=Vector3(0,0,-1);
projectile1->InitialVelocity=5;
projectile1->Create(mScene);