Turn a model into a specular light source - wpf

I have 2 models. One is a vehicle, the other is a series of tube lights. I want to be able to see only the specular reflections of the tube lights on the vehicle.
How can I turn the model of lights into a light source? I tried giving it an emissive material, but then found that an emissive material will not illuminate other figures.

Related

Physically Based lighting lost after using metal shader on another model?

i got 2 models on my scene (using SceneKit) - ring and diamond. Ring is with gold pbr material (SCNLightingModelPhysicallyBased) - second is diamond with "custom" material using Metal shader (SCNProgram). Right after developing diamond shader my golden ring stopped working and is pure black. Why is that ? When i simply set my ring to yellow and drop pbr lighting model it works, just not pbr - with pbr its solid black. I cant use SCNProgram with PBR ?
Are you setting the scene's lightingEnvironment? You will need a light source in the scene for the object to be lit. You can either use point lights or leverage image-based lighting (IBL) which is what the lightingEnvironment is for.
You can also try the autoenablesDefaultLighting property. With it SceneKit will try to adjust and add light sources in the scene depending on its contents, but its behaviour is subject to changes.

Create light rays (like a spotlight) in SceneKit

How would I go about creating a spotlight in SceneKit where you can actually see the cone of light, not just the light on the surface of the object it hits? Sort of like how you can see the Bat Signal's cone of light in the night sky.
It doesn't seem like SceneKit lights support this out of the box. The best I can come up with so far is adding cone geometry with material properties that sort of make it look light a light. But then how would I fade out the top part of the cone?

How to change color of dark spots in SceneKit?

How to change color of the area where light doesn't reach?
By default it's black, so how can I make it white for example? I couldn't find it, if its duplicate, please let me know how to form my question in order to find correct answer!
Thank you in advance
The "color of the are where light doesn't reach" demonstrates your problem, you have no light influencing your scene at this point. In any space/place where light doesn't reach, there is no colour, only blackness.
Here are the common ways of addressing 3D lighting:
1. Add more lights to places that create your ideal lighting
This is an artistic process, time consuming and arduous to get "just so". But it gets the best effects and the best atmosphere, generally speaking.
or...
2. Use an ambient light in your scene to light everything
When starting out, in 3D, there's so much to master that simply throwing in an ambient light and getting on with other work towards your goal is probably a good workflow. Work on artistic light last, use ambient lighting until then: https://developer.apple.com/reference/scenekit/scnlight.lighttype/1522769-ambient
Caveat:
Ambient lights will likely solve your problem of the dark edges, but will also wash out a lot of your existing shadows.
SCNLight has a property for changing the color of shadows. Here's a link to the page for more info. If you have any other questions, let me know, hopefully this helps.
SCNLight.shadowColor Link
You can also set the shading mode to Constant if you don't want a node to be affected by shading (making it therefore dark):

How to interpolate between colors for a polygon in Bing Maps

I have a WPF application with the Bing Maps API. What I have is a polygon rendering on many countries as well as real time statistics being display. I'm using this to keep track of where my server traffic is mainly coming from. The project is coming along nicely, but I hit a small roadblock. What I have are polygons that go from green to red and vice versa if there is a change in the statistics. If someone logs off then it would go into the green, if someone logged on it would go into the red. What I'd like to do is given a set number of users, let's say 20, I can gradually change the colors over a period of a second.
An example is 0 would be green and 20 would be red. So 10 would be yellow. With this, is there a way to gradually change colors?
Thanks in advance
There might be a fancy way of doing what you are looking for in xaml, but I imagine it would be a lot easier to to just have the color of the polygon bound to a property in your viewmodel/code-behind and then update the color whenever necessary.
For color interpolation, there is another SO question on it here.

Measuring amount of light using OpenCV?

My idea is to use vision sensor (camera) to measure amount of light. I would
like to know is it possible to acquire information about light intensity using
OpenCV?
Is there some openCV function property which can get such information from the
scene?
Many thanks in advance.
Light intensity is a tough one because most color systems can't tell the difference between lightness of a color and light intensity. You can get some idea of the light intensity in a scene by measuring the "lightness" of the scene overall. The saturation might also give you a decent clue.
To do this I would convert the color space to HSL and then aggregate the L channel to get a very rough measure of Lightness. The S channel is the Saturation.
OpenCV has this natively* but it's not a difficult operation. The Wikipedia page has the formulas.
http://en.wikipedia.org/wiki/HSL_and_HSV
*Thanks jlengrand and Seçkin Savaşçı

Resources