System and method for automatically adapting to optimal observation view angle of object based on Web3dVR environment

By automatically adjusting the camera position and viewing angle in the Web3dVR environment, the complex problem of manual configuration in three-dimensional interactive applications is solved, efficient and safe optimal viewing perspective adaptation is achieved, and user experience and system intelligence are improved.

CN120276797APending Publication Date: 2025-07-08WUHAN XINDIAN ELECTRICAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510240493.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

In the prior art, the setting of observation camera position and viewing angle in three-dimensional interactive applications relies on manual configuration, resulting in complex interaction design, inefficient and difficult to ensure consistency and optimal display effect.

Method used

In the Web3dVR environment, the origin and child nodes are created by setting the module, the camera adapter module is used to calculate the camera distance, the safe distance acquisition module detects the collision point, and the optimal observation angle adapter module automatically adjusts the camera position to ensure the best observation angle.

Benefits of technology

It realizes the optimal viewing angle adaptation for automation, reduces manual operations, improves user experience and system flexibility, ensures the security and clarity of the observation angle, and reduces operational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276797A_ABST
    Figure CN120276797A_ABST
Patent Text Reader

Abstract

The invention discloses a system for automatically adapting an optimal observation view angle of an object based on a Web3dVR environment, and the system comprises a setting module which creates an original point and child nodes in a three-dimensional coordinate system, and sets a parent object at the position of the original point as an observation object; the camera adaptation module sets the orientation of the camera to be from the child node to the original point, and the adaptation distance of the camera is calculated according to the length-width ratio of the observed object; the safe distance acquisition module emits rays from the original point to the child nodes, obtains the coordinates of a collision point of the rays and the scene obstacle, and obtains the safe distance between the camera and the observation object by calculating the linear distance between the collision point and the original point; the optimal observation view angle adaptation module obtains the maximum adaptation distance point by comparing the adaptation distance with the safety distance. The operation complexity of a user can be remarkably reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of simulation three-dimensional interaction applications, and specifically refers to a system and method for automatically adapting the best viewing angle of an object based on a Web3dVR environment. Background Art

[0002] In current simulation three-dimensional interaction applications, it is usually necessary to set the position, height, and viewing angle of the observation camera according to different scenarios and operating objects in order to provide users with clear visual feedback and interaction experiences. Traditional methods often rely on manually setting the three-dimensional scene space coordinates or user-defined editing of the viewing angle and recording and saving the configuration, which increases the complexity of interaction design, is inefficient, and is difficult to ensure the best display effect. In addition, manually adjusting the camera viewing angle may be time-consuming and difficult to ensure consistency. Summary of the Invention

[0003] The purpose of the present invention is to provide a system and method for automatically adapting the best viewing angle of an object based on a Web3dVR environment. The present invention can significantly reduce the operation complexity of users and improve the user experience.

[0004] To achieve this purpose, the system for automatically adapting the best viewing angle of an object based on a Web3dVR environment designed by the present invention includes:

[0005] A setting module is used to create an origin and child nodes in a three-dimensional coordinate system, and set the parent object at the position of the origin as the observation object;

[0006] A camera adaptation module is used to set the camera orientation to look from the child node to the origin, and calculate the adaptation distance of the camera according to the aspect ratio of the observation object;

[0007] A safety distance acquisition module is used to emit a ray from the origin to the child node, obtain the collision point coordinates of the ray and the scene obstacle, and obtain the safety distance between the camera and the observation object by calculating the straight-line distance between the collision point coordinates and the origin coordinates;

[0008] A best viewing angle adaptation module is used to obtain the maximum adaptation distance point by comparing the adaptation distance of the camera and the safety distance between the camera and the observation object, and set the obtained maximum adaptation distance point as the maximum distance constraint value between the camera and the observation object.

[0009] Preferably, the specific process of calculating the adaptation distance of the camera according to the aspect ratio of the observation object is as follows:

[0010] Calculate the best distance for camera adaptation according to the aspect ratio of the observation object with any structural form. The calculation formula is as follows:

[0011]

[0012] Among them, α represents the horizontal field of view angle of the camera, θ represents the horizontal viewing angle occupied by the observed object in the image, L represents the length of the observed object, and d represents the adaptation distance from the camera to the observed object.

[0013] Preferably, the camera and the observed object create a constraint relationship, and the constraint condition of this constraint relationship is distance constraint. When the adaptation distance changes, the Web3dVR system automatically updates the variable value of the distance constraint between the camera and the observed object according to the maximum adaptation distance point, and obtains the maximum distance constraint value between the camera and the observed object.

[0014] Preferably, the specific process of obtaining the safe distance between the camera and the observed object is as follows:

[0015] Through collision detection between the ray and the environment in the camera direction, the three-dimensional collision point coordinates of the collision environment are detected, and the straight-line distance between the three-dimensional collision point coordinates of the collision environment and the origin is calculated to obtain the effective distance for spatial observation; a rectangular projection is made at a set distance in the direction from the three-dimensional collision point of the collision environment to the origin according to the camera's conical field of view frame, and it is detected whether the rectangular projection area will be blocked by other objects in the environment. If there is occlusion, the distance between the camera and the observed object is further reduced until it is adjusted to be unoccluded. If there is no occlusion, the adaptation distance of the camera at this time is the safe distance between the camera and the observed object.

[0016] Preferably, the specific process of comparing the adaptation distance of the camera and the safe distance between the camera and the observed object to obtain the maximum adaptation distance point and setting the obtained maximum adaptation distance point as the maximum distance constraint value between the camera and the observed object is as follows:

[0017] When the adaptation distance of the camera is less than or equal to the safe distance between the camera and the observed object, the adaptation distance is used as the distance constraint value between the camera and the observed object. At this time, the coordinate point where the camera is located at the maximum adaptation distance is the maximum adaptation distance point, and the maximum value of the adaptation distance is the maximum distance constraint value between the camera and the observed object; when the adaptation distance of the camera is greater than the safe distance between the camera and the observed object, the safe distance between the camera and the observed object is used as the distance constraint value between the camera and the observed object. At this time, the coordinate point where the camera is located at the maximum safe distance is the maximum adaptation distance point, and the maximum value of the safe distance is the maximum distance constraint value between the camera and the observed object.

[0018] Preferably, the best viewing angle adaptation module is also used to automatically adapt the best viewing angle of the object according to the maximum distance constraint value between the camera and the observed object in the Web3dVR environment.

[0019] Preferably, the specific method of automatically adapting the best viewing angle of the object in the Web3dVR environment is as follows:

[0020] Obtain the intersection coordinates of the point at the maximum adaptation distance perpendicular to the terrain surface, provide the ground observation point of the Web3dVR virtual observation camera at the maximum adaptation distance, and automatically adapt the best viewing angle of the object through automatic spatial positioning and matching in the Web3dVR environment by combining the point at the maximum adaptation distance, the maximum distance constraint value, and the ground observation point.

[0021] A method for automatically adapting the best viewing angle of an object in a Web3dVR environment, which includes the following steps:

[0022] Create an origin and child nodes in a three-dimensional coordinate system, and set the parent object at the position of the origin as the observation object;

[0023] Set the camera orientation to look from the child node to the origin, and calculate the adaptation distance of the camera according to the aspect ratio of the observation object;

[0024] Emit a ray from the origin to the child node, obtain the collision point coordinates of the ray and the scene obstacle, and obtain the safe distance between the camera and the observation object by calculating the straight-line distance between the collision point coordinates and the origin coordinates;

[0025] By comparing the adaptation distance of the camera and the safe distance between the camera and the observation object, obtain the point at the maximum adaptation distance, and set the obtained point at the maximum adaptation distance as the maximum distance constraint value between the camera and the observation object.

[0026] A computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps of the above method.

[0027] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the above method.

[0028] The beneficial effects of the present invention:

[0029] The present invention can directly determine the observation space distance between any observation object and the object environment in a three-dimensional scene, and then automatically adjust the camera position according to the spatial layout and relative position of the observation object. The present invention realizes the automatic equipment of the best observation perspective through automated calculation, avoiding the cumbersome work of manual configuration of the interaction location and perspective by designers or users in traditional technologies, greatly reducing the intervention of manual operations and configuration errors, and saving a large amount of time and energy. Through the present invention, the Web3dVR system automatically makes dynamic adjustments according to the size, position and environmental collision detection of the observation object, so as to ensure that all users obtain a consistent and accurate observation perspective under different conditions. When calculating the best observation perspective, the present invention takes into account the distance between the observation object and the collision environment, and avoids the collision or overlap of the camera with the scene objects in the collision environment through safety distance detection, ensuring that the observation perspective is both safe and clear, thus improving the user experience. After adopting the method of the present invention, the Web3dVR system can dynamically adjust the perspective according to the changes of the scene and objects, without a large amount of manual operations, and has higher flexibility and configuration. The present invention can significantly reduce the operation complexity of users and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a schematic structural diagram of the present invention;

