Custom normals shading error #46028

Closed
opened 2015-09-06 16:02:07 +02:00 by Xavier Thomas · 9 comments
Member

System Information
Windows7, Nvidia GTX970

Blender Version
Broken: 2.75a

Short description of error
Shading error when using custom normals (sometimes).

Exact steps for others to reproduce the error
Open the attached files, in edit mode you can confirm that all normals are pointing upwards.
Switch yo object mode and set the shading ,mode to "material" or "solid", both shading are wrong.
In Material mode we can see easily that both faces of the tree are shaded differently. In solid mode shading looks correct at first but change with the view direction although the material is only lambertian diffuse with no specular.

The object was imported by a custom python code of mine, but at first the shading was correct. The file was saving reloading with correct shading. But after messing with the material and texture properties the shading changed.

**System Information** Windows7, Nvidia GTX970 **Blender Version** Broken: 2.75a **Short description of error** Shading error when using custom normals (sometimes). **Exact steps for others to reproduce the error** Open the attached files, in edit mode you can confirm that all normals are pointing upwards. Switch yo object mode and set the shading ,mode to "material" or "solid", both shading are wrong. In Material mode we can see easily that both faces of the tree are shaded differently. In solid mode shading looks correct at first but change with the view direction although the material is only lambertian diffuse with no specular. The object was imported by a custom python code of mine, but at first the shading was correct. The file was saving reloading with correct shading. But after messing with the material and texture properties the shading changed.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @XavierThomas

Added subscriber: @XavierThomas
Author
Member
[CustomNormalShadingBug.blend](https://archive.blender.org/developer/F230834/CustomNormalShadingBug.blend)

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Added subscriber: @WeeKwongBong

Added subscriber: @WeeKwongBong

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2015-09-11 12:30:33 +02:00

You are using vnors coplanar to their face… This will never really work I think (in flat or smooth shading, it will generate surface normals parallel to the face).

You are using vnors coplanar to their face… This will never really work I think (in flat or smooth shading, it will generate surface normals parallel to the face).
Author
Member

Yes, that is the goal. Basically I want trees that look shade-less but are not and receive the same amount of light as the ground (so it works at night and in low light condition contrary to shade-less). This is very common in games and works OK in both graphical engine I wrote the importer/exporter for.

My users workflow is:

  • Import a scene form one format
  • Do some verification and modification in Blender
  • Export to another format

I all works well but sometimes the user is thrown off by the wrong shading in Blender's viewport and stop there and send me a bug report before even exporting although the export of custom normals and shading in the other graphic engine is OK.

IMO this is task is valid because this is a technique used very frequently in game foliage (not only my client but pretty much every foliage in every RT graphic engine) and having visual feedback directly in Blender, instead of forcing to export and check normals in the native engine, is important to many user I would think.

Yes, that is the goal. Basically I want trees that look shade-less but are not and receive the same amount of light as the ground (so it works at night and in low light condition contrary to shade-less). This is very common in games and works OK in both graphical engine I wrote the importer/exporter for. My users workflow is: - Import a scene form one format - Do some verification and modification in Blender - Export to another format I all works well but sometimes the user is thrown off by the wrong shading in Blender's viewport and stop there and send me a bug report before even exporting although the export of custom normals and shading in the other graphic engine is OK. IMO this is task is valid because this is a technique used very frequently in game foliage (not only my client but pretty much every foliage in every RT graphic engine) and having visual feedback directly in Blender, instead of forcing to export and check normals in the native engine, is important to many user I would think.
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
No Assignees
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#46028
No description provided.