Lightwave to Ogre3D 1.0.1 - source opened

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
GPM
Halfling
Posts: 42
Joined: Thu Aug 10, 2006 12:08 am

Post by GPM »

I still am getting inconsistent results exporting objects with heirachy (parented). Some export UVs others dont. The work around has been to remove the object from the heirachy.

When I export the object in this heirachy I get not UV coord.

If I export this object not parented, I get UV coords.
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

There is no relation between Vertex Map and the fact that an object as a parent or not, but could be something I'm not thinking about.

Can you provide a test case ?
GPM
Halfling
Posts: 42
Joined: Thu Aug 10, 2006 12:08 am

Post by GPM »

I will try to provide a case and PM you. I have some large scenes; not sure if that is causing the problems or not. The beta.05 exporter, although somewhat limited, was a lot more stable.

I am not having any big problems other than the UV sometimes get generated and other times they don't. It has never been a problem in the past.
Last edited by GPM on Thu Apr 12, 2007 10:16 pm, edited 1 time in total.
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

Using large scenes should not be a problem. Everything is possible but if uvs are exported for a model one time will be exported the next time, i'm not storing any model data. But still possible to have a bug somewhere, I have to see it to be able to fix it.

This version has been rewritten from scratch, and has not yet been used on large scale projects, there may be bugs remaining, that's why it's not yet a 1.0, but near :)

Last testcase you provided, it turned out that what you was describing was working here, either when using your .mesh directly or exporting your source model. I had the same result in my viewer, the same result as in Lightwave, both textures were visible.

The beta.05 exporter, although somewhat limited, was a lot more stable.
That was an embryo of plugin, it has grown and is now a real plugin. You are still free to use the old one.

I am not having any big problems other than
Does that me your have also other problems ? or no other problem ?




Thank you for your feedback.
GPM
Halfling
Posts: 42
Joined: Thu Aug 10, 2006 12:08 am

Post by GPM »

V 0.9.8
Exporting the base mesh from the test case I provided works when I skip submeshes in some cases. I stilll have some objects that don't export uv coords. I am not sure why they won't export. Sometimes I can move the object up in the heirarchy and it will export the UVs. Sometimes I move it up in the heirarchy and UVs will not export.

I tried to create a test example to duplicate these effects and could not reproduce the errors. I am not sure where the problem is. The most problematic modela are a characters with bone animation. These will export everything: skeletons, morphs - perfectly :D , but the UVs are not generated at all.

I haven't used the scene exporter that much yet, so I will have to report back on that.

The only other thing I see is that when you save a scene with the plugin, then reload that scene, you are prompted for the plugin (Plugin Missing), even if you havigate to the correct location you are still prompted for it's location.

I would like to add that the morph animation export is a great improvement on this tool.
trash_bin
Gnoblar
Posts: 4
Joined: Tue Apr 17, 2007 7:22 pm

Post by trash_bin »

Hi, I'm a new voice in this topic, but I've been tracking it since version 0.5 and I have to say 'man, good work' :) I have tried betas 0.5, 0.9.6 and 0.9.8 (all with LW9) and the progress is awesome :)

But there is a scratch on my glass, though :/ Maybe I'm a dumbass, I dunno, but I kinda can't make my skeleton anims to work :/ I know this subject was mentioned here earlier, but for some time it wasn't 'on the display', so I wanna ask (don't hit me :] ): is exporting the skeleton animations working correctly? 'Casuse when I try to export more than one, then in exported mesh/skeleton there are all of them, but they don't play at all :/ As if all anims have different names, but all have the same bone transformations in them (I know u know what I mean :D)

When i saw version 0.9.8 I was anxious to test skeleton animations and... bummer :) And please, remind me, are Motion Mixer animations working or did you leave them for 1.0 release ? :)

Again, big thnx to you, P :) You made a simple man's life a LOT simpler :)
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

@GPM:

I have to look at this "Plugin Missing" problem when loading a scene which has been saved with the plugin active, I was planning to do it soon because I want to implement the animation settings saved inside the scene.


@trash_bin:

Thanks for the nice comments :)

