Lightwave converter

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
dennis
Gremlin
Posts: 157
Joined: Mon Nov 11, 2002 4:21 pm
x 3

Post by dennis »

Compatibility with Ogre 1.0 fixed.
User avatar
dennis
Gremlin
Posts: 157
Joined: Mon Nov 11, 2002 4:21 pm
x 3

Post by dennis »

It seems texture coordinates are mandatory for a mesh that is going to be exported. Why is that?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

No, they are not mandatory. Can you explain why you think they are?
User avatar
dennis
Gremlin
Posts: 157
Joined: Mon Nov 11, 2002 4:21 pm
x 3

Post by dennis »

Well ... they are when you want to build tangent vectors. DOH!

Normals can also be omitted when exporting a mesh ... but using the resulting mesh causes a crash.
User avatar
dennis
Gremlin
Posts: 157
Joined: Mon Nov 11, 2002 4:21 pm
x 3

Post by dennis »

Can I just add vertexbuffer elements as I go along or do I have to copy the data to a new VertexData once I have started putting data into the existing vertexbuffer elements?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

You can build it up as you go; until you come to use it as a whole it can be temporarily inconsistent.
User avatar
dennis
Gremlin
Posts: 157
Joined: Mon Nov 11, 2002 4:21 pm
x 3

Post by dennis »

Use:

Code: Select all

ARGB color = ColourValue(red, green, blue, alpha).getAsARGB();
instead of:

Code: Select all

RGBA color = ColourValue(alpha, red, green, blue).getAsRGBA();
to get the colourvalues in the vertexBuffer.
Image
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Is this still the preferred (or even correct) way to convert Lightwave .obj/.mtl files into .mesh/.material?
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

NM, I discovered the answer.

BTW, I had to make some changes to the code to get it to build; it was doing things like looking for OgreDataChunk.h -- not sure how old that is but it certainly doesn't exist anywhere. Also, it wasn't using the manager singletons to create objects. Again, that sounds old to me, but the code I have is from the 1.0 dist.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

I should also have asked, is there a way to convert .obj into .mesh? Lightwave ignoramus here....
User avatar
dennis
Gremlin
Posts: 157
Joined: Mon Nov 11, 2002 4:21 pm
x 3

Post by dennis »

Well for converting Lightwave objects to Ogre meshes this is you best bet.
Not using the manager singletons ? :?

And you're right it does need updating (or committing to CVS). I'll do that when I am certain my experimental way of dealing with vertexbuffers works. My dev machine died on me. Hopefully I'll have another set up within a week.

Here's my latest backup: LightwaveConverter Source I can't even guarantee it will compile as is. Let me know.
Zen Ken
Gnoblar
Posts: 17
Joined: Mon Feb 21, 2005 7:54 pm

Post by Zen Ken »

Dumb question.. but how do I get the Converter to work? Is there a default directory that it puts the resulting file in?

Ken
Zen Ken
Gnoblar
Posts: 17
Joined: Mon Feb 21, 2005 7:54 pm

Post by Zen Ken »

Nevermind... major major brainfart. :)

-Ken
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: Lightwave converter

Post by spacegaier »

I know this thread is really, really old, but nonetheless:

I just submitted a patch to get this (currently broken) tool back on the road. With my changes it now works with Ogre 1.7 and current Ogre 1.8. Also I either resolved or supressed all warnings.

https://sourceforge.net/tracker/?func=d ... id=1064241
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
dennis
Gremlin
Posts: 157
Joined: Mon Nov 11, 2002 4:21 pm
x 3

Lightwave converter

Post by dennis »

I just read a PM over 2 years old requesting the source of the converter.

The source, though ancient, is still in the Ogre repository:
https://bitbucket.org/sinbad/ogre/src/0 ... Converter/

Ah, it also seems that Newtek did not update the documentation for the LWO2 format in the SDK since November 9, 2001!
I know this file format is supposed to be the most stable around, but no changes in 11 years?! I seriously doubt that.