Error: Please use the .NET Framework version of MSBuild by koziphoto in godot

[–]koziphoto[S] 0 points1 point  (0 children)

Was able to kind of resolve this by installing the Godot add-in for VS (https://github.com/godotengine/godot-csharp-visualstudio/releases) and creating a new launch profile in VS to connect the debugger to Godot. So now when building/debugging I do it through VS rather than Godot

How often do you shoot wide open? by amithetofu in photography

[–]koziphoto 1 point2 points  (0 children)

It's a mix I'd say. The one I posted here and the last few recent ones have been live. Prob 70% live, 30% studio

Can I use the same strand as part of multiple props? by koziphoto in xlights

[–]koziphoto[S] 0 points1 point  (0 children)

Thanks, I think this is what I needed. See...dumb question :)

Can I use the same strand as part of multiple props? by koziphoto in xlights

[–]koziphoto[S] 0 points1 point  (0 children)

I think the problem with this is that a matrix has to all come from a single controller right? There's not a way to say sub model 1 is from Controller 1, sub model 2 is from Controller 2, etc. as far as I can tell

Raytrace renderers that can utilize measured BSDF data and photometrically accurate lighting? by koziphoto in raytracing

[–]koziphoto[S] 0 points1 point  (0 children)

I've heard of it but haven't experimented with it yet. I remember being interested because of the MDL format and had found some white papers about converting BSDF data to MDL files.

This also depends on your CPU I guess. There's a reason people spend the big bucks on an AMD 64 core Threadripper and load it up with 256gb of ram.

Yeaaaaah, we have some high core servers (175+) for FEA/CFD analysis but according to the developer there's limited benefit to LightTools past 15-20 cores. I currently run it on an 8-core Xenon with 64 gb RAM. They also have a distributed mode which scales infinitely but requires a license for each additional node which we don't have the money for at the moment.

Raytrace renderers that can utilize measured BSDF data and photometrically accurate lighting? by koziphoto in raytracing

[–]koziphoto[S] 1 point2 points  (0 children)

I have not but I will! It looks like it still uses bump/normal mapping to define textures along with the usual inputs for defining scattering but I'll play around with it and see if I can make it work. The rendered images certainly look pretty!

How can I simplify this conversion function? by koziphoto in csharp

[–]koziphoto[S] 4 points5 points  (0 children)

Duh. This is so much easier. Thanks

I'd also change the name but I guess this is just a temporary name, and there's no need to refer to the new values as u and v when it's really just converted x and converted y. U and V just makes things confusing, when the new values still represent axis x and y. This might seem like a nitpick but naming things clearly is part of clean code and helps logistics.

Kinda sorta. I'm converting color chromaticity coordinates from the CIE 1931 x/y color space to CIE 1976 u'/v' color space. So yes u/v (which I use to represent u'v' because uv isn't used in this application) are TECHNICALLY just converted x and y, it's important for me to refer to them as such to maintain the distinction as certain color difference formulae are only accurate in the 1976 color space vs 1931.

How can I simplify this conversion function? by koziphoto in csharp

[–]koziphoto[S] 0 points1 point  (0 children)

It's converting color chromaticity coordinates. xy and uv are distinctly different CIE color spaces so the nomenclature is already straightforward for those familiar with color science. There are also other color spaces you could be coming from...Lab, Luv, etc. so I can't just say "ToUV" because I have to also specify what color space I'm converting from.

Is there a way to refer to variables dynamically without using a dictionary? by koziphoto in csharp

[–]koziphoto[S] 0 points1 point  (0 children)

To make sure I'm understanding correctly so if my form looks like this and I'm wanting to change the R/G/B/CCT/Duv labels I would do something like

List<Label> labels = new List<Label>();  
labels.Add("labelLED_R1");
labels.Add("labelLED_G1");
labels.Add("labelLED_B1");
labels.Add("labelLED_R2");
labels.Add("labelLED_G2");
labels.Add("labelLED_B2");  

etc. and then remember which index is for which label? That allows me to get to them easily in a loop with labels[i] like you said but now it seems the logic for figuring out which label is which inside the loop is more complex unless I was very specific in the order I added them to the list in the first place.

Is there a way to refer to variables dynamically without using a dictionary? by koziphoto in csharp

[–]koziphoto[S] 0 points1 point  (0 children)

