If you have Bounding box and lighting problems...

mrfalken

12-04-2007 10:46:43

After a week dealing with strange issues concerning objects culling, wrong lighting, and other problems, I found that all was caused by wrong positioning of the bounding box exported by oFusion (yes...the last version, 1.8 CE).

This can be solved by getting the last MeshUpgrade "main.cpp" file from CVS repository from
here and rebuilding OgreMeshUpgrade.exe.

After that you'll have a brand new mesh upgrader, with the "-b" command line option, that will allow you to fix the bounding box in the correct position...

Since this is a major problem, I think it could be usefull to stick this post until the next release: maybe the next one will not have to fight one week to solve such an easy issue... :)

Evak

13-04-2007 17:36:30

I posted a link to binaries with a simple drag and drop script on another thread. The files can be loaded from

http://www.kineticrealities.com/meshupdater.zip

If you have your meshes in the same folder just drag them over the bat file and they will be overwritten with Eihort versions.

Paulov

16-04-2007 15:45:15

Hey Evak

Thanks a lot fot that binary!!

Is exactly what an artist like me needs. Bath upgrade for a number of .mesh files each time I export my scene.

And yes, I´m sure that there is a bug somewhere in the 1.8CE version since I´ve been using it and my meshes keep on dissapearing.

___________________

I´ve a problem with your files, and i cant make it run.

The .exe seems corrupted....
Winrar shows and error if I try to execute directly from the zip too. ( I know this would not work, but...)

Has anyone been able to make this utility work?¿¿?¿

___________________

bye bye

Evak

16-04-2007 16:18:29

I had a quick look. It's a dos thing I think. It won't find a path like your desktop it it has long filenames in, like Documents and settings

Sick it in a folder on C: or something c:\meshupdater

That worked for me

Paulov

16-04-2007 17:38:57

HI

I´ve tried the C:meshupdater...

And gives me the same error.

"no se pudo iniciar la aplicación porque su configuración es incorrecta. Reinstalar la aplicación puede solucionar el problema."

"the app could not be ran because your configuration is incorrect. Reinstalling the aplication may solve the problem"

I´ve rund the file in my mothers pc and gives the same error.

Both PCs are running win XP.
Could be a language problem?¿ my pcs ar in Spanish.