It's possible that multiple animations export doesn't work. I will check it.

If you could upload your object and scene somewhere , that would make my life simpler.

The problem about Motion Mixer animations is that I can't access the start and end frame of them using the SDK. I was wanting to implement this feature but I have yet to find how to do it ( if it's possible ).


I'm also working on a Mesh tool, one of the features being to merge animations. If the option of using Motion Mixer animations isn't possible, that would allow to have one scene per animation, and merge them later.

It will be available soon..

EDIT : I will run more tests and look again at the UV problem to try to see if I can reproduce it.
GPM
Halfling
Posts: 42
Joined: Thu Aug 10, 2006 12:08 am

Post by GPM »

Bug: Pose Animation name update: Once an animation name is entered such as "smile", then the name is changed to "blink" (old "smile") using the update button. If try and enter another animation named "smile" a message stating that this animation already exists. This animation "blink" (old "smile") cannot be removed either. The work around is to remove the plugin from the master panel and start over.
trash_bin
Gnoblar
Posts: 4
Joined: Tue Apr 17, 2007 7:22 pm

Post by trash_bin »

Ok, I uploaded a test object and scene files here:

test_files.zip

Not much of 3DGFX, I know, but it's only a test :) There are also files created by your plugin included in the archive as well as log file :)

I noticed a strange behavior and maybe that will point u to solution of this bug :) As u can see in the archive, rabithead has five animations; first four of them are 20 frames long, the last one is 40 frames long (u can see them in layout). The strange thing I noticed is, that in exported mesh/skeleton those four animations look identical, but the fifth one... :twisted: Fith one (that one 40 frames long) looks like it was made of the first AND second animation, one after another :) So my guess is, when the plugin scans transformations, it does not take "startframe" value into consideration, it only subtracts this value from "endframe" value, thus calculating length of the animation, but starts to scan it from frame 0 :)

I would assume something like this:

Code: Select all

length = endFrame - startFrame

for(i = 0; i < length; i += step)
{ ... all the fancy bone/vertex scanning... }
And in this for loop (or any other) maybe you're starting from frame "0" (or some kind of container iterator->first(), dunno how it's implemented in LW :) ) and not from actual startFrame :)
I know it's a long shot, but u know, sometimes the devil is in the details :)

Whether I guessed right or not, I hope those files will help u make this awesome plugin... more... awesome :D
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

Thank you for the feedback, I will try all of that and make an update as quick as possible.
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

Just a quick update in case of you need it to work as soon as possible :

You can get it here lw2ogre0.9.8b ( last link on the page ).

It should adress :
- problem when updating the name of animations
- animation time range uncorrect when exporting several skeletal animations

I haven't changed the version, only tagged it beta, and just tested it quickly, some real life issues put me away of that until next week.

Hope it helps.

Cheers.
trash_bin
Gnoblar
Posts: 4
Joined: Tue Apr 17, 2007 7:22 pm

Post by trash_bin »

Great, animations work superb now :) Thank u for that, it's a great help :)

Buuuuutttt..... :twisted: I was thinking, will it be possible, to export specular textures/uv's? I tried to export one, but in material file there was a uv for diffuse, but my spec was gone :) Not a big unconvenience, but if it won't be too much trouble... :D

I'm looking forward to see, what will the next version bring :)
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

It is absolutly possible to export an uv map used by a specular texture, in fact the exporter doesn't take in account if the uv map is used by a texture or not. If the vertices are inside the Texture Map, it will try to export it, using the Vertex Map Policy you have chosen in the options.

Now for exporting per pixel specularity, it's a bit more complex as it requires a Pixel Shader, and there is not one way to write one. I may provide few pixel shaders and so options to be able to translate more surface properties in the future, but it's not my priority.

You can look here for an example of shader using one texture for several effects : http://www.ogre3d.org/phpBB2/viewtopic. ... ght=shader
trash_bin
Gnoblar
Posts: 4
Joined: Tue Apr 17, 2007 7:22 pm

Post by trash_bin »

Thnx for the info and link :)

