-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object ID is the same for every object #319
Comments
I don't get that line issue on my end (?): Are you using the latest version?
Thats indeed how it works. By default the first id channel has a unique value for every object and the other channels are just initialized to 0 so you can use them however you want. The first channel is also used for detecting self-shadows so it can be useful to override it in some cases.
You can easily check if that's the case by generating a color based on the object id. In my case it works as intended: |
I think I was on the latest update before 3.2, but I went ahead and updated Blender to 3.2 and malt to the latest release to match the one you just released. The problem is still occuring:
I know that there have been issues with AMD hardware before, could that be the case here? |
I just made the test on my AMD Windows 10 laptop and it works fine. Figuring hardware-dependent issues can be a pain if I can't reproduce them locally. You can try posting the log file (see the attachment instructions), there might be relevant info. |
Let me know if there's anything else I can do! |
Could you open this blend file with this BlenderMalt build installed, switch the viewport to render mode and post the log file? |
This is what I'm seeing in the viewport, not getting the blue color I usually get as seen above, seems to be generating them properly here. Made sure to check some other project files on that build, returns the usual blue color. Same exact value for each object in the scene. |
That's weird... Could you try to edit the scene until it breaks?
It would also be useful if you could post the log of a (minimal) non-working scene. (Set the number of samples to 1 in the world settings so the log is not too large) |
(Just kinda writing things down as I experiment with them) Adding a light doesn't change anything. Editing the cubes doesn't break them. Creating a new material A ok. All objects that I directly create seem to be broken. I thought before that they were getting a blue colored id, but I guess that's just because of me hashing them or whatever. Using vector 3d instead. completely black. I don't think that they are generating an id at all. Some of the objects in the test file are lacking values too. Cubes 4 and 9. Random Per Object works normally on all the existing cubes, except 4 and 9! Those are getting the exact same color, objects that I create are getting that same color as well. Here's an updated test project + log, i've apended one of my body meshes, added a light, and created an extra cube. "All Objects That I Create" includes duplication and linked duplication of the objects that are working fine, Always breaks. However, If I create an instance of the collection containing your cubes, cubes number 4 and 9 seem to revert to normal. the entire top row of cubes that were instanced break. (Deleting the instance reverts cubes 4 and 9 to be broken). Duplicating the instance of the collection fixes the previous instance. But even more cubes are broken on the last row. Duplicating it AGAIN.. all of the cubes are fixed. Duplicating it AGAIN, well it looks like the first one in the series. They break in a repeating pattern. (Brightened the world bg for the gif so that things are more clearly visible here. All black cubes are completely black, they have no value) Finally, created a new project and added a cube, set the material to check the id. No value.. Here's the blend file and log. New Project id test.zip I did also try linking/appending one of the non-broken cubes from the other project, they break. Oh, and I just checked the latest Material Examples (node ux ver) objects, those are broken though. No idea what it is about the cubes in the id_test project you gave me that has prevented them from breaking, most of them anyways. |
This is quite weird. There doesn't seem to be anything wrong in the logs. The IDs are generated correctly. There must be an issue when uploading the data to the GPU, or maybe at binding time. Here's another modified version. Does it work? |
That seems to have fixed it for me! All objects are getting properly generated ids now as far as I can tell. Both the id node and random per object seem to work. |
Nice! I think I know what the root issue is, though. |
Yep that seems to fix it for me too. Glad to see this get resolved. Should we mark this issue as closed then? |
Yay! finally. This was a hard one. 😅 |
Malt version
Release
Blender version
Blender 3.1.2
OS
Windows 10 64x
Hardware info
AMD Ryzen Threadripper 1920x 12-Core Processor, 3950 Mhz, 24 Logical Processors | 32GB RAM | Radeon RX 570 Series
Issue description and reproduction steps
In the image below, notice that there is a bit of a weirdness regarding how Malt is generating the lines on the Eye, which is a separate object from the face mesh.. labeled with green is a pure white material, labeled with red is a pure black material, Malt generates a black line around the eye, but is truncated in the middle of it, pointed out with a blue arrow.
The issue here is that Malt doesn't necessarily distinguish between the objects (or materials), you have to give Malt a unique value for one of these materials. Packing a uvec4, we can give them a unique one, and you'll see it correctly generates the lines:
To reproduce using the attached blend, simply plug the Object ID into the PPO.id, and you will see that it changes nothing regarding the way the lines are rendered, presumably whatever the Object ID is outputting is the default input for the PPO.id? Whatever that value is is the same for every object.
Attachments
Malt Line Width Bug.zip
The text was updated successfully, but these errors were encountered: