Rasmus Agerholm wrote:

Warning... long mail ahead...
Great, thank you.

Sorry, forgot to tell you that after configure you should run
Common/prep_gv_beta :)
Well, next time... ;)

The blackness (total lack of textures I would guess) is probably caused
by the loader's inability to find the textures. If this is the case, it
can be solved by executing the example in the chopper directory (the
texture paths are relative).
Yep, that's it, the chopper is textured now.

Why the chopper isn't moving... hmmm... the example made a log file
(log.txt) which may have some answers, can you send that to me off the
list (off course you're welcome to have a look in there as well ;-) )
As .gz, it has only 1,8kb so I send it to the list. There are a lot of "No of sensors = 0" Messages and the nodes seem to be always up to date.

No, not quite. Well, IIRC the VRML loader doesn't support inline files,
so you have to save everything in one file. But all animations in VRML
can be independent of each other and only dependent on the same sensor,
eg. time sensor. When our artist exports stuff from Max to VRML
everything tends to be controlled by a single time sensor, but I guess
that the artist can control if there should be more sensors.
Yes, it is possible to create more than one TimeSensor (Create->Helpers->VRML97->TimeSensor). I'll try to find out how to use it....

Here goes (one possible way):
I will check this, thank you.

What needs to be done is baking all animations into keyframe animations
and then exported to VRML. Then you have one file with possibly multible
animations and a number of sensors (at least one).

Before loading the file you register all sensor types:

Hm. Is there anything similar in the example file (or is this another way)? And, uh (this seems to be a dummy question...), where can I get the _aspect?

// register all sensor types
OSG::FieldContainerType *fct;
for (OSG::UInt32 i = 0; i < OSG::TypeFactory::the()->getNumTypes(); ++i)
{
 fct = OSG::FieldContainerFactory::the()->findType(i);
 if(fct &&
    (fct->isDerivedFrom(OSG::Sensor::getClassType())))
 {
   _aspect->registerCreated(
                    *fct,
                    OSG::osgTypedMethodFunctor2ObjPtrCPtrRef
                    <bool, YourClass,
                    OSG::FieldContainerPtr, OSG::RemoteAspect *
                    >(this, &YourClass::createdFunction));
 }
}
Regards,
Dominik

Attachment: log.txt.gz
Description: GNU Zip compressed data

Reply via email to