So i guess I have to write my own shaders, if I want to texture part of the object with tilling texture I suppose? For example, I wanna build a terrain geometry witch is uv-mapped, but for some reason I want parts of this mesh (like roads or so) textured with tilled image? I think in 0.9.6 that feature didn't work (it omitted texture with no uv's, only simple planar image mapping), but i'm not sure and I didn't check it in the newest version yet :) Just asking :)
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

That's true that is something I haven't spoken about in the manual ! But only UV projection is supported, and will be supported.

In realtime 3D you have to use an uvmap to "place" a texture on a model, I could write something to create one automatically from the other projection types, like planar, spherical and so on ( and that is what is done in Lightwave internals to show you the result of these projection types in the viewport ) but that would make very little sense since you can create a Texture Map using these projection types in Lightwave.

You can repeat a texture using uvs, just by scaling them outside the [0;1] range.
Kodachi_Garou
Kobold
Posts: 34
Joined: Wed Jul 05, 2006 6:07 pm

Post by Kodachi_Garou »

Hi all,

I've been experimenting with the new versions of the LWO exporter and I've come across a problem for non-loop animations. For instance, an animation which starts at frame 1 and ends at frame 100, when played in Ogre, it seems that the animation in the end jumps back to frame 1. Meaning that the exporter seems to do a wrap-around at the end.

I've tried with the Ogre example animations and this issue never happens, and also in Lightwave the animation plays fine, so it seems to be something to do with the exporter.

I've messed around with the options but I didn't find anything that seemed to be relevant.

Does anyone have any hint as to what might be happening?
Kodachi_Garou
Kobold
Posts: 34
Joined: Wed Jul 05, 2006 6:07 pm

Post by Kodachi_Garou »

Ok, I got it.

Apparently, if you sample the animation this bug happens, and the last keyframe created will correspond to the first animation frame. When I turned the sampling interval to 0, it did fine. However, is this expected behaviour for sampled animations?

Thanks,
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

It is not of course, I will check it.
GPM
Halfling
Posts: 42
Joined: Thu Aug 10, 2006 12:08 am

Position and Rotation

Post by GPM »

I was comparing an old (Beta) and new scene file and noticed that the some of the rotations were different and the camera's Z-position is no longer the negative of what it is in LightWave.

Why is it done this way now?
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

I will check it.

Any chance that you have been able to reproduce the uv problem you spoke about a while ago ?
GPM
Halfling
Posts: 42
Joined: Thu Aug 10, 2006 12:08 am

Post by GPM »

I am stilll having the problems. i will try to reproduce and email you the content to test.
GPM
Halfling
Posts: 42
Joined: Thu Aug 10, 2006 12:08 am

UV Issues - Solved

Post by GPM »

Ok, I have it figurered out. If there is more than 1 object in the scene with with a UV map name that is the same, the exporter will not export UVs for those objects, unless they are using the same map.
For example, I have two characters, each with a UV map name of "Head".

The old exporter let these instances go, the new one will not tolerate this.
warmi
Gnoll
Posts: 674
Joined: Sun May 27, 2007 3:56 am
Location: USA

IK

Post by warmi »

Any plans for IK support ?

I was planning to write one myself but this one looks excellent and the only missing thing is IK.


Thanks
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

Sorry to be long to reply.


@GPM :

I'm not able to reproduce that. I created 2 boxes, both use a TextureMap named "Texture", but they use a different material, each one using a different texture, and uvs are created correctly. I tried both with single and multiple meshes export.
Maybe you could send me your testcase ?

Concerning scene export, that was a mistake of mine, I had forgotten the coordinate system conversion from left to right hand as it's necessary. It's done and will be available in the next version.


@Kodachi_Garou :

There was indeed a bug with the last keyframe, it will be resolved in the next version.


@warmi :

Ogre doesn't support IK at this time.
warmi
Gnoll
Posts: 674
Joined: Sun May 27, 2007 3:56 am
Location: USA

Post by warmi »

I know that Ogre doesn't support IK :-) ... what I meant is adding functionality to the plugin itself to be able to record IK based animations without having to bake it first.
Post Reply