Light source

This topic contains 7 replies, has 3 voices, and was last updated by Avatar luowei777 3 months, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14435
    Avatar
    luowei777
    Participant

    Does vc support light source addition to component?what can i do if  i want add a blinking light source in a component.In some scenerio, it is quite useful.

    Thanks a lot.

    #14439
    eme
    eme
    Moderator

    You can do that using the python API. The light sources can’t be attached to a component but you can modify the position of the light in a script in the OnSimulationUpdate event to keep the light ‘attached’ to a component.

    This snippet shows the basics.

     

    Then you can make it blink like this:

     

    #14473
    Avatar
    luowei777
    Participant

    Thanks so much for your reply,but it seem do not work as you told.I did not see any light in VC 3D world,I have tried to scirpt both  in componet and plugin form .Did you test it in your VC, I am not sure where went wrong.no light here

    #14487
    Avatar
    Jobez
    Moderator

    You could try to increase the intensity of the light to see the effect more clearly.

    For example:

    L.Intensity = 1000.0

    That value is quite large but you should see if it works.

     

    #14499
    eme
    eme
    Moderator

    Also notice that the location 1000,1000,1000 in the example script is world coordinates. You could use e.g. app.OnRender event to update the location of the light dynamically.

    Also the light acts a little differently in the Shaded mode than in the RealisticShaded mode. I’ll try to add some example light components in the online ecat.

    #14502
    Avatar
    luowei777
    Participant

    I got another question troubling me for some time, does VC have a mouse click event Python api when clicking a component or i have to use the netCommand to do it(which one), I would like to script  it inside the component.Please enlighten me,thank you.

    #14517
    eme
    eme
    Moderator

    Please use more suitable thread. If you can’t find one, please create a new one.

    This thread is for “Light Source”

    #14706
    Avatar
    luowei777
    Participant

    hi there,any progress yet?I hear it is powered by unity 3d,can i use light function in unity, i am  trying this way.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.