[0031] Figure 2 is a flowchart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0032] The following further elaborates on the present invention in conjunction with the accompanying drawings and specific embodiments:

[0033] Embodiment 1

[0034] A system for automatically adapting the best observation perspective of an object in a Web3dVR environment, as Figure 1 shown, it includes:

[0035] A setting module is used to create an origin (the origin is the central mass point of the VR device) and a child node (the child node is a point on the positive Y-axis of the three-dimensional coordinate system) in the three-dimensional coordinate system, and set the parent object at the position of the origin (the parent object at the position of the origin is the VR device itself) as the observation object. This design provides an accurate reference point for subsequent camera adaptation by creating the origin and the child node, and setting the parent object at the position of the origin as the observation object ensures the clarity of the observation object, facilitating subsequent calculation and processing;

[0036] The camera adaptation module is used to set the orientation of the camera (3D camera) to look from the child node towards the origin, and calculate the adaptation distance of the camera according to the aspect ratio of the observation object (the observation object is the device to be interacted with, that is, the VR device). Setting the camera orientation to look from the child node towards the origin can ensure that the camera's perspective is aligned with the center of the observation object, thus providing a more realistic visual effect. By calculating the aspect ratio of the observation object, it can ensure that the camera can display the observation object at the most appropriate distance and angle without distortion or deformation when showing the observation object;

[0037] The safety distance acquisition module is used to emit a ray from the origin to the child node (through the ray detection mechanism, a straight line of infinite length is emitted from a point. This ray can be bound to a 3D object, and the direction can be controlled according to the movement of the 3D object. When the ray collides with any 3D object, it can be detected by the program. The name of the collision object, the coordinates of the collision point, and all 3D information of the collision object can be detected. The ray can also collide with multiple collision objects on the extended line. The ray is one of the most commonly used interaction methods in 3D interaction), obtain the collision point coordinates of the ray and the scene obstacles (in the 3D scene, whether the area opposite this interaction device is open or narrow is determined by the surrounding environmental obstacles. The 3D scene is a simulation of the real scene. If the area opposite the device is a corridor wall, the observation camera replacing the human eye can only observe in such an environment and cannot move back to observe because there is a wall behind), and obtain the safety distance between the camera and the observation object by calculating the straight-line distance between the collision point coordinates and the origin coordinates. By obtaining the safety distance, this design can ensure that the camera maintains a certain distance and angle when showing the observation object, thus providing a broader field of view and a more realistic visual effect;

[0038] The best viewing angle adaptation module is used to obtain the maximum adaptation distance point by comparing the adaptation distance of the camera and the safety distance between the camera and the observation object, and set the obtained maximum adaptation distance point as the maximum distance constraint value between the camera and the observation object (this maximum adaptation distance point and the maximum distance constraint value obtain a spatial coordinate with orientation in 3D space. In the Web3dVR environment, when setting the helmet to bring the character to this position for observation, the collision point coordinates of this spatial point coordinate calculated perpendicular to the ground and the ground must be obtained. Set an empty object to this corresponding ground coordinate and the Y-axis towards the device. Set the camera as a child node of the empty object and copy the coordinates of the empty object. The ground position recognized by the VR helmet hardware drives the camera to match the actual environment ground with the empty object. The VR helmet will obtain the height of the user and set the real-time height of the camera). By comprehensively considering the adaptation distance of the camera and the safety distance between the camera and the observation object, this design can obtain the maximum adaptation distance point, which can ensure that the camera is neither too close nor too far when showing the observation object, thus providing a more stable visual effect and a better user experience for the user.

[0039] In the above technical solution, the specific process of calculating the adaptation distance of the camera according to the aspect ratio of the observed object is as follows:

