Adding a light in Lingo

Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default Adding a light in Lingo

    Can someone please help me with this? I want to have a light under a car model
    that shines down on the ground. I know how to create a light in Lingo, but I
    can't seem to get it to position under my model. Also, can I attach the light
    to the model?

    extol Guest

  2. Similar Questions and Discussions

    1. Help with possible reasons for red light?
      Hello, Maybe somebody here has encountered the problem where the Admin console cannot connect to the 'server1' server? Trying to log in to...
    2. Light Source
      I was wondering if you could have more than one light hitting a 3D object? If so how?
    3. adding lingo to a flash button
      hey guys. i need to be able to add some lingo to a flash button. the lingo needs to establish the global sound setting for multiple .dxr movies, and...
    4. pantone light box PVL-310
      I have several BRAND NEW Pantone PVL-310 light boxes for sale. Please see...
    5. LED there be Light, a D.I.Y. LED ringlight
      Please have a look at http://users.pandora.be/cisken/LED_ringlight/LED_ringlight.html It took me hours to compose this report. So I really don't...
  3. #2

    Default Re: Adding a light in Lingo

    You can attach any node to any other node in the scene graph. A node can be a
    model, a group, a camera or a light. Use the addChild() method with the
    #preserveWorld parameter. By the way, you can attach the light to the model in
    3DS Max, saving you the hassle of the code.


    Newt99 Guest

  4. #3

    Default Re: Adding a light in Lingo

    been using javascript syntax for some time, so my lingo is a little rusty.
    others can probably help with my errors. but it would go something like:

    -- car stuff
    theCar = member("w3dmember").node("carNode")
    carPos = theCar.getWorldTransform().position
    -- light stuff
    theLight = member("w3dmember").light("theLight")
    theLight.getWorldTransform().position = carPos
    -- make light child of car
    theCar.addChild(theLight,#preserveWorld);

    you'll now need to point the light at the ground, don't know what state
    everything was in befroe adding light, but rotating it shoudl work,

    theLight.rotate(-90,0,0)

    hth

    Ex Malterra Guest

  5. #4

    Default Re: Adding a light in Lingo

    Thanks for the help, guys. I am trying to make it so you can click on a car to
    get details about it and the selected car has a glowing circle under it (that
    follows the terrain below). I want to be able to do it dynamically.

    I tried adding a spot light in 3ds Max and put it exactly where I wanted and
    how I wanted it to look, but when I exported it to director, it isn't right. I
    tried rotating, and everything. I just can't seem to the the light UNDER my
    model and to shine down into a small circle on the ground. Any ideas?

    extol Guest

  6. #5

    Default Re: Adding a light in Lingo

    In that case, I would fake it.

    I would use a plane textured with an alpha channel bitmap of a round with a
    transparent feather effect (for the glow). I would set the emissive color of
    the shader for this round to rgb(255,255,255) to light it. Then, I would just
    set the visibility of this plane object to #both / #none when I want to display
    / discard it.

    You can create the bitmap in Firefox by creating a Shape, then clicking + to
    add the glow then select the transparent color for the background (in the
    Properties at the bottom). Then save as PNG (default).

    Cheers,
    Karl.

    [url]http://www.chromelib.com[/url]

    Newt99 Guest

  7. #6

    Default Re: Adding a light in Lingo

    I meant Fireworks, not Firefox ;-)
    Newt99 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139