3D objects in krpano

  • Hi all,

    I'm trying to place an swf inside a pano that contains a 3D object (created using the Papervision3D library.)

    This simple swf, http://threelamps.com/test.swf , works just fine to add as a plugin or hotspot.
    However, this swf, http://threelamps.com/test_3d.swf , whose only difference is that it contains a 3D object will not display inside a krpano.

    All assets are compiled into the swf, so I do not believe it is a path issue.

    My XML looks like this:

    Code
    <hotspot name="test3d"
             	url="/test_3d.swf"
             	distorted="true"
             	ath="-56.020470524020936" atv="1.2863143116010487"
             	scale=".3"
             	rx="0" ry="0" rz="0"
             	zorder="1"
     			 />

    Would someone be able to drop the 3d one into one of their panos to see if they experience the same issue?

    Or has anyone already run across this before?

    Thanks for any help,
    fodder

  • Sorry, I forgot to add the AS3 code that imports the 3D object (a KMZ model) into test_3d.swf:

    Could this be a scale or viewpoint problem?

  • Hi,

    the main problem is the "stage" access here at the start of the swf:

    public function infoModel():void {
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;

    init3d();
    initKMZ();
    }

    install/use the debug flashplayer and it will shown error because of
    an access to a 'null' object,

    the 'stage' member will be set from Flash after the ADDED_TO_STAGE event,
    but the code itself already starts executing direct after loading,

    as solution use a startup code like this:

    best regards,
    Klaus

  • Thank You, Klaus!

    It worked like a charm.

    For anyone else also looking that this, I also had to use distorted="false" (in the XML) or the 3D object wouldn't show up and using zoom="true" allowed the object to hover over a single location in the pano.

    Fodder

  • This seems to be an interesting topic, what about adding a 3D house into a panorama? Let's take the barn for example from http://sketchup.google.com/3dwarehouse/de…2e1b4a55475605f.

    Following your instructions, the barn model has been loaded into the panorama. Can we somehow synchronize it with the pano so that it follows panning and tilting? We should somehow align either the camera view or the rotationX and rotationY of the model in papervision3d with hlookat of krpano's view. I was playing a bit with these properties but didn't find a working solution.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!