[0040] Calculate the adaptation distance of the camera according to the aspect ratio of the observed object with any structural form. The calculation formula is as follows:

[0041]

[0042] Where α represents the horizontal field of view angle of the camera (in radians), θ represents the horizontal viewing angle occupied by the observed object in the image (in radians), L represents the length of the observed object (the unit of length is meters), and d represents the adaptation distance from the camera to the observed object (the unit of length is meters); the above design can be applied to observed objects with different structural forms. Regardless of how the aspect ratio changes, the Web3dVR system can calculate the appropriate adaptation distance. By accurately calculating the adaptation distance of the camera, it helps to ensure that the observed object occupies an appropriate space in the image, neither being too large to cause loss of details nor being too small to make observation difficult, and can provide a more comfortable and clear observation experience for users.

[0043] In the above technical solution, a constraint relationship is created between the camera and the observed object (the constraint relationship is a binding limit method of a common variable dynamic control in three dimensions, and the constraint value is to control the distance between the camera and the interaction object). The constraint condition of this constraint relationship is distance constraint. When the adaptation distance changes, the Web3dVR system automatically updates the variable value of the distance constraint between the camera and the observed object according to the maximum adaptation distance point to obtain the maximum distance constraint value between the camera and the observed object; through the above design of creating a constraint relationship between the camera and the observed object, when the observed object or the observation scene changes, the distance between the camera and the observed object may need to be adjusted accordingly. At this time, the Web3dVR system can quickly respond to these changes and automatically update the distance constraint variable value, which helps to ensure the continuity and stability of the observation effect, can reduce manual intervention, and enables the Web3dVR system to more autonomously adjust the position of the camera to adapt to different observation scenes and requirements.

[0044] In the above technical solution, the specific process of obtaining the safe distance between the camera and the observed object is as follows:

[0045] Collision detection is performed on the environment in the direction of the ray and the camera. The three-dimensional collision point coordinates of the collision environment are detected, and the straight-line distance between the three-dimensional collision point coordinates of the collision environment and the origin is calculated to obtain the effective distance for spatial observation. A rectangular projection is performed at a set distance (the set distance is 1 meter) in the direction from the three-dimensional collision point of the collision environment to the origin according to the camera's conical field of view frame. It is detected whether the rectangular projection area will be blocked by other objects in the environment. If there is occlusion, the distance between the camera and the observation object is further reduced until it is adjusted to be unobstructed. If there is no occlusion, the adapted distance of the camera at this time is the safe distance between the camera and the observation object. The above design optimizes the observation effect by accurately calculating the safe distance and automatically adjusting the position of the camera, improving the overall user experience and enhancing the accuracy and safety of observation.

[0046] In the above technical solution, the specific process of comparing the adapted distance of the camera and the safe distance between the camera and the observation object to obtain the maximum adapted distance point and setting the obtained maximum adapted distance point as the maximum distance constraint value between the camera and the observation object is as follows:

[0047] When the adapted distance of the camera is less than or equal to the safe distance between the camera and the observation object, the adapted distance is used as the distance constraint value between the camera and the observation object. At this time, the coordinate point of the camera located at the maximum adapted distance is the maximum adapted distance point, and the maximum value of the adapted distance is the maximum distance constraint value between the camera and the observation object. When the adapted distance of the camera is greater than the safe distance between the camera and the observation object, the safe distance between the camera and the observation object is used as the distance constraint value between the camera and the observation object. At this time, the coordinate point of the camera located at the maximum safe distance is the maximum adapted distance point, and the maximum value of the safe distance is the maximum distance constraint value between the camera and the observation object. The above design can ensure that the camera always remains in a position where it can clearly observe the object without causing safety hazards due to being too close by comparing the adapted distance of the camera and the safe distance between the camera and the observation object, which helps to avoid observation distortion, image blurring or potential risks during the observation process; it can maintain the best observation effect. This dynamic adjustment not only improves the automation level of the system but also enhances the user's immersion and satisfaction.

[0048] In the above technical solution, the best observation perspective adaptation module is also used to automatically adapt the best observation perspective of the object according to the maximum distance constraint value between the camera and the observation object in the Web3dVR environment. The above design can improve the observation efficiency and accuracy, enhance the user experience and improve the intelligence level of the Web3dVR system.

