The embodiment of the present invention discloses a method, device and electronic device for removing redundant data in a 3D model, which relates to the technical field of computer games and can reduce the occupation of system resources. The cleaning method includes: receiving redundant data clearance instructions; according to the redundant data clearance instructions, determining rules according to preset redundant data, traversing the data of the 3D model, searching for redundant data from the data of the 3D model, and clearing the redundant data. The scavenging device includes: a scavenging instruction receiving module for receiving redundant data clearance instructions; a redundant data finding module for scavenging the redundant data according to the redundant data clearance instructions, according to preset redundant data determination rules, traversing the data of the 3D model, searching the redundant data from the data of the 3D model; and a redundant data clearing module for scavenging the redundant data. The invention is applicable to the removal of redundant data in a 3D model.
【技术实现步骤摘要】
3D模型中冗余数据的清除方法、装置及电子设备
本专利技术涉及计算机游戏
,尤其涉及一种3D模型中冗余数据的清除方法、装置及电子设备。
技术介绍
游戏的3D(3Dimensions,中文含义为三维)模型经常由3dsMax软件制作并导出,模型在制作过程中经常会增加大量冗余数据,如果这些模型加入到游戏项目中就会使用大量磁盘空间,内存及CPU,对系统资源会造成过多的占用。
技术实现思路
有鉴于此,本专利技术实施例提供一种3D模型中冗余数据的清除方法、装置、电子设备及存储介质,能够减少对系统资源的占用。第一方面,本专利技术实施例提供一种3D模型中冗余数据的清除方法,包括:接收冗余数据清除指令;根据所述冗余数据清除指令,依据预设冗余数据确定规则,遍历所述3D模型的数据,从所述3D模型的数据中查找冗余数据;清除所述冗余数据。根据本专利技术实施例的一种具体实现方式,所述预设冗余数据确定规则包括:所述3D模型的顶点属性数据为冗余数据;所述根据所述冗余数据清除指令,依据预设冗余数据确定规则,遍历3D模型的数据,从所述3D模型的数据中查找冗余数据,包括:遍历所述3D模型的数据,从所述 ...
【技术保护点】
1.一种3D模型中冗余数据的清除方法,其特征在于,包括:接收冗余数据清除指令;根据所述冗余数据清除指令,依据预设冗余数据确定规则,遍历3D模型的数据,从所述3D模型的数据中查找冗余数据;清除所述冗余数据。
【技术特征摘要】
1.一种3D模型中冗余数据的清除方法,其特征在于,包括:接收冗余数据清除指令;根据所述冗余数据清除指令,依据预设冗余数据确定规则,遍历3D模型的数据,从所述3D模型的数据中查找冗余数据;清除所述冗余数据。2.根据权利要求1所述的3D模型中冗余数据的清除方法,其特征在于,所述预设冗余数据确定规则包括:所述3D模型的顶点属性数据为冗余数据;所述根据所述冗余数据清除指令,依据预设冗余数据确定规则,遍历3D模型的数据,从所述3D模型的数据中查找冗余数据,包括:遍历所述3D模型的数据,从所述3D模型的数据中查找所述顶点属性数据,将所述顶点属性数据确定为冗余数据。3.根据权利要求2所述的3D模型中冗余数据的清除方法,其特征在于,所述顶点属性数据,包括:顶点颜色数据、顶点照明数据、顶点透明度数据中的至少一项。4.根据权利要求1所述的3D模型中冗余数据的清除方法,其特征在于,所述预设冗余数据确定规则包括:所述3D模型中的多组贴图坐标数据中的至少一组数据为冗余数据;所述根据所述冗余数据清除指令,依据预设冗余数据确定规则,遍历3D模型的数据,从所述3D模型的数据中查找冗余数据,包括:遍历所述3D模型的数据,从所述3D模型的数据中查找所述多组贴图坐标数据,将所述多组贴图坐标数据中的至少一组数据作为冗余数据。5.根据权利要求4所述的3D模型中冗余数据的清除方法,其特征在于,所述遍历所述3D模型的数据,从所述3D模型的数据中查找所述多组贴图坐标数...
【专利技术属性】
技术研发人员:赵彬琨,
申请(专利权)人:北京金山安全软件有限公司,
类型:发明
国别省市:北京,11
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。