New OBJ importer produces too many vertices when object faces don't span a continuous range #100302

Closed
opened 2022-08-09 19:43:33 +02:00 by zhangliqi · 7 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.33

Blender Version
Broken: version: 3.3.0 Beta, branch: master, commit date: 2022-08-06 22:01, hash: 800c7dbf41

Model export comes from mineways exporting obj composed of multiple objects, using the latest obj import method to appear redundant coincident vertices

Steps to Reproduce

  • Extract zip file
  • import .obj file with new c++ importer (notice the duplicate vertices in edit mode)
    (or compare verts count of object imported by old and new method)

obj bug.blend

objmodel.zip

obj bug.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.33 **Blender Version** Broken: version: 3.3.0 Beta, branch: master, commit date: 2022-08-06 22:01, hash: `800c7dbf41` Model export comes from mineways exporting obj composed of multiple objects, using the latest obj import method to appear redundant coincident vertices **Steps to Reproduce** - Extract zip file - import .obj file with new c++ importer (notice the duplicate vertices in edit mode) (or compare verts count of object imported by old and new method) [obj bug.blend](https://archive.blender.org/developer/F13350057/obj_bug.blend) [objmodel.zip](https://archive.blender.org/developer/F13350063/objmodel.zip) [obj bug.blend](https://archive.blender.org/developer/F13350065/obj_bug.blend)
Author

Added subscriber: @shadow_creeper

Added subscriber: @shadow_creeper
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @aras_p

Added subscriber: @aras_p
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Aras Pranckevicius self-assigned this 2022-08-10 06:11:16 +02:00
Aras Pranckevicius changed title from Importing obj appears a large number of excess vertices to New OBJ importer produces too many vertices when object faces don't span a continuous range 2022-08-10 06:12:00 +02:00

The issue seems to be that the range of vertices to use for each imported model only tracks "min & max" vertex indices, and uses all the vertices in that range. The model in repro uses non-contiguous vertex ranges for the faces. It should track all the vertices actually used, and use those.

Here for example, all the "loose" vertices of that object should not be used:
wrong-vertices.png

The issue seems to be that the range of vertices to use for each imported model only tracks "min & max" vertex indices, and uses all the vertices in that range. The model in repro uses non-contiguous vertex ranges for the faces. It should track all the vertices actually used, and use those. Here for example, all the "loose" vertices of that object should not be used: ![wrong-vertices.png](https://archive.blender.org/developer/F13352069/wrong-vertices.png)

This issue was referenced by d76583cb4a

This issue was referenced by d76583cb4a16315c196f07f4acb9340f341bee47

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne added this to the Pipeline, Assets & IO project 2023-02-09 15:40:02 +01:00
Bastien Montagne removed this from the Pipeline, Assets & IO project 2023-02-10 12:49:18 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#100302
No description provided.