[0049] In the above technical solution, the specific method for automatically adapting the best observation perspective of the object in the Web3dVR environment is as follows:

[0050] Obtain the intersection coordinates of the maximum adaptation distance point perpendicular to the terrain surface, and provide the ground observation point of the Web3dVR virtual observation camera at the maximum adaptation distance (in the Web3dVR system, the coordinates of the maximum adaptation distance point represent the head and eyes of a person, and the coordinates set in the Web3dVR system are adapted to the ground coordinates of the real environment positioning. The virtual ground is adapted to the real environment ground, which is automatically matched by the hardware settings; all the coordinates we give to the Web3dVR system are the ground coordinates of the position where a person stands, so it is necessary to obtain the intersection coordinates with the ground. Since the heights of different people are different, the Web3dVR system will automatically adjust the height of the center mass point of the VR device according to the intersection coordinates plus the person's height), and automatically adapt the best observation angle of the object through the automatic spatial positioning and matching in the Web3dVR environment by combining the maximum adaptation distance point, the maximum distance constraint value, and the ground observation point; the above design determines the position of the camera in the Web3dVR environment, that is, the ground observation point of the maximum adaptation distance point, through the automated and intelligent Web3dVR system, enabling the Web3dVR system to intelligently and automatically adapt the best observation angle of the object without manual adjustment by the user, improving the efficiency and convenience of observation, and at the same time enhancing the intelligent level of the system.

[0051] Embodiment 2

[0052] A method for automatically adapting the best observation angle of an object based on the Web3dVR environment, as Figure 2 shown, create an origin and child nodes in a three-dimensional coordinate system, and set the parent object at the position of the origin as the observation object; set the camera orientation to look from the child node towards the origin, and calculate the adaptation distance of the camera according to the aspect ratio of the observation object; emit a ray from the origin towards the child node, obtain the collision point coordinates of the ray with the scene obstacles, and obtain the safe distance between the camera and the observation object by calculating the straight-line distance between the collision point and the origin; obtain the maximum adaptation distance point by comparing the adaptation distance with the safe distance.

[0053] The specific method for automatically adapting the best observation angle of an object includes the following steps:

[0054] Create an origin and child nodes in a three-dimensional coordinate system, and set the parent object at the position of the origin as the observation object;

[0055] Set the camera orientation to look from the child node towards the origin, and calculate the adaptation distance of the camera according to the aspect ratio of the observation object;

[0056] Emit a ray from the origin towards the child node, obtain the collision point coordinates of the ray with the scene obstacles, and obtain the safe distance between the camera and the observation object by calculating the straight-line distance between the collision point coordinates and the origin coordinates;

[0057] By comparing the adaptation distance of the camera and the safety distance between the camera and the observation object, the maximum adaptation distance point is obtained, and the obtained maximum adaptation distance point is set as the maximum distance constraint value between the camera and the observation object.

[0058] Embodiment 3

[0059] A computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the steps of the method described in Embodiment 2 are implemented.

[0060] Embodiment 4

[0061] A computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the steps of the method described in Embodiment 2 are implemented.

[0062] The content not detailed in this specification belongs to the prior art well-known to those skilled in the art.

Claims

1. A system for automatically adapting the best viewing angle of an object in a Web3D VR environment, characterized in that, It includes: A setting module is used to create an origin and child nodes in a three-dimensional coordinate system, and set the parent object at the position of the origin as the observed object; A camera adaptation module is used to set the camera orientation to look from the child node to the origin, and calculate the adaptation distance of the camera according to the aspect ratio of the observed object; A safety distance acquisition module is used to emit a ray from the origin to the child node, obtain the collision point coordinates of the ray and the scene obstacle, and obtain the safety distance between the camera and the observed object by calculating the straight-line distance between the collision point coordinates and the origin coordinates; An optimal viewing angle adaptation module is used to obtain the maximum adaptation distance point by comparing the adaptation distance of the camera and the safety distance between the camera and the observed object, and set the obtained maximum adaptation distance point as the maximum distance constraint value between the camera and the observed object.

2. The system for automatically adapting the best viewing angle of an object in a Web3D VR environment according to claim 1, wherein: The specific process of calculating the adaptation distance of the camera according to the aspect ratio of the observed object is as follows: Calculate the adaptation distance of the camera according to the aspect ratio of the observed object with any structural form. The calculation formula is as follows: Where, α represents the horizontal field of view angle of the camera, θ represents the horizontal viewing angle occupied by the observed object in the image, L represents the length of the observed object, and d represents the adaptation distance from the camera to the observed object.

3. The system for automatically adapting the best viewing angle of an object in a Web3D VR environment according to claim 1, characterized in that: A constraint relationship is created between the camera and the observed object. The constraint condition of this constraint relationship is distance constraint. When the adaptation distance changes, the Web3dVR system automatically updates the variable value of the distance constraint between the camera and the observed object according to the maximum adaptation distance point, and obtains the maximum distance constraint value between the camera and the observed object.

4. The system for automatically adapting the best viewing angle of an object in a Web3D VR environment according to claim 1, characterized in that: The specific process of obtaining the safety distance between the camera and the observed object is as follows: Perform collision detection on the environment in the direction of the ray and the camera. Detect the three-dimensional collision point coordinates of the collision environment, calculate the straight-line distance between the three-dimensional collision point coordinates of the collision environment and the origin, and obtain the effective distance for spatial observation; project a rectangle at a set distance in the direction from the three-dimensional collision point of the collision environment to the origin according to the camera's conical field of view frame, and detect whether the rectangular projection area will be blocked by other objects in the environment. If there is occlusion, further reduce the distance between the camera and the observed object until it is adjusted to not be occluded. If there is no occlusion, the adaptation distance of the camera at this time is the safety distance between the camera and the observed object.

5. The system for automatically adapting the best viewing angle of an object in a Web3D VR environment according to claims 2 and 4, characterized in that: The specific process of comparing the adaptation distance of the camera and the safety distance between the camera and the observed object, obtaining the maximum adaptation distance point, and setting the obtained maximum adaptation distance point as the maximum distance constraint value between the camera and the observed object is as follows: When the adaptation distance of the camera is less than or equal to the safety distance between the camera and the observed object, use the adaptation distance as the distance constraint value between the camera and the observed object. At this time, the coordinate point of the camera located at the maximum adaptation distance is the maximum adaptation distance point, and the maximum value of the adaptation distance is the maximum distance constraint value between the camera and the observed object; when the adaptation distance of the camera is greater than the safety distance between the camera and the observed object, use the safety distance between the camera and the observed object as the distance constraint value between the camera and the observed object. At this time, the coordinate point of the camera located at the maximum safety distance is the maximum adaptation distance point, and the maximum value of the safety distance is the maximum distance constraint value between the camera and the observed object.

6. The system for automatically adapting the best viewing angle of an object in a Web3D VR environment according to claim 1, wherein: The best viewing angle adaptation module is also used to automatically adapt the best viewing angle of the object according to the maximum distance constraint value between the camera and the observed object in the Web3dVR environment.

7. The system for automatically adapting the best viewing angle of an object in a Web3D VR environment according to claim 6, wherein: The specific method for automatically adapting the best viewing angle of the object in the Web3dVR environment is as follows: Obtain the intersection coordinates of the maximum adaptation distance point perpendicular to the terrain surface, provide the ground observation point when the Web3dVR virtual observation camera is at the maximum adaptation distance, and automatically adapt the best viewing angle of the object through automatic spatial positioning and matching in the Web3dVR environment by combining the maximum adaptation distance point, the maximum distance constraint value, and the ground observation point.

8. A method for automatically adapting the best viewing angle of an object in a Web3D VR environment, characterized in that, It includes the following steps: Create an origin and child nodes in the three-dimensional coordinate system, and set the parent object at the position of the origin as the observed object; Set the camera orientation to look from the child node to the origin, and calculate the adaptation distance of the camera according to the aspect ratio of the observed object; Emit a ray from the origin to the child node, obtain the collision point coordinates of the ray and the scene obstacle, and obtain the safe distance between the camera and the observed object by calculating the straight-line distance between the collision point coordinates and the origin coordinates; By comparing the adaptation distance of the camera and the safe distance between the camera and the observed object, obtain the maximum adaptation distance point, and set the obtained maximum adaptation distance point as the maximum distance constraint value between the camera and the observed object.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in claim 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in claim 8.