0

Other Headlight

Anonymous 10 years ago 0
This discussion was imported from CodePlex

egse wrote at 2014-02-25 16:28:

I am using an other headlight. I think it's less dazzling if a surface is normal to the direction:

``` ` var lights = new Model3DGroup();
        SpotLight spot = new SpotLight(Colors.LightGray, new Point3D(), new Vector3D(), 180, 0);          

        lights.Children.Add(spot);
        Binding b = new Binding("Camera.LookDirection");
        b.Source = _myViewPort;
        BindingOperations.SetBinding(spot, SpotLight.DirectionProperty, b);


        Binding bnd = new Binding("Camera.Position") ;
        bnd.Source = _myViewPort;
        BindingOperations.SetBinding(spot, SpotLight.PositionProperty, bnd);


        _myViewPort.Children.Add(new ModelVisual3D { Content = lights });``

objo wrote at 2014-02-27 22:59:

Nice approach, but isn´t the result the same?

This is an interesting topic, I have been thinking about adding some properties to control the relative position of the headlight to avoid specular reflections on such surfaces.

Also, could multiple headlights give a better lighting model?

objo wrote at 2014-02-27 23:00:


egse wrote at 2014-03-04 08:04:

Yeah, nearly the same. But I like it more. Thought I share it. Your approach with an other relative position sounds very interesting