Skip to content
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

Make Point Light radius modifiable #34

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

howetuft
Copy link

Currently, Point Light radius is hard-coded to 50mm, which can be somewhat huge for certain scenes (for instance, a scene containing small parts...). I propose you to let the radius be initialized to 50mm, but to make it modifiable afterwards via the GUI.

Currently, Point Light radius is hard-coded to 50mm, which can be somewhat huge for certain scenes (for instance, a scene containing small parts...). I propose to let it be initialized to 50mm, but to make it modifiable via the GUI.
@luzpaz
Copy link
Contributor

luzpaz commented Dec 7, 2019

@furti care to weigh in on this?

@furti
Copy link
Owner

furti commented Dec 7, 2019

Completely missed this pull request. Sorry for this.

It looks good to me. I will try to merge it this week. I'm ptetty busy at the moment.

@howetuft
Copy link
Author

howetuft commented Dec 7, 2019

Thank you very much. By the way, I may send you some others in the next days!

howetuft and others added 5 commits December 8, 2019 18:17
A Power property will be needed for physical based renderers (Luxcore,
Blender, Appleseed...)
Users can't see that the section has been expanded. This commit fixes this
@howetuft
Copy link
Author

Hi Furti, I pushed a new commit to add a RenderingPower property on point lights: it is needed for physically-based renderers (lux, appleseed, cycles...).
I also rebased my work (therefore you can see commits from Luzpaz.
May you please merge this?
Thanks in advance!

@furti
Copy link
Owner

furti commented Dec 31, 2019

@howetuft as i asked before. Why do we need the same setting twice? For me "rendering power" sounds a lot like "intensity".

If the reason is we should have a unconstraint intensity setting, we should remove it and calculate the intensity for coin based on the RenderingPower.

Having it twice will lead to some confusion i think.

I would also call it "power" without the "rendering" predix then.

@howetuft
Copy link
Author

howetuft commented Dec 31, 2019

Yes, the main reason is that OI Intensity is upper bounded, whereas Power is not, and I cannot figure out how to map a unbounded value to a bounded one (see my post: https://forum.freecadweb.org/viewtopic.php?f=10&t=40623#p346806).

we should remove it and calculate the intensity for coin based on the RenderingPower.

I agree: for instance, we could link Intensity to power with something like Intensity = min(1,Power/K) (K being a constant, for instance K=100) and hide Intensity to the user.
Do you agree with that?

I would also call it "power" without the "rendering" predix then.

Sure! I can push a commit soon for that.

@furti
Copy link
Owner

furti commented Dec 31, 2019

for instance, we could link Intensity to power with something like Intensity = min(1,Power/K) (K being a constant, for instance K=100) and hide Intensity to the user.
Do you agree with that?

Yes this is what I had in mind. You have more experience with the different renderers. So maybe there is a value K that gives a similar result for the intensity in FreeCAD like it would give in the supported renderers. So e.g. the maximum value for RenderingPower someone would ever set in a Renderer is 10000, than using 10000 for K might be a good choice.

This commit introduces a Power attribute for Lights objects, in place of
previous RenderingPower and Intensity attributes:
- RenderingPower (used for external rendering) is removed
- Intensity (for Coin) is now read-only, linked to Power, and hidden to
user
@howetuft
Copy link
Author

howetuft commented Jan 2, 2020

Hi @furti,
As a follow-up to our exchange 2 days ago, I wrote some code to implement a single Power attribute in place of Intensity and RenderingPower:

  • RenderingPower is now removed.
  • Intensity I kept, but in the background, relinked to Power. I wrote something that should ensure backward compatibility (for already created point lights). Note: I finally set K to 100...

My commit is above...
Thanks!

@howetuft
Copy link
Author

Hello @furti,
I hope I find you well!
Have you had time to look at my last comments above?
The PRs I proposed for point lights in the Render workbench are merged now, but they require point lights to bear a Power property...
Would it be possible for you to please give me some feedback, or even merge my commits?
Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants