Pre loader

How to turn off light in 3d charting

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Answered
0
0

Hi,

How can we turn the light off and on in 3D drawings in Android studio?

Best regards…

Version
4.1.0
  • You must to post comments
Best Answer
0
0

Hi Mustafa,

I’m afraid we don’t fully support controlling lighting for 3D chart for now. We have partial support for surface mesh series where you can set LightingFactor.

May I ask what you’re trying to achieve?

Best regards,
Yura

  • You must to post comments
0
0

Hi Yura, thanks for answer. I try the code below but it didn’t work. Do you think there is an error in my code? If there is no error, I will search diffrent solutions.

    float lightValue = 0.1f;
        |
        |
        | 
ContourMeshRenderableSeries3DBase contourMeshRenderableSeries3DBase = new FreeSurfaceRenderableSeries3D();
        |
        |
        | 
    btnLightTest.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                                contourMeshRenderableSeries3DBase.setLightingFactor(lightValue);
                lightValue = lightValue +0.1f;
                if(lightValue>1) lightValue=0.1f;               
            }
        });
  • You must to post comments
0
0

Hi Mustafa,

May I ask what the problem is? I’ve tried to add similar code into our demo application and it worked. I’ve used this example as base, added button with this callback:

     binding.button.setOnClickListener(new View.OnClickListener() {
        float lightingFactor = 0f;
        @Override
        public void onClick(View v) {
            rs0.setLightingFactor(lightingFactor);
            rs1.setLightingFactor(lightingFactor);
            rs2.setLightingFactor(lightingFactor);
            lightingFactor += 0.1f;
            if (lightingFactor > 1f)
                lightingFactor = 0f;
        }
    });

You can see results on attached images.

Best regards,
Yura

Images
  • You must to post comments
0
0

Good

  • You must to post comments
0
0

@Yura thanks for answer. I am not interested in the project right now. Therefore, I could not return to you. Thank you for taking care of my question.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies