Osl works different in MacOs and Windows: attribute quering #51674
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#51674
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?
{F613610}System Information
Windows 10 and latest MacOs
Blender Version
Broken: 2.78
fb82948
Specifically quering for UVMap and Vertex Color values via getattribute("uv map name/vertextCol map name") and getmessage("trace", "uv map name/vertextCol map name") is working on MacOs and NOT working in Windows.
In Windows it produces (0,0) always. In MacOs attributes are real values from object.
The same problem exist with "geom:uv" attribute - works in MacOs build and not working in Windows build.
Basic U and V global variables works in both builds but in different ways:
With this limitations it is hard to write OSL code for both platforms, see attached blend for minimal example.
P.S. Thanks for Blender, it`s great!
Changed status to: 'Open'
Added subscriber: @IPv6
Added subscriber: @ArtoKitula
Added subscriber: @LazyDodo
I noticed the weird behavior of the u and v globals as well, but just as a sanity check, are you saying this file on mac renders identical rectangles?
osl_uvtest.blend
results on windows: (osl left, texture coordinates uv right)
Thank you for attention to this bug, i tryed to render you test file.
You file renders osl wrong in BOTH systems, though //
See attached renders.
But to be noted: in my bug i use attached UVMap, unwrapped and attached to object. And i can get it in MacOs but can`t in Windows.
I modified a bit your example to denote difference, see attachments.
Both "geom:uv" and "UVMap" attributes work fine in MacOs{F643176}
Added subscriber: @brecht
While final image seems identical on windows, it does crash the blender at the end of the render, debug heap seems to imply it's a use after free bug, @brecht do you happen to have time to run F643176 through asan ? (and maybe comment on the other problems?)
The
u
andv
shaderglobals are the barycentric coordinates within each triangle, they are not always continuous within a quad. Theosl_uvtest.blend
renders look correct to me. Ifu
andv
match the uv map, that must be a coincidence or some OSL shader assigned them different values, I can't imagine how those values would accidentally end up in there otherwise.Address sanitizer on macOS didn't show me any warnings rendering
osl_uvtest_uvmap.blend
. I guess the first thing to check would be ifOSLRenderServices::get_attribute()
gets called, and if so why it fails to return a correct value.I don't want to pollute this ticket too much, so i reported the crash on windows in #51967.
For this ticket i'm gonna need a better repro case. @IPv6 can you post an as simple as possible blend (preferable the uv squares scene we have been using) and results of rendering this file on mac/linux/windows so we can clearly see the differences between the platforms?
In fact... not anymore :( After updating both system to latest builds i do not see differenses anymore, too. But there is definitely something shady under the hood (i get crashes sometimes too, and initially i can not get the same results in quite stable manner), being programmer myself suspect floating memory bug that pollutes at random places Anyway, even my full-blown blend with osl works fine on both systems right now Sorry, if it takes your time checking this ticket.
P.S. still, idea mentioned above (u, v without UVMaps is baricentric coordinates and this is OK) seems strange to me. Imho it definitely should look the same as without OSL at least, current u-v implementation just plain not usable at all.
Changed status from 'Open' to: 'Archived'
Well if you ever do stumble on a reliable repro case, i'd be happy to look at it, for now i don't think there's anything more to be done.