Blender – Copy Bone Constraints

Software:
Blender 2.83

To copy bone constraints from one bone to other bones:

  1. In Blender Preferences > Add-ons:
    Find the Interface: Copy Attributes Menu add-on, and enable it.
    Annotation 2019-12-12 165824
  2. In Armature Pose Mode,
    Select one or more bones, and select last the bone that has the constraints you want to copy.
  3. Press Ctrl + C to open the Copy Attributes menu, and select Copy Bone Constraints.

copyconstraints


Related post:

Quickly setup bone constraints

UE4 – Python – Placing level actors bottom at Z 0.0

Software:
Unreal Engine 4.22

This simple Unreal Editor Python example sets the Z axis location of all actors with names beginning with ‘Sphere_’ in a way that their bottom (minimum Z bound) is at height 0.0.

Download the script

> learn how to run Python scripts in the UE4 Editor

import unreal
from unreal import Vector

lst_actors = unreal.EditorLevelLibrary.get_all_level_actors()
print('place actors at 0 z')
for act in lst_actors:
    act_label = act.get_actor_label()
    if 'Sphere_' in act_label:
        print('placing: {}'.format(act_label))
        act_location = act.get_actor_location()
        act_bounds = act.get_actor_bounds(False)
        act_min_z = act_bounds[0].z - act_bounds[1].z
        location_offset = Vector(act_location.x, act_location.y, act_location.z - act_min_z)
        act.set_actor_location(location_offset, False, False)

* note that when copying and pasting a script from this example, the indentation may not be pasted correctly.

Note:
The get_actor_bounds unreal.Actor class method returns a tuple object containing 2 unreal.Vector objects, the first being world space location of the actor geometric center, and the second is the corner of the bounding box relative to the center.

‘Sphere_*’ actors before running the script:

Annotation 2019-12-08 225356.jpg

‘Sphere_*’ actors after running the script:

Annotation 2019-12-08 225503.jpg

 

Related:
Get started with Python for Unreal Editor
UE4 – Python – Importing assets

Blender – Modeling character clothes using cloth simulation

Software:
Blender 2.8

This character project is the first one in which I’m using physical cloth simulation in Blender to model the character’s clothes at proxy quality (they will be detailed further manually). learning this approach to clothes modeling demanded a lot experiments, trials and errors to get it right, in this short article, I’ll try to provide some insights, tips, and settings that can speed up the process.

Watch the full modeling process here

General notes and tips:

  1. When modeling the basic shape of the cloth try to “cut” a realistic cloth pattern for your desired cloth model. if you’ll search images on the web for “trousers cutting pattern” or “coat cutting pattern” you’ll find many examples.
    * See images below
  2. Create proper UVs for the cloth mesh when its still flat (before the simulation)
  3. In Blender cloth simulation, isolated edges in the mesh (edges without polygons) are treated as sawing springs, and are an important part of the cloth setup.
  4. Use a low poly proxy model for your characters body mesh, it will speed up the cloth simulation.

Early experiments:

In this experiment I used a simple tubular pants-like mesh that I quickly modeled around the character’s legs and pelvis (not a realistic cloth cutting pattern), with the top (weist) vertices defined as a vertex group with shrinking cloth property.
The result looks like training suit pants. it wasn’t at all what I wanted for this character, but I actually like it and probably will use such pants on other characters or on this one as a secondary look.

cloth_study

In this experiment I started trying to model an actual man’s trousers cutting pattern, and as you see, it still needs tweaking.

Blender_Cloth

This experiment is beginning to produce reasonable results, the undershirt initial shape is still cut too low at the back.
* Note that there is an animated belt collision object to bring the undershirt to it’s shape at the weist

Blender_Cloth_B2

Final Settings:

The final undershirt initial model:

Annotation 2019-12-08 120355

The final pants initial model:
* Note that the belt mesh is a vertex group defined a fixed in the cloth simulation, and that it’s split to parts corresponding to the edges of the pants shape that need to be sawed to it. (see the process here)

Annotation 2019-12-08 120618

The full final cloth setup for the character. the setup includes a low poly collision object of the whole character and shoes, undershirt mesh, pans mesh and animated (contracting) belt collision for the undershirt:

Annotation 2019-12-08 120941

The final cloth simulation:

cloth

cf

cb

Cloth Settings:

Cloth simulation settings for the undershirt:

cloth_undershirt

Cloth simulation settings for the pants:

cloth_pants.jpg

Related posts:
Blender 2.8 Character Project

Blender 2.8 character project

Software:
Blender 2.8

feature

I Recently started a personal character modeling project using Blender 2.8.
The project has the following goals:

  1. Get back to development of creative 3D content (character development, animation, rigging etc.).
    * the last 10 years or so I have been generally doing (and teaching) photorealistic rendering for technical visualization projects.
  2. Get used to Blender 2.8
  3. Practice A sculpting > re-topology workflow.
    * When I learned organic modeling 20 ago, there was no such workflow, you would create final topology from the get go.

