Surface normal vs Light Painter drawn normals #4

Open
opened 2024-08-24 09:33:01 +02:00 by Rachel-Campbell · 11 comments

It seems in the standard Blender project upon opening, the extension works - but whenever I open any of my own projects I am no longer able to use any of the tools.

Is there anything I am missing or should switch to setting-wise?

It seems in the standard Blender project upon opening, the extension works - but whenever I open any of my own projects I am no longer able to use any of the tools. Is there anything I am missing or should switch to setting-wise?

That is strange. Apart from enabling the add-on and saving to preferences, that's all you should need to do. I don't see any issues like that on my end. Also, thank you for sharing the issue here instead of on GitHub - I'm trying to make this the primary repo for future issues.

A list of steps would be helpful, as well as checking the system console (on non-Mac). You just click the menu option shown below and it'll pop up as a separate window and log any errors.

image

That is strange. Apart from enabling the add-on and saving to preferences, that's all you should need to do. I don't see any issues like that on my end. Also, thank you for sharing the issue here instead of on GitHub - I'm trying to make this the primary repo for future issues. A list of steps would be helpful, as well as checking the system console (on non-Mac). You just click the menu option shown below and it'll pop up as a separate window and log any errors. ![image](/attachments/3e7a16da-dfcf-41ea-97b8-dfba36961954)
Spencer Magnusson added the
feedback needed
label 2024-08-24 19:49:12 +02:00

Hi Spencer,

Of course, and thanks for getting back to me on this.

On my end these are the issues I am coming up against (also I am on a mac):

  1. Light Paint doesn't work, it inserts a light point wherever I'd last left my select cursor but it does not engage with the brush.
  2. My file crashes and Blender closes any time I try to use the Shadow Paint.

*I am also going to attach a quick snapshot of what I am working on model/scene wise to give you a better overview.

Let me know:)

Hi Spencer, Of course, and thanks for getting back to me on this. On my end these are the issues I am coming up against (also I am on a mac): 1. Light Paint doesn't work, it inserts a light point wherever I'd last left my select cursor but it does not engage with the brush. 2. My file crashes and Blender closes any time I try to use the Shadow Paint. *I am also going to attach a quick snapshot of what I am working on model/scene wise to give you a better overview. Let me know:)

I'm not sure what you mean with "does not engage" with the brush - as in it doesn't update with each point you add?

Regarding using a mac - if you don't have that console toggle, you can open a Mac terminal and run Blender from the terminal. That will startup Blender and output error logs you can share here. Then I can more effectively be able to reproduce the error you have.

I'll test Light and Shadow Paint in the meantime. But again, I'm not able to reproduce, unless you give more steps or an error.

I'm not sure what you mean with "does not engage" with the brush - as in it doesn't update with each point you add? Regarding using a mac - if you don't have that console toggle, you can open a Mac terminal and run Blender from the terminal. That will startup Blender and output error logs you can share here. Then I can more effectively be able to reproduce the error you have. I'll test Light and Shadow Paint in the meantime. But again, I'm not able to reproduce, unless you give more steps or an error.

@Rachel-Campbell , just wanted to ping again: you still have this issue? I've even downloaded it directly from extensions.blender.org and still could not reproduce on 4.2.1.

If you can't provide the error message or a way I can reproduce, I'll have to close this ticket.

@Rachel-Campbell , just wanted to ping again: you still have this issue? I've even downloaded it directly from extensions.blender.org and still could not reproduce on 4.2.1. If you can't provide the error message or a way I can reproduce, I'll have to close this ticket.
Spencer Magnusson changed title from extension not working in my own projects (evee or cycles in Blender 4.2) to Extension not working 2024-08-27 22:44:12 +02:00

Hi Spencer,

Apologies, I was on deadline and had to make do w another add on.

Opened via terminal and honestly nothing happened - it didn't log anything and the tools didn't work when I'd selected them.

Made a quick recording if that helps.

I've started to use some other tools and don't necessarily need this to work right this instant so feel free to close the ticket.

Thanks again!

Hi Spencer, Apologies, I was on deadline and had to make do w another add on. Opened via terminal and honestly nothing happened - it didn't log anything and the tools didn't work when I'd selected them. Made a quick recording if that helps. I've started to use some other tools and don't necessarily need this to work right this instant so feel free to close the ticket. Thanks again!

I'll keep it open since you still have a problem, so long as you're willing to give feedback.

But from your video, it looks like the point lamp appeared and then moved after drawing, somewhere out of frame. So it's still updating, just not how we're expecting. Since there are no errors, it may be that the normals and surfaces it grabbed confused it. If you add a cube or sphere to the scene, move it far away from everything, and draw only on that, does it still work? If so, then it may just be the surfaces or objects of the books confusing it.

It's based off the normals you draw on. So if the surfaces you draw on face drastically different directions, the direction the lamp moves can "cancel out." Also note that it works on all visible objects, so if there's a transparent or wireframe object only object wrapping around your objects, it will hit that surface first.

