Jump to content

Three Types of Cameras Prevent Scene From Loading


Junior
 Share

Recommended Posts

Hello Guys,

 

Just a quick observation. After exporting a scene from Blender, I recently discovered that the following 3 types of cameras prevent the Babylon.JS Scene from loading. 

  1. AnaglyphArcRotateCamera
  2. ArcRotateCamera 
  3. FollowCamera

This occurs when there is only a single camera in the scene and it happens to be one from the list. If other types of cameras are added to the scene, then the scene will load correctly even if the active camera is one from the list.  I have searched the forum for a solution to this problem but could not find one. Is there a fix for this?

 

Cheers

 

 

Link to comment
Share on other sites

Those 3 camera types need to have have a constraint on them to track a specific mesh.  Otherwise, you should be getting an error.  You are doing this right?

        if self.CameraType == ANAGLYPH_ARC_CAM or self.CameraType == ARC_ROTATE_CAM or self.CameraType == FOLLOW_CAM:            if not hasattr(self, 'lockedTargetId'):                TowerOfBabel.warn('ERROR: Camera type with manditory target specified, but no target to track set', 2)                self.fatalProblem = True
Link to comment
Share on other sites

Hi Guys,

 

Sorry I was unable to respond to your request yesterday. Today, I have a link to two versions of the project with the *.blend and *.babylon files Here. Both versions are identical except for the 'active camera type'. One version has Free cameras while the other has ArcRotate cameras. The version with the Free cameras loads correctly, but the version with the ArcRotate cameras does not complete the loading process. Both versions have constraints setup in Blender. (Although I know it is not necessary for free cameras.) You can view them online for quick observation CarFreeCam and CarArcRotate

 

Thanks to DeltaKosh for assisting me with the Control Panel. (He is an awesome Guy!  :D) . BTW, while I am on this subject, is there a way to make the transition between the different camera views more smoothly, i.e. fade in and out when I switch to a different camera. 

 

Thanks for your advice.

 

CarArcRotate.zip

Link to comment
Share on other sites

Hum sounds like something is missing. Here what I got from your log file:

processing begun of camera:  Camera_4
ERROR: Camera type with manditory target specified, but no target to track set
processing begun of camera:  Camera_3
ERROR: Camera type with manditory target specified, but no target to track set
processing begun of camera:  Camera_1
ERROR: Camera type with manditory target specified, but no target to track set
Link to comment
Share on other sites

Hi Guys, 

 

Thanks for your help with this one. I have found the solution to the problem. When setting up the constraints for the cameras in Blender, you have to use the constraint called 'Track To' and not 'Locked Track' as I have done. ArcRotate Cameras are now working correctly.

 

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...