use_smooth boolean always true after import #109074
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#109074
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
Operating system: Windows 11
Graphics card: NVIDIA RTX A2000
Blender Version
Broken: version: 3.6.0 Beta, branch: blender-v3.6-release, commit date: 2023-06-15 19:52, hash:
1c5201b23a
Worked: version: 3.6.0 Alpha, branch: main, commit date: 2023-02-26 23:09, hash:
ca2c0da79e
Seems to be related to
5876573e14
,where mesh attribute
sharp_face
is needed to get flat shaded faces. In bmesh the use_smooth boolean is now true by default.Short description of error
Importing a 3ds or x3d file wich should be flat shaded is always smooth. polygon.use_smooth flag is always true and can not be changed manually.
Exact steps for others to reproduce the error
Export default cube to x3d and then import again. The formerly flat shaded cube is now smooth shaded.
Import attached .3ds file, it was exported flat shaded without smooth chunk and imported correct in Blender 3.5.1 but incorrect in Blender 3.6
Reference: #104422
Fixed it by myself:
c022b24f4f
Re-opened this issue because my fix did not solve the problem if the 3ds mesh has no smooth chunk. The flat shaded object will be imported with smooth faces by default, like the attached object
use_smooth- boolean always true after importto use_smooth boolean always true after importHi, thanks for the report. Can confirm. I've not investigated this yet from code side but perhaps changes in export code are also needed?
Did you check in other visualization software whether faces are smooth shaded or flat?
@HooglyBoogly ^
The attached 3ds is flat shaded, it includes no smooth chunk therfore no smoothing info exported
Thanks for the report.
30bf4c0945
fixes the "use_smooth" property, which didn't work correctly when the attribute didn't already exist and you set the valueFalse
.The importer still needs a small change though:
I also committed that fix to the addons repository
@HooglyBoogly I just wanted to do that, and saw you already did this^^ Is it better to do it like this:
instead of this?
bmesh.polygons.foreach_set("use_smooth", [False] * len(bmesh.polygons))
And another question wich is a little off-topic but fits to the inverted topic
i have noticed that many definitions in blender are inverted as opposed to 3ds definitions. (for example roughness -> shininess or alpha ->opacity).
Would it be possible to invert the colors of a texture by adding a new attribute 'invert' as a new feature to the colorspace settings?
I would like to share this idea with developers , is there an area where you can publish this?
I doubt it makes much of a difference in this case. The second might be faster but it's also more complex looking.
Probably better in my opinion to just invert things once, rather than keeping track of an "invert" setting everywhere in Blender, which would likely have performance effects as well.
@HooglyBoogly
I just tried out the recent fixes and noticed that the .x3d add-on still imports a smooth shaded object when it should be flat.
I will check the code this evening, maybe I can fix it - just wanted to point out that there are still some tiny bugs creeping around
Fixed .x3d import
4909b7504
ff73491bb2