I'll update the title as it seems more likely it is a user- or project-specific error, as I can't replicate it.

I'll keep it open since you still have a problem, so long as you're willing to give feedback. But from your video, it looks like the point lamp appeared and then moved after drawing, somewhere out of frame. So it's still updating, just not how we're expecting. Since there are no errors, it may be that the normals and surfaces it grabbed confused it. If you add a cube or sphere to the scene, move it far away from everything, and draw only on that, does it still work? If so, then it may just be the surfaces or objects of the books confusing it. It's based off the normals you draw on. So if the surfaces you draw on face drastically different directions, the direction the lamp moves can "cancel out." Also note that it works on all visible objects, so if there's a transparent or wireframe object only object wrapping around your objects, it will hit that surface first. I'll update the title as it seems more likely it is a user- or project-specific error, as I can't replicate it.
Spencer Magnusson changed title from Extension not working to Not working as expected (but only in their proejcts) 2024-08-28 16:15:36 +02:00

Hi Spencer,

Actually, that makes a lot of sense. Tried it out on a cube and that seems to work, so I think it's a surface issue. I am still pretty new to Blender, so all I can gather is that the models are perhaps too complex?

Hi Spencer, Actually, that makes a lot of sense. Tried it out on a cube and that seems to work, so I think it's a surface issue. I am still pretty new to Blender, so all I can gather is that the models are perhaps too complex?
Spencer Magnusson changed title from Not working as expected (but only in their proejcts) to Not working as expected (but only in their projects) 2024-08-29 16:31:36 +02:00
Spencer Magnusson changed title from Not working as expected (but only in their projects) to Surface complexity making lights harder to place 2024-08-29 16:32:05 +02:00

Tried it out on a cube and that seems to work, so I think it's a surface issue. I am still pretty new to Blender, so all I can gather is that the models are perhaps too complex?

Could be, but it may just be the direction of the surface. I don't know the geometry of your book scene example, but I tried to make a similar scene. I added a plane and stacked it multiple times. This is my attempt to light paint that:

image

While I painted the outside of the book, the surfaces I drew on all point up, so the light will only go up. This is because Light Painter takes on the direction of the surface, not the direction of its own lines. I could look into adding that as a possible option - may simplify trying to light complex geometry like this where the surface's direction can mislead Light Painter, if you will.

I'll update the issue name (again, sorry for the multiple times) and have this be something that can be looked into as a tool option.

> Tried it out on a cube and that seems to work, so I think it's a surface issue. I am still pretty new to Blender, so all I can gather is that the models are perhaps too complex? Could be, but it may just be the direction of the surface. I don't know the geometry of your book scene example, but I tried to make a similar scene. I added a plane and stacked it multiple times. This is my attempt to light paint that: ![image](/attachments/186bbf3c-0c29-4e5a-9c24-bcc483150820) While I painted the _outside_ of the book, the surfaces I drew on all point up, so the light will only go up. This is because Light Painter takes on the direction of the _surface_, not the direction of its own lines. I could look into adding that as a possible option - may simplify trying to light complex geometry like this where the surface's direction can mislead Light Painter, if you will. I'll update the issue name (again, sorry for the multiple times) and have this be something that can be looked into as a tool option.
254 KiB
Spencer Magnusson changed title from Surface complexity making lights harder to place to Surface normal vs Light Painter drawn normals 2024-08-29 16:39:59 +02:00
Spencer Magnusson added
enhancement
question
documentation
and removed
feedback needed
labels 2024-08-29 16:40:17 +02:00

Hi Spencer,

Looked through the above and think we're on the same page!
Excited to try this out!

Hi Spencer, Looked through the above and think we're on the same page! Excited to try this out!

Excited to try this out!

Let me know if the advice helped for your use case, or if it still has issues.

Experimented with generating normals directly from the drawings instead of the surface. From what I tried, it wasn't quite predictable enough in the resulting light's direction and position, even for use cases like this.

One last thing I'll try is add a toggle for placing the hit location and direction on the object's convex hull instead of the actual mesh. May be easier to draw for more complex meshes.

> Excited to try this out! Let me know if the advice helped for your use case, or if it still has issues. Experimented with generating normals directly from the drawings instead of the surface. From what I tried, it wasn't quite predictable enough in the resulting light's direction and position, even for use cases like this. One last thing I'll try is add a toggle for placing the hit location and direction on the object's convex hull instead of the actual mesh. May be easier to draw for more complex meshes.

Hey Rachel, just checking in. Working on another big release but still tinkering with this.

My convex hull idea in my last comment seems to work for single objects, just need to see how performant it is with a bigger scene.

Hey Rachel, just checking in. Working on another big release but still tinkering with this. My convex hull idea in my last comment seems to work for single objects, just need to see how performant it is with a bigger scene.
Sign in to join this conversation.
No Milestone
No Assignees
2 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: SMagnusson/light-painter#4
No description provided.