I will be video capturing the whole project’s progress and sharing it on my vimeo channel.

You’re welcome to read about the project creation steps and watch the actual work process captured here:

  1. Part 1 – Sculpting – Freestyle rough draft
  2. Part 2 – Sculpting – Refining the model
  3. Part 3 – Modeling proxy clothes and props

Blender 2.8 character project – Part 3 – Modeling proxy clothes and props

Software:
Blender 2.8

This is the third part of a personal project I began working on,
Development of a realistic character in Blender 2.8 for games and animation.

<– Go to the project home
<– Go to the first part of the project
<– Go to the second part of the project

The third part of the project was a ~7 hour modeling session in which the focus was mainly on proxy-quality (rough) modeling of clothing and props.
In this stage of the project, I decided that the creative theme for character will be a tough detective. a sort of an Asian ‘Dirty harry’ character, and this concept was the drive behind the styling of the characters clothes and and props.


Result after part 3:

> Total accumulated work time: ~17.5 hours

 

Some tips and settings for modeling the clothes

 

Blender 2.8 character project – Part 2 – Sculpting – Refining the model

Software:
Blender 2.8

This is the second part of a personal project I began working on,
Development of a realistic character in Blender 2.8 for games and animation.

I will be video capturing the whole project’s progress and sharing it on my vimeo channel.

<– Go to the project home
<– Go to the first part of the project

The second part of the project was a ~5 hour sculpting session focused mainly on refining the model, improving its proportions and anatomical detail, and adding internal parts like eyeballs and teeth.
In this part the character design was developed into a more masculine man and less skinny, the general idea still being an elder Asian action figure.

Result after part 2:
> Total accumulated work time: ~10.5 hours

tt_25.06.19.gif

 

Go to part 3 of the project –>

Blender 2.8 character project – Part 1 – Sculpting – Freestyle rough draft

Software:
Blender 2.8

This is the first part of a personal project I began working on,
Development of a realistic character in Blender 2.8 for games and animation.

<– Go to the project home

The first step of the project is a completely free-style / free-form ~5.5 hour sculpting session in which I’m not really trying to do anything accurate but just get used to 3D sculpting in Blender 2.8.
I’m imagining an elder Asian action character, at this point not sure what he’ll end up being. possible themes are:
ninja, samurai, cyber themed ninja or tough detective.

Result after part 1:
> Total accumulated work time: ~5.5 hours

 

Go to part 2 of the project –>

Understanding the Photometric Light Measurement Units

There are two sets of light intensity measurement units:
Photometric units and Radiometric* units.
The Photometric units measure the intensity of visible light** as it is perceived by the human eye, and the Radiometric units measure the intensity of electromagnetic radiation***, which is the broader physical phenomenon of light, including the whole spectrum of radiation beyond visible light** (like x-rays and infrared radiation for example).

Light intensity is generally measured in three ways:

1. The directional intensity received from a light source as it is measured from a point in space. i.e Luminance in Photometric units or Radiance in Radiometric units.

2. The total light intensity output a light source emits to all directions i.e Luminous Flux in Photometric units or Radiant Flux in Radiometric units.

3. The amount of light intensity received by a surface from all directions i.e Illuminance in Photometric units or Irradiance in Radiometric units.

Similarly to the way measurement of kinetic power is based on the power of an ideal horse, the Photometric measurement units base the scale of light intensity on the light emitted by an ideal candle.

Ster

Luminance (Candela):
When measured from any point in space, the Luminance of an ideal candle seen from that point is measured as 1Candela‘ i.e. 1CD‘.
> In 3D rendering, a photometric IES file describes a light source’s light beam pattern by listing the Luminance or CD of the light source in different directions.

For light emitting surfaces like LCD screens Luminance is measured as Candelas per 1 square meter of surface i.e. CD/m2. Typical LCD computer monitors for instance, have a Luminance of about 250 CD/m2. imagine your computer screen displaying pure white and extended to an area of 1m x 1m, the light intensity perceived from it would be as if about 250 candles were spread on the whole area.

Luminous Flux (Lumen):
The amount of light emitted by an ideal candle through 1 solid angleSteradian‘**** conic beam distribution is measured as 1Lumen‘ or 1lm‘. the total Luminous Flux of the candle in all directions is 4 x PI lumens i.e 12.56 lumens which is simply the whole surface area of the unit sphere.
> The total amount of light produced by different kind of light bulbs is usually specified by Luminous Flux measurement i.e how many Lumens does the light source output.
> If sn optical reflector is placed next to a light source, focusing all it’s light output to a narrow direction, it wont change the light source’s Luminous Flux (Lumen) output, but since the same Luminous Flux will be focused to a narrower beam, it will have a higher Luminance (CD) measured from that direction, and therefore surfaces at that direction will be receive a brighter Illumination (Lux) (see below).