:(

Evak

16-04-2007 18:02:38

I don't know. I just tried it with various mesh files, some from old demos off of the ogre forums and I have no errors.

Make sure you copy the files you want to convert over to the same directory as the meshupdater and drop a single file over the .bat file

if you get an error look at the Ogremeshupgrade.log file it should give you an idea of what is wrong.

If I put the files in: C:\Documents and Settings\ANT\Desktop\Meshupdater

I get an error.

09:54:52: Creating resource group General
09:54:52: Creating resource group Internal
09:54:52: Creating resource group Autodetect
09:54:52: Registering ResourceManager for type Material
09:54:52: Registering ResourceManager for type Skeleton
09:54:52: Registering ResourceManager for type Mesh
09:54:52: OGRE EXCEPTION(6:FileNotFoundException): File C:\Documents not found. in OgreMeshUpgrade at ..\src\main.cpp (line 925)


Here's the log I get when I drag an old player character from a previous ogre version. Using the meshupdater in C:\meshupdater

This file works ok with correct bounding box etc.

09:59:29: Creating resource group General
09:59:29: Creating resource group Internal
09:59:29: Creating resource group Autodetect
09:59:29: Registering ResourceManager for type Material
09:59:29: Registering ResourceManager for type Skeleton
09:59:29: Registering ResourceManager for type Mesh
09:59:29: Warning: VET_COLOUR element type is deprecated, you should use one of the more specific types to indicate the byte order. Use OgreMeshUpgrade on conversion as soon as possible.
09:59:29: Warning: VET_COLOUR element type is deprecated, you should use one of the more specific types to indicate the byte order. Use OgreMeshUpgrade on conversion as soon as possible.
09:59:29: Warning: VET_COLOUR element type is deprecated, you should use one of the more specific types to indicate the byte order. Use OgreMeshUpgrade on conversion as soon as possible.
09:59:30: WARNING: conversion is an older format ([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.
09:59:30: MeshSerializer writing mesh data to D:\Meshupdater\Player.mesh...
09:59:30: File header written.
09:59:30: Writing mesh data...
09:59:30: Writing submesh...
09:59:30: Exporting submesh texture aliases...
09:59:30: Submesh texture aliases exported.
09:59:30: Submesh exported.
09:59:30: Writing submesh...
09:59:30: Exporting submesh texture aliases...
09:59:30: Submesh texture aliases exported.
09:59:30: Submesh exported.
09:59:30: Writing submesh...
09:59:30: Exporting submesh texture aliases...
09:59:30: Submesh texture aliases exported.
09:59:30: Submesh exported.
09:59:30: Exporting bounds information....
09:59:30: Bounds information exported.
09:59:30: Exporting submesh name table...
09:59:30: Submesh name table exported.
09:59:30: Exporting edge lists...
09:59:30: Edge lists exported
09:59:30: Mesh data exported.
09:59:30: MeshSerializer export successful.
09:59:30: Unregistering ResourceManager for type Mesh
09:59:30: Unregistering ResourceManager for type Skeleton
09:59:30: Unregistering ResourceManager for type Material

Paulov

16-04-2007 22:30:59

Hi

Well, I see no log. Where should it be located?¿

I´ve not found it nor in C: nor in the Program directory.

Here a shot of the folder and the DOS window when dragging a .mesh over the .bat file.




bye bye

Evak

16-04-2007 23:16:59

Hmm I really don't know, it should create the OgreMeshUpgrade.log log file after you drop your ea-36.mesh file on the resetAABB.bat file.

Perhaps it only works on the english language version of windows, like you suggested earlier :(

mrfalken

17-04-2007 09:26:18

I had the same problem with your exe, and I had to rebuild it myself, that's why I linked the .cpp file... ;)

Maybe it's something about with your compiler...don't know, but if you take the source and rebuild it yourself, I swear it works... :)

Paulov

17-04-2007 11:37:05

Hello.

I passed the file to a friend and also had the same error.

Hey Mr falkend could you provide me your executable file? please. I´ve no idea on how to compile anything

you can use a file sender like this one:

http://www.yousendit.com/

I need to capture video of my lastest visualization, and the meshes dissapear, showing a very nasty effect.

Thank you.

bye byee.

mrfalken

17-04-2007 13:12:54

Here you are...

http://files-upload.com/it/171633/OgreMeshUpgrade.exe.html

...remember you have to use it with the last (1.4) version of Ogre...cheers... :)

Evak

17-04-2007 17:08:56

hmmm, interesting, it was compiled with vc2005, perhaps it needs the net framework or XP SP2 etc. Sorry it doesn't work for everyone :(

Paulov

18-04-2007 16:29:14

:( :( :( :( :(


the new exe also does not work






Hope a patch for oFusion is released soon. :wink:

bye bye

Lioric

18-04-2007 16:52:48

The problem with that application is that probably it was compiled with VC2005 with SP1 and you need the VC SP1 runtime libraries installed in your machine

In the main Ogre forum there is a thread for the "Bullet" system with a link for the runtime install package

Evak

18-04-2007 20:03:04

Ah here's the redistro installer Lioric mentioned, its 2.5mb

http://www.apachelounge.com/download/vc ... 86-sp1.exe

Paulov

19-04-2007 22:56:49

2x :(

still does not work.

Now a new error mesage is shown



something like:

The entry ponit for procedure "getMemoryUsage@ResourceManager@Ogre@@UBBIXZ en the dynamic link library OgreMain.dll"

Another bad day.... :cry:

Lioric

20-04-2007 03:13:03

You are using a different OgreMain.dll (a different version) file from what the MeshUpgrader tool was compiled with

Is the OgreMain.dll file provided with the MeshUpgrader?

mrfalken

20-04-2007 10:16:45


The entry ponit for procedure "getMemoryUsage@ResourceManager@Ogre@@UBBIXZ en the dynamic link library OgreMain.dll"


...as I told you, you have to use 1.4 final version of Ogre, to use my binary... ;)

Paulov

20-04-2007 13:11:47

Hello.:..:::...


...as I told you, you have to use 1.4 final version of Ogre, to use my binary... Wink


OOps. sorry>> you where right... Now it starts to "work". But still something fails.

I get the following log message:
13:46:47: Creating resource group General
13:46:47: Creating resource group Internal
13:46:47: Creating resource group Autodetect
13:46:47: Registering ResourceManager for type Material
13:46:47: Registering ResourceManager for type Skeleton
13:46:47: Registering ResourceManager for type Mesh
13:46:47: WARNING: conversion is an older format ([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.


I feel a bit lost when I see the warning message, since I understand from it that I need to upgrade my meshes using the app that I´m actually using to do that... no?....




byeee.

mrfalken

20-04-2007 16:00:55


([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool


Nevermind this warning...check your "newly bounded" meshes...now they should work... ;)

Evak

20-04-2007 17:56:28

Ignore the warning, if you put the newly created mesh through the mesh updater again, you will see the warning is no longer there. The warning is just telling you the old mesh was bad before you upgraded.

Paulov

20-04-2007 19:11:32

mmm

ok, but the only option shown in the DOS window is, "pres any key to continue" when I press any key, the window closes and no .mesh is created or updated, since the creation-modification dates keep on being the same.

I´ve looked also in places like C: and have seen nothing.... and the .log reveals nothing.... just the mesage posted before....

Everything keeps equal.

:roll:

Evak

20-04-2007 20:06:14

Can't really help much, I'm an artist too, it works here with no problems whatsoever, the date changes when I run it through. I get the same warning as you about the version, but thats normal.

12:02:43: Creating resource group General
12:02:43: Creating resource group Internal
12:02:43: Creating resource group Autodetect
12:02:43: Registering ResourceManager for type Material
12:02:43: Registering ResourceManager for type Skeleton
12:02:43: Registering ResourceManager for type Mesh
12:02:43: Warning: VET_COLOUR element type is deprecated, you should use one of the more specific types to indicate the byte order. Use OgreMeshUpgrade on conversion as soon as possible.
12:02:43: Warning: VET_COLOUR element type is deprecated, you should use one of the more specific types to indicate the byte order. Use OgreMeshUpgrade on conversion as soon as possible.
12:02:43: WARNING: conversion is an older format ([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.
12:02:43: MeshSerializer writing mesh data to C:\Meshupdater\Prop.mesh...
12:02:43: File header written.
12:02:43: Writing mesh data...
12:02:43: Writing submesh...
12:02:43: Exporting submesh texture aliases...
12:02:43: Submesh texture aliases exported.
12:02:43: Submesh exported.
12:02:43: Writing submesh...
12:02:43: Exporting submesh texture aliases...
12:02:43: Submesh texture aliases exported.
12:02:43: Submesh exported.
12:02:43: Exporting bounds information....
12:02:43: Bounds information exported.
12:02:43: Exporting submesh name table...
12:02:43: Submesh name table exported.
12:02:43: Exporting edge lists...
12:02:43: Edge lists exported
12:02:43: Mesh data exported.
12:02:43: MeshSerializer export successful.
12:02:43: Unregistering ResourceManager for type Mesh
12:02:43: Unregistering ResourceManager for type Skeleton
12:02:43: Unregistering ResourceManager for type Material


Don't really know what to suggest except get your coder, if you have one on your team to compile it for you and sort it out. The meshupdater is in the full CVS build, if you browse the SDK in HTML it's here:

http://ogre.cvs.sourceforge.net/ogre/ogrenew/Tools/MeshUpgrader

None of the people on our team has trouble with the version I posted.

samsaga2

10-05-2007 13:41:56

The OgreMeshUpgrade solution is a good thing but I have one problem:

$ OgreMeshUpgrade -b mymesh.mesh

Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
Registering ResourceManager for type Material
Registering ResourceManager for type Skeleton
Registering ResourceManager for type Mesh
OgreMeshUpgrade: ../../OgreMain/include/OgreAxisAlignedBox.h:239: void Ogre::AxisAlignedBox::setExtents(const Ogre::Vector3&, const Ogre::Vector3&): Assertion `(min.x
<= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to maximum corner"' failed

Paulov

10-05-2007 13:49:29

Hello>


Sorry for answerint a bit late*:

I finally managed everything work:

THe converter worked²*
The meshes now dont dissapear.


Thanks alll!!!

-------------------------
* I´ve answered " a bit late" because when I made the updater work, I realised that we finally built the sceneloader under Dagon, trying to aboid the mesh dissapearing ( but the meshes still did dissapear). I reallised that when placing the updated meshes in the correct directory and having nothing rendered in the window but the background.

Now, rebuilded with Eithort and with the meshes updated everythings works fine.


²* The converter worked after the
http://www.apachelounge.com/download/vc ... 86-sp1.exe
was installed, note that it worked even with the first Meshupgrader that didnt work for me.
The problem is that I cant update the meshes in "bath" mode, I have to drag&drop each mesh over the bat and then it gets upgraded, but it works.


bye & thanks.

aneuryzma

15-06-2007 09:33:59

is it possible to copy multiple meshes on the .bat file ???
or just one each time ? it seems don't work if I move more than 1 mesh at time..

syedhs

22-06-2007 06:04:06

I dont know if you are still reading this, but the answer is yes. Create a text file file (eg update.bat) and enter the following:-

lfnfor off
for %%x in (.\mesh\*.mesh) do OgreMeshUpgrade -b -e %%x


The code above will upgrade all meshes located in .\mesh folder. The option -b is to recalculate the bounding box and -e is not to include edge list which is only necessary in Stencil Shadow.

murderv

27-06-2007 16:42:25

hello,

i just got the main.cpp and compiled it for eihort..
i dont get any of these errors ive seen here..
the application runs and it just crashes:
this is the OgreMeshUpgrade.log information

---
16:32:29: Creating resource group General
16:32:29: Creating resource group Internal
16:32:29: Creating resource group Autodetect
16:32:29: Registering ResourceManager for type Material
16:32:29: Registering ResourceManager for type Skeleton
16:32:29: Registering ResourceManager for type Mesh
---

i cant see what could be doing wrong..

im still getting the wrong lighting..
any idea ?

murderv

27-06-2007 16:58:28

no need to worry about last post.. i have fixed the crash..
BUT the lighting is still wrong..
it doesnt seem to fix anything..

it looks exactly the same before and after i do the upgrade ??

one thing ive noticed is that if i invert my Lights Y axis the lighting works out..
but i shouldnt have to do this manually..

any ideas on this ??

Captain_Deathbeard

13-07-2007 03:13:45

I am having lighting issues too, the upgrader fixes the bounding box but the model is still permanently dark on one side, as if lighting was baked into the texture.

Lioric

13-07-2007 17:09:41

Is your model scaled?

If it is, use the 'setNormalizeNormals' method in your application or set the current scale to the unit scale before exporting the object

Captain_Deathbeard

13-07-2007 17:49:30

no, it is not scaled
it happens regardless of what material I assign to it.

jwatte

15-07-2007 14:09:58

I have worse problems. It seems that meshes exported by oFusion CE will crash the latest version of Ogre (1.4.3) with an assert about bad bounding boxes. This is even after having upgraded the meshes with the OgreMeshUpdate tool.

Does this have anything to do with the bad range on the bounding box display in the oFusion viewport that I reported on oFusion CE a while back?

Captain_Deathbeard

15-07-2007 17:35:52

jwatte: did you use the the meshupgrader on page 1 of this thread? That fixes it.

jwatte

15-07-2007 22:30:13

Ah, so that's different from the latest released MeshUpgrade. How confusing. Did anyone try to send the new binary to the downloads page, to update the current archive?

Btw: oFusion CE still doesn't show skinned characters...

Evak

25-07-2007 07:45:16

I updated my archive with a new batcher EXE.

http://www.kineticrealities.com/Meshupdater.zip

You don't need to have the mesh file in the same folder as the EXE for this one. You can drag and drop any old mesh file on the batcher exe. Or you can add the batcher to your Open with.... (Right click menu in windows explorer).

If you add it to your right click menu, then you can select a .mesh file anywhere on your computer HD with Right mouse button and load it with the batcher, you will be asked if you want to convert all meshes in the same folder. If you select yes then ALL the mesh files will be updated to 1.4 and thats it :)

It does the -b flag too, so no need to worry there.
You still need XP with SP1 for it to work.

Paulov

25-07-2007 13:27:26

OH Evak

wonderfulll..

The other one didnt work with the batch to me...

This one works pefectly, I drop one file and after it prompts me if I want to do the same with the others, click yes... wait some seconds... we´re done.

FANTASTIC!!!!

I hate loosing time in tasks that can be automated... THANKS A LOT!.

PDX

12-10-2007 03:42:16

I've been told by the coders on my project that I have to use the OgreMeshUpgrade tool on some of my art. It's geometry that looks wrong in both oFusion and our app.

Now, it seems like the OgreMeshUpgrade tool affects .mesh files post-export, before loading the .mesh file into the app. That's fine, but what about the geometry that I'm seeing in the oFusion viewer? How do I apply the OgreMeshUpgrade to that? Or should I, as someone with oFusion Pro, already have the fixes provided by OgreMeshUpgrade?

Make sense? 'Cause I'm a little lost :)