I haven't posted here much, but I'm hoping to do a weekly post of what work I've been doing each week. Seeing as I haven't done a blog post for a while, I'll cover a few things I've been working on in the previous months. Does that sound fun? I don't know, but you've already loaded the page now, so you may as well read a bit more. Scene Nodes: An interesting little experiment in Blender I did a few weeks ago is something I'm calling 'Scene Nodes'. Blender used to have something called the 'Oops Schematic View' in the Outliner, which allowed you to view your 3D scene in a visual, node based way, showing the relationships between your assets. This feature never made it into the revamped Blender 2.5 so I thought I would have a go at recreating it with Python. Partly, that was because I just thought it would be fun (it was 50% fun, 30% googling, 15% deciding what colour each node should be and 5% crying) but also because I thought that if it proved to be popular I might develop another add-on to sell on the Blender Market. The result above shows all the different objects and materials in my scene and also the relationship between them. 'Cube.001' (orange) is the child of 'Camera.001' (grey) and also a parent to 4 objects (orange) and a lamp (yellow). I got it working so that not only could you press a button to generate this node setup, but that duplicating nodes would duplicate the actual object, deleting a node would delete an object and changing the connections between objects would change the real object's parenting. Before you go rifling through you wallet to find money to throw at the screen* (because you obviously love the sound of it, not because you're misguidedly attempting to throw loose change into my eyes), while it was quite fun to do, I'm not entirely sure that there's enough interest in it for me to make it an add-on. My last add-on wasn't really cost effective, considering the development time vs monetary return. I'm not ruling out making it an add-on, but I don't think it's a 'high-priority' project. *and people say I'm a fantasist.** **If anyone of importance is reading this, I'm lying, no one has ever called me a fantasist. It was just a joke, which we (I) here at www.RayMairlot.co.uk deeply regret. Experiments with Unity: I've also been making a game with a friend, not in Unity as the title might suggest, but in Flash. Flash might get criticised a lot, but for making a cross-platform game it really makes a lot of sense (to me). However, I'm well aware that several sites are moving away from flash, at least for video delivery, so I thought I would make some investigations into other game engines, just in case the day comes that Flash content is no longer run by web browsers. I decided that I would try out Unity as it has a free version and I got to grips with one of the tutorials. I wasn't best pleased to find my simple tutorial scene of a ball rolling over a plane, collecting yellow diamonds, came to an eye-watering 170MB. God help me if I try something complex*. Maybe I can cut that size down somehow, but at least it does cross-platform publishing pretty easily. *Dear God, I know you're busy, but please help me squash these megabytes. If you help me (for free) I'll tell everyone it was you that helped me and I think that will be great exposure for you. Thanks, Ray. I had originally thought that if I wanted to learn Unity it would be better if I already had a working game in Flash, so that when trying to re-create it in Unity I wouldn't have to be worrying if the logic of the game was correct, only the conversion of AS3 to C# (one of Unity's coding languages). I made a little Tetris game in Flash, but having seen the large file size Unity creates I was put off from actually trying to convert it. I realised that Flash is still the better option for me, but that Unity was a viable alternative if I really needed it. That's not to say making the Tetris game was a waste of time; it helped me a lot with realising how to implement OOP concepts properly, which I can put to good use in the game I'm making in Flash. All in all, quite a few experimental projects, but now I'm back to my main one, which I may start to reveal soon. Or not, know one knows. If people say they know, they're lying. Unless that people is me. Ray.
Comments
A few days ago I released my first add-on on the Blender Market: Animated Render Border. It's an add-on that allows the render border feature of blender - which allows a portion of an image be rendered - to be animated and track objects. This can cut down render time by skipping rendering the background (which might be blank if using render layers) or by rendering only a specific part of an image for a whole animated preview. I won't go too much into the details of it as that's all I seem to have done over the last few days, and frankly, I've bored myself by writing the same blurb on all the various social sites and forums. Instead, indulge yourself by watching the (relatively) short video below which is a full demo of the add-on, and of course, feel free to head over to the Blender Market to buy yourself a copy: This add-on was originally started in February this year. It was just an experiment that I thought might be useful at some point. I'd seen a few attempts at such an add-on and a few more blog posts lamenting the lack of such features and surprisingly, I had quickly got the core code to work in the viewport. After that, other priorities took hold and I left the add-on, only to be reminded of it recently by a few posts on Blender.StackExchange and by my own attempts to use it, forgetting I had left it unfinished. I had thought at some point I could release the add-on as a bit of publicity for my site, but the fact that some highly skilled python coders seemed to be coming to the conclusion that an add-on like this could be useful, prompted me to finish it before they might be tempted to do the same and 'steal my thunder'.
At that point I hadn't thought about selling it, I just wanted to quickly finish it and release it. I'd thought about it originally, an extra revenue stream is always welcome, though I wasn't sure if the add-on might be too simple for the Blender Market, but all that slipped from my mind until I was a few weeks away from releasing it for free. Reminded of my idea to sell it I did a bit of investigation and applied to be a vendor on the Blender Market by describing the product I would like to sell. My application was approved, which meant I had to fill some of the extra requirements of releasing on the Blender Market. Don't get me wrong, they're perfectly acceptable requirements, ones I would have set myself, just ones I hadn't been thinking of when I thought I'd "quickly finish and release it". I wasn't just finishing up the code, I now had to think about a video demo, documentation, product images and descriptions, future updates and promotion. I was reminded of each one of these just at the point I thought I might be nearing the end. So the project, like all projects, was a bit longer to finish than expected. There is also a bit more pressure when releasing a paid add-on. Getting it functional wasn't good enough, I now had to look at it from the perspective that someone would be buying this and expecting it to work in a professional way. People might be using this in their workflows. What if it crashed and they lost their work? Suddenly, things that I thought were fine for a free release stuck out as dysfunctional. Things that I knew had to be in place for tracking to work had to be checked for and the user warned if they were missing. Every circumstance a user might get into needed to be accounted for. The add-on requires a camera present in the scene. What if they delete the camera? What if they manually turn off settings the add-on has turned on so it can work? What if they're idiots start pouring pasta sauce over their keyboards because I've accidentally pasted a lasagna recipe into the documentation!?* The days after the release were spent answering questions from all the various places I'd posted it, solving bugs and talking about future features. I hadn't quite anticipated the amount of attention it would need after the release, though I was aware that part of the Blender Market commitment is that authors provide support for products. Luckily, it seems to have settled down now and I have received a modest, but pleasing amount of sales so far. This coming week I hope to be able to return to my modelling projects and improve the add-on steadily over the next few weeks and months. Ray. *I will not be held liable for any damages incurred by pasta sauce or any other ingredients which when combined could constitute a 'lasagna'. Well, it's slightly to my surprise that I hadn't actually posted the 4th part of my tutorial series on my blog: It's been a few weeks since this video was released, the content of which has all but slipped from my mind, but I presume from the helpful title that it contains the actual animation of the pieces. After re-watching the intro I'm also informed that it contains some optimizations to make the code run a little more efficiently. So that's nice. Blender Nation were also kind enough to feature the tutorial series in this post, which was a good boost to the views. Not that views are all that count, but ultimately it's made to be watched. Onto other things. In a few blog posts I've mentioned the project I've been working on but have been somewhat reluctant to reveal what it actually is. I think the time is upon us (or just me if no one is reading) to reveal that my current Big Project is simply called 'Futuristic Car 2'. I'm sure the title will change but it refers back to the video I completed in the 3rd year of my computer graphics university course: The premise was fairly simple, a futuristic car that has the ability to hover. At the time I was fairly pleased with the outcome, but, as can often happen with large projects, particularly when working on several at the same time, some compromises were made to the original idea without realising as the project progressed.
The car is made out of lots of small panels, a design change that was made after seeing 'suitcase suit' from Iron Man 2 but I didn't quite have time to animate a lot of the smaller panels and instead the transformation is a bit chunky. It was only a few months later, back in 2011, that I imagined the next version, a sleeker, sportier car more in keeping with my original design and yet keeping the idea of many smaller shifting panels. Work on the project is slow and difficult, much of the time is spent on efficiency and workflow. Without careful management the many objects in the scene can become overwhelming. I'll cover my workflow in future posts. Hopefully. If I remember. Which I might. Maybe. Ray. Well, another week has shot by which means it's time for part 3 of my tutorial series: I've also been working on my other main project. I haven't really spoken about it yet or shared anything about it other than that I've done some scripting for it. I'm still not ready to do that, maybe after this tutorial is out the way I can start sharing more about it.
But, as part of it I did come across what I thought was a bug in Blender, and I reported it as such. Reporting bugs for Blender is important. We use it, so it's in our benefit to improve it, even if all we can contribute is pointing out a problem in the hope that someone more skilled can fix it. It can be a bit of an alien concept to people who aren't familiar with open source programs, that there might be a way to contact the people who made a piece of software and get them to fix something or answer a question. Of course, it isn't limited to open source projects, I contact many services if I find an issue, open source just tends to promote it a bit more and, well, be a bit more open that it's a possibility. But whatever it is that you use, it again comes down to: Why wouldn't I want it fixed? This is turning into a post about bug reporting, really I just wanted to highlight the specific issue I had... Turns out that what I reported wasn't actually a bug at all but a known design limitation. It's not exactly a bug because it's working as expected, even if the way it works isn't exactly ideal. It's annoying, but it basically means they, the developers, are aware of it, but can't currently change it. I came across the limitation because I'm working with duplicated objects which all share the same object data (OD from now on) and they all need to share the same vertex groups. I thought that sharing/linking OD would solve this, which it partially does. Apart from one slight problem. It turns out that the OD stores the vertex groups and their weights but it doesn't store their names. The names can be unique for each object that shares OD. So two objects which share OD will have the same vertex groups and they'll be linked, but they could be named completely differently. Which is....confusing. Edit one vertex group called 'group 1' on one object and 'group 2' might be edited on the other object if you've renamed a group on one object but not the others with linked data... Cue a series of scripts to try and manage all this. Haven't quite fixed it all yet, have to work out which vertex groups aren't being used by modifiers so I can clean it all up a bit and maybe have some global counter which handles the naming of any new groups. Anyway, I don't regret reporting it as a bug even though it's technically not. I've at least come away knowing how it works, thanks to Campbell Barton (a Blender developer) and I don't think it does any harm letting the developers know that people are still finding this is an issue. It's also far better to have reported it than potentially be trying to work out workarounds when a simple report could have fixed it. Better safe than sorry. Ray. Here is the second part of the Slider Puzzle Tutorial, this part focuses on unwrapping and texturing the grid: I think I just need to confirm that while I said there wouldn't be any more tutorials on a regular basis, that only comes into effect after this tutorial series is over. There are 2 more parts of this current tutorial still to be released, after that, it's a bit less certain. Anyway, onto more coding... I've found that since having worked on bigger python projects, smaller scripts are far quicker to write having become far more familiar with the code. I've always found myself writing little mini scripts for things like enabling/disabling Subsurf modifiers for all objects in a scene, so for my current project I decided to create a little toolset that I can eventually develop and use across all my projects.
The layout is a bit of a hack at the minute as I'm kind of forcing a 2 column menu to look like a panel. Eventually as I add more tools I'll probably collapse the modifier tools into proper submenus. Another cool thing I found was the ability to have an operator set a custom property when it runs. So I can use the same operator to make both the modifiers visible and invisible. On line 7 you can see I define a new property within the operator. To make sure I can access it I pass 'self' and 'context' into both the execute function and the function that has my main code on lines 9 and 10. It's with 'self' that you access the property, so I haven't yet experimented if 'context' is actually needed: Then you can access the operator property with '.propName' after the normal operator call and set it's value: You can then access the property with 'self.propName': Now I just have to work out how to set multiple arguments with an operator call...
Anyway, have to actually do some work now instead of just writing about it. Part 3 of the Slider Puzzle tutorial is out on Tuesday. Ray. Ps. I hope to have proper embedded code working soon. Well, it's certainly been a long time since my last video. Here's the first part of the tutorial that accompanies it: I had actually planned on stopping doing tutorials, or at least 'ramping down'. I got a job in November (unfortunately not related to 3D or graphics), so my spare time is a little more precious now.
In the past year, without realising it, the effects I make have steadily becoming more complex as I attempt more ambitious ideas. I think it's natural that that should happen but it means the tutorials have become a lot longer to accommodate all the extra processes and all of this has started to take up a great deal of my time. The effects have gone from taking a few days to complete to needing about a week, mainly of troubleshooting, and the tutorials have steadily crept up to the 1hr mark (edited down from 1hr 40min of recorded material). Because of this I've actually done very few modelling projects in the past year and for someone who wants to be a 3D modeller, this isn't great. So, all my time has to be focused on modelling now and tutorials have to take a back seat for the minute. This isn't the end of the tutorials, but certainly they can't be a priority any more and this tutorial marks the end of any frequent videos. Knowing that this would be the last tutorial and frankly, looking forward to getting it out of the way so I could continue modelling, I certainly hadn't bargained on this being the most complex tutorial I've ever done. Longer, harder ideas to explain, harder to edit, everything was more complex. And it took a whole lot of time to complete. Turns out explaining programming is pretty difficult, some of the concepts start to seem a bit abstract when you sit down and try to explain them so I had to create extra graphics to try and visually explain them and extra annotations for things I'd simply forgotten to mention. Suffice to say that with all this added up, the tutorial was long enough that it seemed beneficial to split it up, so this video is part 1 of 4, each to be released weekly. It's a shame, because I like coming up with projects for tutorials, I even started thinking about the next project I wanted to do. But, like I said, that has to take a back seat. If I get some time to work on it, which I hope I do, then great. Ray. |