Wrong UV texture coordinates when importing VRML file #39596
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#39596
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
MacOSX 10.6.8 on Apple MacBook 6,1
Blender Version
Broken: 2.70 19e627c
Short description of error
The VRML importer provided as an add-on with blender doesn't import texture coordinates properly : the texture coordinates indices are off by 1.
Exact steps for others to reproduce the error
- start blender
- import a VRML scene that contains texture nodes (for example, fig6.vrml that I uploaded with the case #39594 : once the fix to #39594 is applied, we can see in blender that the texture doesn't display properly (the 4 texture coordinates are off by 1), although this scene is displayed properly with the FreeWRL software)
I attached the patch that I made. This patch fixes this bug, but I beleive that there are some other similar bugs remaining, as this bug seems to have been introduced in an attempt to fix bug blender/blender#18329, as it was tagged with the string 'EEKADOODLE'
texcoords_patch_to_v20131007.patch
texcoords_patch_to_v20131007.unifiedpatch
Changed status to: 'Open'
Added subscriber: @graffy
Added subscriber: @ThomasDinges
Added subscriber: @jonim8or
Are you sure the UVs in your file fig6.vrml are correct? because the uvs from the laetetia model http://www.web3d.org/x3d/content/examples/Basic/StudentProjects/_pages/page23.html appear to be imported fine. (and get broken with your version)
To be honest, I'm not 100% percent sure that fig6.vrml has correct UVs (this vrml file has been generated by mayavi, which is based on vtk, so there might well be a bug in their code). The only reason that makes me think that fig6.vrml is correct is that the UVs look fine when loaded into FreeWRL (http://en.wikipedia.org/wiki/FreeWRL), which seems serious enough...
The Laetetia model http://www.web3d.org/x3d/content/examples/Basic/StudentProjects/_pages/page23.html appears fine in FreeWRL, which seems to confirm that this model contains proper vrml.
As a result, it seems that my patch is suboptimal : it breaks laetitia import while it fixes fig6.vrml.
On a side note when made my 'fix', I noticed that a dummy texture coordinates pair was added to the list of textures coordinates in order to fix the 1-based indices issue. This is quite messy and I don't think this is necessary. Unless I overlooked something, this issue can be solved solely by using additions to UV coordinates indices (keep all python lists 0-based, and adapt indices only at the vrml parsing stage if vrml's indices are 1-based)
I really wonder if the tex coords are 1-based. From the vrml specification I understand that they are 0-based:
That should also go for the vertex colors, according to the specification. But I guess there's a reason why the eekadoodle was added.
In my version of the importer #38261 I have removed the dummy entry for uvs, and the "+ 1" that was done when referring to them. And it seems to work (with the laetitia model).
Added subscriber: @BrendonMurphy
Changed status from 'Open' to: 'Archived'
closing as archived, no activity 1.5 years