Illuminance (Lux):
A 1 m2 (meter squared) area surface, receiving illumination of 1 lumen has a measured Illuminance of 1 lux or 1 lx. Illuminance is measured by how many lumens a surface receives per square meter.
> In photography, the amount of Illuminance at which a surface is lit is important for determining the proper photographic exposure for the picture.

The inverse-square law:
As a light beam travels through space it’s distribution covers a larger and larger area, therefore it’s energy per area is reduced. the light energy a candle emits through 1 solid angle steradian, in a distance of 1 meter will cover an area of 1 meter squared, therefore the area of 1 meter squared will receive 1 lumen of light energy and will be illuminated with an illuminance of 1 lux. as that 1 lumen of light energy travels another 1 meter further, to a distance of 2 meters from the candle, it spreads and covers an area of 4 meter squared. each square meter of the 4 now receives just 1/4 of a lumen, so it’s illuminated by only 1/4 lux. as that 1 lumen of light energy travels another 1 meter further, to a distance of 3 meters from the candle, it spreads and covers an area of 9 meter squared. each square meter of the 9 now receives just 1/9 of a lumen, so it’s illuminated by only 1/9 lux. after a distance of 4 meters, the same 1 lumen on light energy will be spread on an area of 16 meter squared, so each square meter will be illuminated by 1/16 lux. you can already see the emerging pattern, the illumination intensity is inversely proportional to the square of the distance to the light source. This phenomenon is referred to as ‘The inverse-square law‘, and in practical terms it means that surface illumination is greatly influenced by it’s distance from the light source.

inv

Notes:

* Radiometric units measure light intensity using Watt light energy units.
note that this isn’t the Watt measurement units of electric consumption we’re used to for classifying electric light sources with, but a Watt measurement of the actual energy in the light itself.

** Electromagnetic radiation of wave lengths that stimulate the human eye.

*** Also referred to as ‘light‘ in physics.

**** A ‘Steradian‘, also referred to as ‘square radian’ is a measurement unit of 3D conic span or ‘solid angle’. a solid angle of 1 Steradian beginning at the center of a unit sphere covers exactly an area of 1 squared on the surface of the sphere. (the whole surface area of the sphere being 4 PI). The Steradian can be thought of as the Radian’s 3 dimensional ‘cousin’.

Related posts:
IES lighting in CG
Fresnel reflections

Blender Python – Accessing mesh triangles

Software:
Blender 2.81 | Python 3.74

By default, mesh triangles are not accessible to Python in Blender.
When accessing the mesh triangles is needed, they must be calculated first using the ‘calc_loop_triangles’ Mesh object method.
Before the calc_loop_triangle method has been called, the loop_triangles property of the Mesh object will reference a empty collection.
After calling the calc_loop_triangles method, the loop_triangles property will reference a collection of MeshLoopTriangle objects, in which the vertices property will hold an array of 3 integers that are the indices of the triangle vertices.

The following example script creates and places sphere objects at the centers of the cube’s triangles:

import bpy
mesh = bpy.data.objects['Cube'].data
mesh.calc_loop_triangles()
for tri in mesh.loop_triangles:
     tri_center = (mesh.vertices[tri.vertices[0]].co * 0.333) +\
                  (mesh.vertices[tri.vertices[1]].co * 0.333) +\
                  (mesh.vertices[tri.vertices[2]].co * 0.333)
     bpy.ops.mesh.primitive_uv_sphere_add(radius=0.1,
                                          enter_editmode=False, 
                                          location=tri_center)

* note that when copying and pasting a script from this example, the indentation may not be pasted correctly.

Download and example file here

Annotation 2019-11-23 224800.jpg
Related:
Python for Blender – Batch Rename Objects

3ds max & V-Ray – Furry Carpet

Software:
3ds max 2019 | V-Ray Next

A simple example of using VRayFur in 3ds max to create a furry carpet.

Download the example file here

51812013_2489032567792734_5880346472070774784_o.jpg

The VRayFur is grown on a beveled surface, that has no bottom side surface to avoid growing fur at the bottom, and also because it’s unneeded.
The surface is beveled at the edges so that the fur there will grow to the sides,
And a noise modifier is applied to the surface to break its uniformity and give it a more organic shape.
* You could have a bottom surface set the fur not to grow on the bottom polys.Annotation 2019-11-22 185652.jpg

cartpet.jpg

A combination of 3 procedural Noise maps (for each of the RGB channels) is used to create a direction map for the fur threads. the maps are added together using a VRayCompTex map.
The reason the pattern is separated to it’s RGB channels is that it allows more control.
A VRayFur direction map works like a normal map in tangent-space and this means we can’t have the blue channel be less than a value of 0.5 because that would cause the fur to grow down into the surface.

Annotation 2019-11-22 191756.jpg

For the fur material, a VRayFastSSS2 is used to achieve a ‘fluffy’ organic look combined with a VRayDirt map to accentuate the shadows between the fur threads.

Related posts:
Simple snow material in V-Ray
Wood floor material in V-Ray