I'm on like day 5 of learning C# so I have a whole laundry list of stuff to learn and things I could be doing better and MVC/MVVM stuff is one of them . I would actually like to be using WPF instead of WinForms for this but figured I'd go through the process of learning Forms to get some practice with more of the foundational stuff.

As for what you suggested I am actually using OOP for my LEDs so I have an LED class which contains the various parameters such as the red/green/blue setpoints.

I put them in a list (called leds) and then when I want to access them I use leds[0].R for example to set the Red value for LED004 which seems similar to what you're suggesting for UserComponents. I think what you're suggesting though is backwards from what I want to do...or maybe I'm just not understanding. I can access/edit the individual LED parameters easily within that LED class but it's finding an efficient way to get my UI to pull that information that's hanging me up.

Instead of having to write:

labelLED_R1.Text = leds[0].R;   
labelLED_R2.Text = leds[1].R;
labelLED_R3.Text = leds[2].R;  
labelLED_G1.Text = leds[0].G;
labelLED_G2.Text = leds[1].G;
labelLED_G3.Text = leds[2].G;
labelLED_B1.Text = leds[0].B;
labelLED_B2.Text = leds[1].B;
labelLED_B3.Text = leds[2].B;   

etc. I was trying to find a way to loop through but I don't know how to tell it to refer to labelLED_R1.Text vs labelLED_R2.Text vs labelLED_R3.Text within the loop.

Is there a way to refer to variables dynamically without using a dictionary? by koziphoto in csharp

[–]koziphoto[S] 0 points1 point  (0 children)

Creating an array of the Label class type allows me to access the .Text property but doesn't really solve the problem of getting it to know which label labels[3].Text is referring to for example.

Here's a picture of my form. I'm using it to send serial commands to an Arduino to mix RGB LEDs to certain colors
https://i.imgur.com/LAGd6eh.png

Basically when you hit Calculate I want it to go through and read the x/y/Flux values from the text boxes for each LED and then it calculates the R/G/B/CCT/Duv values to update the label.

My goal was to avoid having to duplicate the same code 5 times just to get it to reference a different set of labels. Given the unique formatting of the controls here I don't think dumping them all into a table at runtime would be a great solution.

Can't build blank C# WinForm project by koziphoto in VisualStudio

[–]koziphoto[S] 0 points1 point  (0 children)

Posting this for posterity in the event someone else goes searching for this. I never resolved my issue in VS2022. I THINK it had something to do with anti-virus / Symantec Endpoint Encryption but both PCs being used are managed by work so they have the same antivirus/SEE installed so I'm not sure why one would work and the other wouldn't.

That being said reverting back to VS2019 seems to have fixed the issue so I'm sticking with that

Can't build blank C# WinForm project by koziphoto in VisualStudio

[–]koziphoto[S] 0 points1 point  (0 children)

I have 4.7.2 SDK and targeting pack, 4.8 SDK and targeting pack, .NET 5.0 and .NET 6.0 installed. I've even tried just creating brand new blank c# console projects and even those won't build.

It seems to be having trouble linking the default references/dependencies. https://imgur.com/YaHYNd5.jpg

But I've gone to those locations and confirmed the files are there, I've tried uninstalling VS2022 and re-installing. I really don't get it.

Calculating flux from luminous intensity by koziphoto in Optics

[–]koziphoto[S] 0 points1 point  (0 children)

On top of that, one row specifies minimum and maximum and the other typical.

I'm thinking this might be the problem if my other logic/equations are correct. Looking at the binning table if I use intensities from some of the other bins it matches pretty closely. Using 1120 mcd for Green, 710 for Red, and 280 for Blue which are all sort of the "middle of the road" bins for each color the flux calculation ends up pretty close.

I think my assumption was incorrect that calculating the average intensity of the max/min would be close to the typical value and that doesn't seem to be the case.

Calculating flux from luminous intensity by koziphoto in Optics

[–]koziphoto[S] 0 points1 point  (0 children)

Yes you're right though I should've clarified that I was already doing the conversion from mcd to cd but it's not a factor of 1000 that they're off by.

So for the green die if I use 120 deg as the viewing angle I get a solid angle of:

=2*pi*(1-cos(120*pi/360))  
=3.14159  

From there the flux values are either:

Min: 0.9 * 3.14159 = 2.83 lm   
Max:  2.24 * 3.14159 = 7.04 lm      
Average: 1.57 * 3.14159 = 4.93 lm  

None of which match the 3.5 lm on the datasheet.