Results 1 to 7 of 7

Thread: Painting on 3D models

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Painting on 3D models

    Hi all,

    I made a simple test on how to draw pixels directly on a 3D model.


    The full article how it works is located here: http://www.necrosoft.nl/?p=301
    NecroSOFT - End of line -

  2. #2

    Re: Painting on 3D models

    Looks interesting. Perhaps you could work a bit more on the picking technique and then write an article for Will's Pascal Mag?
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Re: Painting on 3D models

    Quote Originally Posted by pstudio
    Looks interesting. Perhaps you could work a bit more on the picking technique and then write an article for Will's Pascal Mag?
    I second that! Could work for a section in the mag that covers small tips and tricks. aka 'How To Do All Kinds of Small and Cool things'
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #4

    Re: Painting on 3D models

    Hey man.. Nice technique.

    I wouldn't have thought of this approach. I'd have done it like this:

    > Cast a ray into the scene and pick the first triangle
    > Determine the UV-coordinate of the ray by using the three UV-pairs of the triangle (We may need barycentric coordinates here, not sure).
    > Lock the texture and paint the pixel at that UV-coordinate.

    This works for a simple pen tool. If you want lines and brushes, you need to do more, like take the viewing angle of a triangle into account, and take care of any pixels drawn on adjacent triangles. To summarize, it would be awefully tedious to implement, but VERY cool if succesfull.

    I'm sure there are more approaches, but i think this one is kinda original. It might need further optimization though.

    Nice work.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: Painting on 3D models

    Yup,it can be done by ray picking triangles, but this works for everything, every model and high poly models without optimization or intensive calculations. It's just a pixel lookup under the mouse. And it's also pixel-precise.
    With some modifications I can make it more precise on large textures also.
    NecroSOFT - End of line -

  6. #6
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: Painting on 3D models

    Ok, I made some changes and added a movie on youtube.

    http://www.youtube.com/watch?v=xegY7AKdt-Y
    NecroSOFT - End of line -

  7. #7

    Re: Painting on 3D models

    wow... pretty neat stuff.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

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