Grouping objects and resetXForm

Layre

20-06-2006 02:10:15

Hi,

From what I've been working on, I've encountered some oddities with objects being transformed right in Max but look funny in Ogre. In this case, I use the ResetXForm and for the most part, everything is snapped back to normal. However, problems arise when I "group" my objects.

But.... in the case of "group"-ing, I can't use ResetXForm and instead, use Hierarchy->Pivot->Reset Pivot (or in the Reset Group, pressing "Transform"). However, nothing seems to matter. The only way to get them to look normal is to ungroup my objects. Surely, there must be a better way? I did do a search and read something about the oFusion kit having a problem with groups but said there was a fix coming (this was a post from Feb. 06). Anything come of that?

I'd like to add then when I import my grouped object, it looks fine at first. It's only after I move and/or rotate it that the parts begin to shift. In this case, ResetPivot does nothing.

Is there any other solution other than ungrouping my objects? Like I said, I've tried ResetPivot and Reset Transform but nothing works.

Ungrouped objects on the other hand, all work fine.

Layre

20-06-2006 13:22:20

Just to be sure that I haven't missed something...here's exactly what I've tried doing....


1) I've modeled my object (i.e. Stadium Light set). First, I tried simply grouping all of the objects into a single group. While this works perfectly for me inside Max - the Ogre Viewport/oFusion viewport seems to destroy the object as I move it. Since it is in a group, ResetXForm doesn't work (it's disabled). So I've tried using the Hierarchy->Pivot->Reset Pivot, and Reset Transform but nothing seems to work for oFusion.

2) I went back to my Stadium Lights object, deleted the group and linked everything up (like one would do with a bone structure). Then tied everything to a dummy object. Again, everything works fine in Max but oFusion/Ogre destroys the object as I move and/or rotate it. However, since this is not a group I can use ResetXForm. Upon pressing this button, the object snaps back together looking correct - BUT - it no longer moves and scales or rotates to what I need. Instead, it just sits there at 0,0,0. And once again, in Max, everything looks as it should be but in the Ogre Viewport it doesn't.

Now - does the current release of oFusion support "Group"-ed objects?

What I've got is a simple race track and I'm bringing in external models (such as stadium lights, buildings etc...) - what is the ideal way of doing this operation that Ogre/oFusion will better digest?

....and if I've missed something in the docs, please just point me in the right direction instead of flaming.

Layre

20-06-2006 14:03:22

I've got the Ogre Viewport to Auto-Update (and Clear before Update) and I've noticed that when I finally get a model to look correct in the viewport (because with the auto-update on, I can see it snap to the right position). However, forgetting that I had this on - I had selected the manual "Update" switch and suddenly the whole model went to hell again.

Once I noticed this, every subsequent time I select "Update" the model pieces get further and further apart. This happens even with the auto-update off.

Could this be a problem with the viewport and not with the mesh?

Lioric

20-06-2006 18:05:10

This thread has more details and hints that might help with your issues

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=1282&highlight=groups

The "Auto Update mesh" option should be enabled only if you are working with the geometry, and disabled if not (Use only when needed)

If you mean the "Auto update Scene on start", is for updating the complete scene when the viewport it is activated

Layre

21-06-2006 11:46:54

Hi Lioric - yes, I've read that thread before but thanks.

Actually , my problem was that I was relying too much on what the Ogre Viewport was telling me. Because when I exported the scene as-is and loaded it up into the game, it looked just fine. Despite the Ogre Viewport showing me that the models were disjointed and in pieces.

Regretfully, I can't seem to rely on the Ogre Viewport at this point simply because the models (in my case) were just fine (in the game and in max) but surely didn't look right in the Ogre viewport. Secondly, each time I selected "Update" - the viewport would always re-apply the transforms at an exponential rate - rather than clearing it's transform stack before drawing.
Therefore, the model would look just fine for update 1, but next update the pieces would become disjointed, next update they would grow even further apart. Like some sort of accumalative transform being applied.

Lastly, when using "grouped" objects, that seems to produce "unhandled exceptions" during scene export, so I've stopped using them. Instead, I just construct a standard hiearchichal link and that seems to work fine.

When I have "Auto-Update" (and "Clear") enabled, that doesn't seem to work entirely either as I would often be left with a scene that either didn't update itself or didn't update itself entirely.

I am able to move on working but without using the Ogre viewport.

Don't get me wrong, I'm not slaming the product, oFusion is a fantastic scene library. I know from experience that trying to produce tools like this isn't easy and working with Max can be frustrating at best. Good job.

Evak

21-06-2006 16:23:49

Biggest problem with ofusion right now is that most people are using a old version. The newer version 9/10 times doesn't require you to use reset xform at all. And mostly if your importing old media that was previously scaled in max and therefor doesn't match the system unit scale.

I hope a new community version gets released soon, since the current CE version is a headache to work with, and slows you down tremendously.

Lioric

21-06-2006 17:45:43

The "Auto update" feature is "Auto Update on scene start", please read the documentation, this is a relevant part:


The real-time oFusion viewport is implemented in an asynchronous way with respect to the max scene contents. It can contain all of the max scene contents, just a part of the current max scene contents or totally different data.

Paulov

22-06-2006 12:17:01

Biggest problem with ofusion right now is that most people are using a old version

there is a post about fixes etc, if the problems comes from an outdated version --> http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=1402

now looking inside of it dont see the link i downloaded a fix from.... search for it in the forum.

What Layre sais sounds interesting, works fine in Max viewport & in the game, but doesnt in the oFusion viewport.

posible causes I see
1) oFusion could have a bug
2) your installation could be corrupted.

solutions
1) whait for newer releases
2) try to reinstall it.

Evak

22-06-2006 18:34:40

some discrepancies may also be due to a lot of people using Dagon, Ogre1.2 whilst Ofusion uses an older version of Ogre in the Max viewports.

Layre

22-06-2006 19:19:10

Sounds plausible to me Evak - that could very well be the problem.