Thankfully, with the assistance of a friend, and many hours spent in MLCad/LDraw, we've finally ended up with this:
(Full resolution available here.)
For now, setting up the cables and plugs was too difficult, so I doubt we'll put any sort of cables in the finalized renders, but after fully rigging the model (even going so far as to ensure the gears meshed correctly), we've determined important information such as what the range of motion for each joint is, what the full reach area is, etc etc.
It was a long process getting to this point, though. Unfortunately, I don't have access to my LEGOs right now. They're on the opposite side of the country at my parents' place, and I don't have the money to travel back and pick them up, and they're not willing to send them out, so for now they're just sitting in a box in a closet.
Because of this, I've had to do all the planning, engineering, and trial-and-error with a few sheets of paper, a pen, and my laptop. MLCad and LDraw have been absolutely indispensable throughout this project, and I'm really glad for them. Interestingly enough, after doing a few weeks' worth of testing and correcting design errors just via LDraw, a few more updates were made even after it was imported to Blender, but this is a nearly-finished render.
I'm very excited about this project, as I've never tackled something so challenging, but it's been a very interesting experience working entirely with a virtual model. Hopefully I'll be able to animate this in Blender and use the animation process to help further my code a fair bit, as animating the unit will translate roughly into the actual code I need for a proper inverse kinematics system!
Anyways, I wasn't sure where to post this, but yeah. It's been an interesting journey. A lot of the normals/faces on these model parts are backwards, so fixing those in blender was a hassle but very much worth it. No post-processing has been done on this picture, either; the blur effect was entirely done in-render. I'm very happy with the way things are progressing, and once I eventually get my hands on my old unit, I'll be able to fire up BricxCC and get back to work coding!
Maybe you could do a write-up about how to do this, so that others can learn from it, too!
I swear I came close several times xDmightor wrote:you managed to figure out how to use Blender without killing yourself ... Maybe you could do a write-up about how to do this!
In all seriousness though. It was a process of about two to three weeks, spending very late nights at a friend's house 'cause he's the blender expert. Initially I was just using a process like this:
Work in MLCad, save file.
Open with LDraw, export as STL.
Import into Blender!
Unfortunately this had a flaw: any multicolor part, such as the motors, sensors, and NXT brick all imported incorrectly, and the differently colored part (everything but the white bits) would simply not exist. We tried exporting as 3DS files instead of STLs, but those took up a LOT more space, and kept crashing his computer, which is a several-thousand dollar kick-ass gaming desktop with 16gb RAM and 2gb dedicated VRAM per video card, which he has two of.
Eventually we realized that the current version of blender has support for .ldr files, assuming you install the LDraw parts library to a very specific location. Once we did that, our workflow changed into thus:
Work in MLCad, safe file.
Import into Blender!
Unfortunately, since a lot of the faces are backwards due to people rushing through the job of modelling several hundred thousand lego parts (who can blame them though), we just turned on some function in Blender that showed the back faces in one color and the frontfaces in another one. Then we were able to click on every single face that was backwards and manually invert them.
Once all the faces were arranged correctly, shading worked dramatically better, and there weren't random holes in parts (like gears and motors).
After parenting some parts and using a few simple scripts to get the gear ratios right, we have (almost) the whole thing fully rigged. All of the basic movement on all three axes works great, and everything is constrained to the actual physical limits of the model. Hopefully next week we can work on the touch/pressure sensor assembly and get that rigged, that'll be the last thing before we can officially start animating it.
Edit: It does look very much like a photograph, but the grey chunk of the NXT Brick is slightly off-colored, which is the only quick indication it's a render xD
Getting the whole model from a pair of concept sketches to a fully-finished .ldr file was the most difficult part, I think, but now we've got it finished and to the point we can work on actually rendering real animations. Hopefully those results will be even better!
P.S. Using an android's native camera to capture a photoshpere for the 3D environment is... not a good idea, heh. For some reason it just can't patch up the images very well, even on a flagship Nexus device. Once we get that working (I'll be trying on an iPhone soon) we'll be able to officially publish renders.
Also I'm running on a netbook with a surprisingly decent graphics system and 8gb RAM, so while it's no 32gb RAM beast with two identical video card beasts like my friend's computer is set up as, it's still actually capable of handling things better than I expected.
Users browsing this forum: No registered users and 9 guests