Lepidoptera Redux

Render of finished scene with 3D moth in a patch of grass - revisedThe moth is revisited, and so soon too. Based on some very helpful comments I received on Elysiun (here), I decided to revise the previous render. Plus the exciting sneak peak at a new version of Blender with a new native hybrid ray tracing engine, seduced me into trying the new ray-traced shadows.

The change is not obvious, but the increased effect of hyper-realism is quite stunning, I think. I don’t think I could have chosen a better time to seriously take on Blender.

This is going to be fun.
:hehe:


Lepidoptera

Render of finished scene with 3D moth in a patch of grassAt last it is done. šŸ˜€
The moth needed many more adjustments to its armature but it was worth it. The mist settings helped add some depth and atmosphere, and 2 spots and a hemi light gave it form.

This is actually my first planned scene executed in Blender, not counting all the playing around as I was learning the interface – a lot of which still remains to be learned. This scene is a relatively simple one, but I managed to get Fiber to deliver, and I modelled and textured the moth from scratch. So, achievements duly noted and recognized. :satisfied:

Now on to the next!

The thread discussing this image can be found
here on Elysiun.


Moth ado about nothing

Render of 3D moth model completed, uv texture and allWhen we last saw our hero he was wrestling with a whole battalion of rebellious triangular polygons. The ‘tris’ seemed to be sabotaging the great UV texturing experiment, or was that just a red herring? Our hero was soon to find out. Now, on with the story …

ahem … I have spent the last day or so trying to figure out the texturing problem. I looked into the tris vs quads issue. The entire flat face of the wings was made of tris, but converting it to quads had no noticeable effect on the distorted wing and texture. While on the subject, I must mention that converting between tris and quads is a dream in Blender. For tris to quads it’s Alt-T in edit mode, and quads to tris is Ctrl-T in edit mode. Simple.

Having ruled out the tris as the cause of the un-sightly distortion, I needed to look elsewhere. Just as a trial I played around with the placement of the bones in the armature and that solved the problem. Because I had used an extruded curve, Blender had created the face of the wings automatically. This involved lots of tris in a sort of radial pattern, with vertices only on the edges of the wings. The problem was that the centre of rotation of the wing was not the same as the central point of the edge lines. So, the bone armature lay at a glancing angle to the lines, thus causing a sort of unequal twist of vertices when the wing was posed. I could not move the centre of rotation, so I moved the far end of the bone instead – making the armature lay almost perpendicular to the face lines. This seems to have done the trick.

That done, I finished texturing the wings, and then moved on to the body. The body was a little more complicated because it is a complex shape, and I had used cubic mapping on the UV texture. Cubic mapping seems like the logical choice when you see it laid out flat, but try fitting the various sides into a decent texture and it is a different story. I did finish the texture, but next time I should try one of the others methods, maybe cylindrical mapping. The antennae and the compound eyes were adorned with procedural textures, and you see before you the finished product rendered in Blender.

I am quite happy with the results. It is not technically perfect, and it has some holes in it (literally as well as metaphorically ;)), but it serves the purpose. It should work well in the scene I plan to create with it. That is what remains to be done. As always when there is something new to be seen, you will be the first to know … after me, that is.
:satisfied:


Warning, wet paint

Blender screenshot of 3D moth model in progress, now with basic uv textureThis is just a sneak peak of my progress with the texturing of this model, hence the medium sized image and no bigger version. I’m having problems with distortions of the texture on the wings because of taking the easy way out with that part of the model. I am quite sure extruding the curve and converting it to a mesh has resulted in badly distorting triangular faces.

If I can’t get this to behave, I might be forced to remodel it, or explore other texturing options for that particular object. Maybe plain-Jane flat mapping might work… only one way to find out. The battle continues.
:plain:


Slice and dice

Blender screenshot of 3D moth model in progress, now with uv texture gridBegan my quest for easy UV texturing in one easy step – unfortunately, there is no such thing. But once again, Python comes to the rescue.

