here is the mouse over magic to get the correct projection to cast the ray https://github.com/jesterKing/blender/blob/master/blender/release/scripts/templates_py/operator_modal_view3d_raycast.py
Note* this is not the BVH flavored ray - it's just a example of the math to cast the ray youll need to cast inside the BVHTree instead * On Tue, Mar 15, 2016 at 10:25 PM, Jacob Merrill <[email protected]> wrote: > https://www.youtube.com/watch?v=K-MLpEmVgT8 > > I build the tree on init -> then I use a hitpoint provided by the game > engine physics, but I think you will want to use the camera projection and > the mouse x,y to build the raycast, from there you can get all units in a > radius, you can then get the distance from the hitpoint to do the color > based on a multiplier > > https://www.youtube.com/watch?v=K-MLpEmVgT8 > > > On Tue, Mar 15, 2016 at 10:20 PM, Jacob Merrill < > [email protected]> wrote: > >> I have used bvh accelerated raycast via Python to do fx in game in the >> game engine, and I have also used kdtree, >> >> It's fairly simple, and a great idea, would it be in Python, or C etc? If >> it is python I can help with that. >> On Mar 15, 2016 10:16 PM, "Nathan Vollmer" <[email protected]> wrote: >> >>> Hi everyone! >>> >>> My name's Nate Vollmer, and I'm a student at Idaho State University >>> interested in computer graphics. (One of my projects last semester: >>> http://www2.cose.isu.edu/~bitinat2/RayTracer/) >>> >>> I've written a draft for Blender's GSoC realizing the BVH vertex/weight >>> suggested idea, and was wondering if I could get some feedback/tips on my >>> proposal. Vertex painting is a very important feature for character >>> riggers, and I'd like to make it as convenient and efficient as possible. >>> >>> I appreciate all the help! >>> -NateVB >>> _______________________________________________ >>> Bf-committers mailing list >>> [email protected] >>> http://lists.blender.org/mailman/listinfo/bf-committers >>> >> > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
