Drawing with the wand

Hi y'all. I am trying to implement a feature that allows for strokes to be generated from the wand hand too (using a custom separate pointer). I am currently using an older version of Open Brush that does not allow for multiple pointers to generate strokes at asynchronous intervals (in respect to both hands' trigger-pulls). My question: Does anyone know if there has been any changes to the newer version of OpenBrush (2.+) that would interfere or possibly make implementing a feature like this easier? I haven't seen anything relevant in the patch notes or in the code but thought I would ask just in case.
11 Replies
andybak
andybak•2y ago
@rockndot Let me know if you want to try this approach. I'm just about to push a breaking change and update the docs so you might get confused if you grab a copy at the wrong time. Off the top of my head it would be something like:
Settings = {space="canvas"}
function Main()
return Transform:New(Wand.position, Wand.rotation)
end
Settings = {space="canvas"}
function Main()
return Transform:New(Wand.position, Wand.rotation)
end
saved as "PointerScript.something.lua" Ah - except you'd have to switch controlling painting with the wand trigger as well. Hmmmm... I don't currently have "onTriggerReleased" for the wand but I was going to add it in soon... Anyway - let me know. I'm also curious why you're using an old version of Open Brush?
Rockndot
RockndotOP•2y ago
Hey Andy. Sorry for the late reply - just saw this now Wow that looks quite fascinating. I assume this plugin feature for pointer scripts is somewhat new? I am using an older version because last summer I started a project as a research assistant. I created a mod that takes recordings of VR movement in the form of datasets that include transforms of controllers, headset, etc. and then visualizes all of that trajectory/movement data. To do this, I have modified PointerManager.cs to handle additional custom aux pointers so that multiple strokes with completely different trajectories can be drawn simultaneously with separate trigger-pull intervals. I also was able to implement wand-hand drawing too, so the wand hand can basically act as an additional brush hand (which I guess could be cool if you are one of those ambidextrous drawers 😆 ). There was a gap with the project after Open Brush updated to 2.0, so we are just getting prepared to upgrade now. I was just checking in to see if there was any possible conflicts that come to mind. I do wish I started this project when these plugins were available though - I think they may have been a nice route to take.
andybak
andybak•2y ago
I'd suggest getting up to date and then making sure you merge in from the main branch regularly. It will make life much simpler. Also - in general chatting to us - so you know if there's any big changes coming down the road. We would have given you a heads up about the 2.0 changes if we'd known you were working on a fork. I'm keeping a couple of forks up to date at the moment.
To do this, I have modified PointerManager.cs to handle additional custom aux pointers so that multiple strokes with completely different trajectories can be drawn simultaneously with separate trigger-pull intervals. I also was able to implement wand-hand drawing too, so the wand hand can basically act as an additional brush hand
If you track the plugin-scripting branch then most of the above has been implemented - you could switch to using m_ScriptedPointers and hook in your own interactions. That way you'll move closer to how things will be implemented on main which should make upgrading easier in future. It's safe to track the plugin scripting branch instead of main as I'm constantly merging in changes from main - it's not going to drift away
Rockndot
RockndotOP•2y ago
I will run this by my professor. About a year ago we added many features. I don't recall seeing anything about plugin scripting back then. We also added a ton of supporting UI for our features so I am afraid that by switching to plugin scripting our mods wouldn't be usable anymore. Lmk what you think.
andybak
andybak•2y ago
Is it all in version control?
Rockndot
RockndotOP•2y ago
Yes
andybak
andybak•2y ago
I think the big question to ask is "is it worth getting back in sync with the main open brush?" If your app is going to have a development future longer than say 6 months or a year I think the answer is probably "yes". In which case the sooner you do this, the less painful it will be.
Rockndot
RockndotOP•2y ago
Yes, I totally agree. I am just not sure whether or not the project will be continued or not after that time period. Thanks for all the help by the way!
andybak
andybak•2y ago
If you can share the code, I'd be happy to take a look
Rockndot
RockndotOP•2y ago
I'll ask if I can do that Thanks

Did you find this page helpful?