colorpicker with uv coordinates

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

  1. #1

    Default colorpicker with uv coordinates

    i thought it would be easy to figure out how a colorpicker for textures could
    be done. but i run into a problem!

    i made a cube and generated for each face a random texture using imaging
    lingo. than mapped the textures on the cube. now i want to click on the cube
    and get the color from the texture.

    to do this i use modelsunderloc, this gives the uv coordinates of the polygon.
    with this uv coordianates i thought it would be easy to project them on the
    image and read the color with getpixel.

    this works with all polygones that have a faceID of 2, faces with faceID 1
    will give you strange values for the uv coordinates.

    here is a online demo:
    [url]http://kisd.de/~lutz/crap/color/colorpicker3D.zip[/url]

    i tried this now for some hours and i am not sure how to fix this problem, so
    please help me with this problem.

    regards!

    hondo3000 Guest

  2. Similar Questions and Discussions

    1. Convert user space coordinates to device coordinates
      Hi, I need to convert the coordinates of a word (PDWord object) to device coordinates (the actual coordinates on the screen). Could someone please...
    2. Retain ColorPicker Colors
      How do i make a colorPicker retain its previous colors when its dataProvider changes. Currently i have a bunch of colorPickers but i want it such...
    3. x and y coordinates
      Is there a way to enter the x and y coordinates of an object to change its position on the page. I see the info pallette gives the x and y...
    4. hitTest coordinates
      Hi there, I have a problem wit ha complex call to 'hitTest' to test a point collision. Which coordinates does the clip.hitTest(x,y) use? Are...
    5. Some help with coordinates please!
      Hullo! Ok, so, I have this friend (clichè? no, no, I swear it's true!) that has a problem. I thought i could help her but I couldn't after all. ...
  3. #2

    Default Re: colorpicker with uv coordinates

    Here are some references

    [url]http://steel.lcc.gatech.edu/~dmccolgin/texture2.html[/url]

    [url]http://www.directorforum.de/showthread.php?p=78237[/url]


    Unfortunately the tidy ready made utility script I fould before didn't
    surface on the web, with enough clever picking you should be able to
    turn up some better examples.
    JB Guest

  4. #3

    Default Re: colorpicker with uv coordinates

    thanks for the links, did not find them on my own...

    but now i got the colorpicker to work, trick is to use the
    texturecoordinatelist together with the points of the face to calculate the
    point on the image of the texture. so a meshdeform modifier has to be used.

    but if someone is interesting in looking at the code, here is the version that
    works:
    [url]http://kisd.de/~lutz/crap/color/sphere[/url]

    and thanks again for the links!

    hondo3000 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