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
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 -
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
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.
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 -
Ok, I made some changes and added a movie on youtube.
http://www.youtube.com/watch?v=xegY7AKdt-Y
NecroSOFT - End of line -
wow... pretty neat stuff.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Bookmarks