I used the obj_io script to export the main objects to .OBJ files from Blender. These files were then opened in UVmapper Classic, a free program that unwraps meshes for UV texturing. There are various modes of unwrapping an object, such as plane, cube, sphere etc. I used a planar map for the wings and a cubic map for the moth’s body. The .OBJ files also need to be saved from within UVmapper to preserve the texture settings. These modified files were once again imported into Blender with the obj_io script. Now applying an image texture material to the objects, with the UV material setting on results in a proper recreation of the mesh coordinates as seen in the render.

Now it is a matter of taking these unwrapped texture files into an image manipulation program, and painting them appropriately using the mesh guides that were created by UVmapper. Simple really … except for all that hard work, but it should be worth it. Watch this space.


The moth takes wings

Blender screenshot of 3D moth model in progress, now with wingsFinally I tackled the wings. As far as modelling was concerned, they were much simpler to achieve than the body, but they needed an armature setup to make them poseable. Hence, they came last.

Using the references I had collected, I came up with a flat shape for the wings. It would have been easier to simply model them as a single flat plane, but once again I wished to make it a little more complex. So, I decided that I needed each half of the wing to have two sections that were attached to each other at the swivel point somewhere near the body. This segmented wing is found in many moths. I think it helps differentiates the model from the average butterfly.

After importing the wing shapes into Blender as a background picture, I set out to reproduce them with bezier curves. Next, I added a little extrusion in the Edit settings to give the wings a minimal thickness; nothing in the real world is infinitely thin like a plane in CG. This was converted to a mesh. The smaller piece of wing was give a slight slope, so that it would be at an angle to the main wing piece. Both of these pieces were duplicated, mirrored and joined with their twins to create a single wing mesh. I also thickened the central-front portion of the wing mesh, where it is attached to the insect body just above the head, to reflect the real thing.

Finally, the armature setup took some time to do. It’s nothing fancy at the moment, but there are 4 separate bones controlling the 4 pieces of wing. Due to the overlapping of pieces, assigning vertices to each bone was a slow process, but it was completed to a satisfactory level. The vertex assignment is not yet perfect because at some rotation angles, parts of the wing still intersect the insect body. That is an issue to be tackled as I work further on this model.

Next comes the UV texturing part, which is something totally new to me. I do, however, plan to make my life a little easier to begin with, by not using Blender’s built-in UV texturing utility. Will leave that for another project. Still, it remains to be seen how successful I am in texturing this to my satisfaction … and then there is the scene, the lighting etc. etc. …

Why did I get into this field again?
:confused:


Signal processing

Blender screenshot of 3D moth model - body completeMy work on the moth continues. After completing the limbs, my next challenge was the antennae. This would have been a simple matter if all I wanted were single curved tendril-like antenna. But I had my sights set on something more complex. Some of the photos of moths I used as reference, showed some filamentous fern-like antennae. That is what I wanted to model. I could have done this by the tedious manual placement of the filaments in the shape I required, but you might as well learn a new technique when faced with a challenge. So, I decided to learn the duplivert technique.

Blender screenshot of dupliverted filaments for the antennaDupliverts in Blender, are a great way to model complex structures that involve the repetition of a basic unit in some regular manner. You select a mesh which is going o be the template for the placement of your copies, and you make it the parent of the object/mesh which needs to be repeated. Now press the Dupliverts button found in the object window (post v2.3) or the edit window (pre v2.3). This places a copy of the child object on every vertex of the parent object. So to create my antenna, I first created a simple mesh curve to be the parent. I then subdivided it many times to increase the number of vertices. Next, I created a stretched mesh plane which I subdivided and proportionally edited into a curved sail shape. This was the repeating shape. On applying the Dupliverts option I had a line of identical curved planes placed vertically along the parent curve. I needed a variation in the size of the filaments. Since dupliverts are logical copies of the same object, I had to convert the copies to real objects (shift-ctrl-A). Then with proportional editing I created a cascade of the curved planes gradually diminishing in size along the curve. This entire group of filaments was then duplicated and mirrored along the base curve to create the complete fern-like antenna shape.

I had already modelled 2 compound eyes before. Now the antenna was also duplicated and mirrored to create its symmetrical twin. To complete the body model, the half body was duplicated mirrored and joined to the original half. Remove doubles was used to create a clean joint between the two halves and to get rid of the ugly seam.

As you can see in the screenshot, the body of the moth is now complete. All it awaits are its wings. Coming soon to a blog near you …