transformation – How to align Blender animation to external mesh data?

I’m building a custom engine and I have a confusing asset pipeline. I have skeletal animations in Blender and voxel mesh data in Qubicle. My engine loads the skeletal data and applies joint transformations to the voxel mesh vertex data. I’m doing this flow to preserve voxel data for use in the engine.

I’m struggling with trying to align the skeletal space to the mesh space. There are a few reasons for this. Blender is centered on the 0,0,0 axis. Quibicle uses a discrete voxel grid for alignment and you can’t align to a center origin. You have to snap to the grid.

You can see that Blender uses a right handed coordinate system with Z axis being the vertical axis. The skeleton has a center origin on the Z axis. Additionally, the skeleton is facing the opposite ‘front’ direction.

Blender Skeleton:

(Blender Pic)

Quibicle has Y as the vertical axis and the mesh facing positively on the Z axis. You can see that the quibicle mesh is offset from the 0,0,0 origin point because it is snapped to the voxel grid.

Qubicle Mesh:

(Quibicle pic)

I’m working with WebGL, writing raw glsl, and combining the transformations in a shader like:

  vec4 worldSpacePosition =
    model * //this is actually local * parent entity transformation matrices
    joints(jointId) * //Blender space combination of joint matrix * inverse bindPose
    vec4(position.xyz, 1); // Vertex in quibicle space

  gl_Position = projection * view * worldSpacePosition;

This gives me spaghetti animations:

(spagetti gif)

You can see in the gif that the mesh is offset from the local axis helper like is in Qubicle. The Blender transformations are then action on on the 0,0,0 local origin where the mesh is not.

I have tried many different tweaks to the above shader, specifically alterations to joints(jointId) matrix. I assumed that I could just add an offset to the Blender joint matrix or inverse bindPose matrix to make it match the Qubicle offset.

The only thing I’ve found so far that works is if I add another transformation, a “centerOffset” before the joint matrix. I can get the verts to align up with the ‘blender space’ and make the animation transforms accurate.

  vec4 worldSpacePosition =
    model * //this is actually local * parent entity transformation matrices
    joints(jointId) * //Blender space combination of joint matrix * inverse bindPose
    centerOffset * // Center offset calculated from the AABB of the voxel mesh
    vec4(position.xyz, 1); // Vertex in Quibicle space

  gl_Position = projection * view * worldSpacePosition;

this centerOffset is a mat4 translation that shifts the mesh by half its X and Z which will center it at local 0,0,0

      const centerOffset = mat4.fromTranslation(
        (
          -Math.floor((mesh.localAABB(1)(0) / 2)),
          0, //don't recenter on the Y axis
          -Math.floor((mesh.localAABB(1)(2) / 2))
        )
      );

( insert normal gif)

The glsl matrices deserve some further explanation.

My engine has an entity component system with child-parent transformation. model is a scale * rotation * translation matrix and it is the local * parent transformation.

My animation has 1-1 bone-to-mesh relationship. Vert attributes have a jointId and joints is an uniform
The joint transformation comes from blender it is actually created from some pre processing sub transformations.

const zReflection = (
-1, 0, 0, 0,
 0, 1, 0, 0,
 0, 0, -1, 0,
 0, 0, 0, 1
)

let joint = mat4.multiply(blenderInverseBindePose, blenderJointMatrix)
joint = mat4.multiply(joint, zReflection);
joint = mat4.multiply(zReflection, joint);

I’ll be honest this zReflection is pretty gnarly and I’m not 100% sure how it works. zReflection was my attempt to do a ‘reflect’ to get the animation to face the same direction as the mesh. Would appreciate a spot check here.

Though my “centerOffset” fix works I would like to keep the fixes attached to the animation data in Blender space. This means offsetting the the blender skeleton data, the inverse bindpose, or joint matrices. I want apply it to the skeleton because the skeleton will always be relative to the meshes they control. When I’m offsetting the mesh data with centerOffset this gets messy when you have parent child relationships and the mesh is offset with a local transformation from its parents.

My real question is how to adjust the joint matrix and inverse bindpose matrices from Blender space so that they align with the vert data from Quibicle space?

microsoft word – How to individually align elements

there lads, this is my first question in quite a while, so please do be patient with me. That said, I’d like to make something like the first picture in word 2007.

This is what I’ve tried

  1. go to page layout
  2. select your text
  3. click the dialogue box launcher (the arrow in a square thingy)
  4. choose layout in the dialogue box
  5. choose center, and in the apply to menu, choose selected text

result: While this works fine if the text I’m trying to center is the only text on the whole page, it doesn’t do anything if it’s not (to be fair it creates a section, but still that doesn’t really help).

How I’ve tried to solve this

attempt: I tried to create new sections myself
result: not much, other than that, the option for sections, has appeared in the apply to menu

Thanks for getting to the end 😀

example

python – How to align a table whose elements are vectors of different sizes

It is possible, in python, to format an output in the type console

         Peso (itens)
Item 1   1 (  )    1 ( 1 )    1 ( 1 )    1 ( 1 )    1 ( 1 ) 
Item 2   1 ( 1 )    2 ( 2 )    4 ( 1 2 )    4 ( 1 2 )    4 ( 1 2 3 )
Item 3   1 ( 1 )    2 ( 2 )    4 ( 3 )    8 ( 1 3 )    16 ( 1 3 )
Item 4   1 ( 1 )    2 ( 2 )    4 ( 3 )    8 ( 1 3 )    16 ( 1 3 )
Item 5   1 ( 1 )    2 ( 2 )    4 ( 3 )    8 ( 1 3 )    16 ( 5 ) 

so that the elements of the array are dynamically aligned according to the size of the vector in parentheses (the values ​​in parentheses can vary in size, with 0 elements, 1 element, 2 elements, etc.)

Here is an example of alignment that I would like:

         Peso (itens)         
Item 1   1 (   )    1 ( 1 )    1 ( 1 )      1 ( 1 )      1  ( 1 )
Item 2   1 ( 1 )    2 ( 2 )    4 ( 1 2 )    4 ( 1 2 )    4  ( 1 2 3 )
Item 3   1 ( 1 )    2 ( 2 )    4 ( 3 )      8 ( 1 3 )    16 ( 1 3 )
Item 4   1 ( 1 )    2 ( 2 )    4 ( 3 )      8 ( 1 3 )    16 ( 1 3 )
Item 5   1 ( 1 )    2 ( 2 )    4 ( 3 )      8 ( 1 3 )    16 ( 5 )

output formatting – Text in grid cells does not align correctly and how to style them all with one rule

This is the entire module that contains all the code to display with a Print(Grid(data, rules)) declaration. I have all the cells arranged in stacked rows in a convenient location data = {{...,rules},...}variable. Most style rules are placed inside the grid, but some style rules (//TraditionalForm) reside in data elements.

Questions: (1) Why the cell contents do not align vertically (especially the left column INPUT and OUTPUT)? (2) How to delete all styles inside data content and move them to Grid(data{{...},..}}, all rules go here). (3) How to repair cell spacing. The goal for this is a 1em spacing around the entire contents of all cells.

navy := RGBColor(0, 0, 0.5, 
  1) (* navy is a slightly darker DarkBlue *)
lime := RGBColor(.2, 1, .2, 1)(* slightly darker Lime *)
cauchy(ic_ : (u(0, x) == Exp(-x) Sin(x)^2), bc_ : (u(t, 0) == 0), 
  domt_ : {0, 3}, domx_ : {0, 3}, range_ : Automatic) := 
 Module({eqn, sol, ver, data, reg},
  eqn = (D(u(t, x), t) + D(u(t, x), x) == 0);
  sol = First(DSolve({eqn, ic, bc}, u, {t, x}));
  ver = If(eqn /. sol // FullSimplify, Style("True", lime), 
    Style("False", Background -> Red),
    Style("Indeterminate", Black, Background -> Yellow));
  reg = Rectangle({domt((1)), domx((1))}, {domt((2)), domx((2))});
  data = {
    {Style(
      "REPORT OF SOLUTION TO A SIMPLIFIED FIRST ORDER CAUCHY PARTIAL 
DIFFERENTIAL EQUATION", Bold), SpanFromLeft, SpanFromLeft},
    {"", Style("PARAMETERS", Bold), Style("RESULTS", Bold)},
    {Rotate(Style("INPUTS", Bold), 90 Degree), 
     "initial conditions (ic)", ic // TraditionalForm},
    {SpanFromAbove, "boundary conditions (bc)", bc // TraditionalForm},
    {SpanFromAbove, "domain in t (domt)", domt // TraditionalForm},
    {SpanFromAbove, "domain in x (domx)", domx // TraditionalForm},
    {SpanFromAbove, "domains destructure to form surface region(reg)",
      reg // TraditionalForm},
    {SpanFromAbove, "range in u(t,x) (range)", 
     range // TraditionalForm},
    {Rotate(Style("OUTPUTS", Bold), 90 Degree), 
     "cauchy equation(eqn//TraditionalForm )", eqn // TraditionalForm},
    {SpanFromAbove, "solution (sol((1)))", sol // TraditionalForm},
    {SpanFromAbove, "solution (sol((1))//FullSimplify)", 
     sol // FullSimplify // TraditionalForm},
    {SpanFromAbove, "solution verified as", ver},
    {SpanFromAbove, "comment on solution from default values", 
     "plot assumes a traveling wave" // TraditionalForm}};
  Print(Grid(data, Frame -> All, FrameStyle -> Thickness(1), 
    Spacings -> 2, Alignment -> {{Center, Center}}, 
    ItemSize -> Automatic, 
    BaseStyle -> {White, Bold, Background -> navy, TraditionalForm}));
   Print(Plot3D(Evaluate(u(t, x) /. sol), {t, x} (Element) reg, 
    PlotRange -> range, AxesLabel -> Automatic))
  )
cauchy()

photo editing – Manually align images for a period of time

I have been taking a picture of myself everyday for the past few months now. I did not use a tripod, so the images are not aligned at all. I am looking for a type of software that will allow me to manually resize, rotate and crop these images to align them in each one. I hope for something where I can have a reference image that is a bit transparent and then I can edit all the other images to match this one. Is there software like this?

unit – How to align the vertices of the edges of modular accessories hung on a 2D grid?

For a project I'm working on, I'm creating 3D accessories in Blender that can be assembled in a modular fashion on a 2D grid in Unity. In Unity, I generate the contents of the grid using these accessories. Now, considering these two simple shapes (imagine a pipe or a railing in top view):

sections

If they are placed next to each other on the grid like this (left):

Joined sections

I want to make a smooth transition between the two so that their edge vertices align well (hang on, see the right image above). Note that the angle between the shapes is always the same. However, there are variations like right, left, right for each intersection and also many shapes.

How can I achieve this goal?

I thought of the following possibilities:

  • Just model each possible variation of the mixer and use the corresponding accessory when generating the grid (I hope I can avoid this as it is a lot of effort, this is not ; is also not reusable)
  • Fix the shapes in Blender. In Unity move the bone turns accordingly so that it lines up (I like this idea, but is it practical?)
  • (In one way or another) mark the vertices on the edge of the shapes and move them where they belong, i.e. modify the mesh in Unity.

Are there other / better ways to do this? I appreciate all the tips and advice.
I also know that I am not the first to try this, so any advice on where to look for resources and what terms to look for is also appreciated.

post-processing – How to align hundreds of images?

I could not find a solution with raw files, I know that the recent version of hugin is supposed to support raw files using dcraw but I cannot test it myself. The next good solution in my opinion is to convert all of your raw data to tif or other lossless image format and use it.

For my method I mainly hugin_tools on the terminal, but I also use the GUI, so keep in mind that you need to install both.
You can find the hugin costume here for download.
I also use Ubuntu on my machine, but the procedure on mac should be the same.

First thing you need to put all the photos in one folder, it is mainly for convenience, but will help you with later orders.

Generate a pto file

Next, you need to generate a pto file, i.e. the file where all the image transformation data is saved.
You can do this by typing:

pto_gen *.jpg

in the terminal where all the photos are located.

Cropping in a still area

You now need to find matches between all of your images, before doing so there is an optional part which will greatly reduce errors if there are moving objects in your set.

Open the hugin project you generated and change the interface to advanced.

interface change

In the window that opens, go to the masks tab and choose the cropping tab and select your first image. Now make sure that "all images of the selected lens" are checked, then drag them from the edges of the image and crop to the area with the least or no movement. This will restrict the match finder to this area and reduce errors during the remapping step. You can now save and exit the program.

image cropping

Find checkpoints

Now you can find the matches, type:

cpfind --linearmatch *.pto

in the terminal, this will find matches between pairs of images.
You can also find matches between all the images by simply omitting the ‘linearmatch’ option, but if you have hundreds of images, it will take a long time and will probably be useless.
You can read more about cpfind here.

Then you need to clean up the checkpoints you found, there are two commands for this:

celeste_standalone -i default.pto -o default.pto

will try to clear the control points on the clouds (More information here).
And

cpclean -o default.pto default.pto

will delete checkpoints with a high error value. (cpclean help page)

Reset cropping

Now that we are done with the checkpoints, open the new generated project called by default and go back to the masks tab as before, select the cropping tab again and click on the reset button, this will turn off cropping of all images.

Optimization

After that, you need to optimize the checkpoints. Type:

pto_var --opt="y, p, r, TrX, TrY, TrZ" -o default.pto default.pto
autooptimiser -n -o default.pto default.pto

This will optimize the position and distortion of your set of images, you can read more about this process here.

You're almost done, just type:

pano_modify -o default.pto --projection=0 --fov=AUTO --center --canvas=AUTO --crop=AUTOHDR --output-type=REMAPORIG default.pto

to modify the project configuration.

Remmaping

Finally, simply type:

nona -m TIFF_m -o remapped default.pto

to output the remapped images.
If you also want to stack the images together, you can also use:

hugin_stacker --output=median --mode=median remapped*.tif

You can find more information about the hugin command line tools here.

There you go, my take on your problem, there are some missing links because this is my first answer, so I was limited to 8. If there are any errors or if you have any problems, let me know, my English is not the best sorry if I have made grammatical or spelling mistakes. Cheers!

c # – align with spaces

There are two cases.
Case 1:

Message message = Request.GetResponse(type);
message("ProccessID") = Request.Message("ProccessID");
message("MainProccessID") = Request.Message("MainProccessID");
message("RefDocumentID") = Request.Message("DocumentID");
message("OfficeName") = Request.Message("OfficeName");
message("PersonName") = Request.Message("PersonName");
message("LNP") = Request.Message("LNP");

Case 2:

Message message = Request.GetResponse(type);
message("ProccessID")     = Request.Message("ProccessID");
message("MainProccessID") = Request.Message("MainProccessID");
message("RefDocumentID")  = Request.Message("DocumentID");
message("OfficeName")     = Request.Message("OfficeName");
message("PersonName")     = Request.Message("PersonName");
message("LNP")            = Request.Message("LNP");

Pleace. Which case is the best?

Align group blocks left or right

OK, I found a way to do it after I had scanned the source code. I note that the code that helped me live under deprecated.js therefore, it may not work.

Here is the JS code that I have in my plugin directory

function addAlignmentToGroups(settings, name) {
    if (name !== "core/group") {
        return settings;
    }

    return lodash.assign({}, settings, {
        supports: lodash.assign( {}, settings.supports, {
            align: ('wide', 'full', 'left', 'center', 'right')
        })
    });
}

wp.hooks.addFilter(
    'blocks.registerBlockType',
    'myapp/alignments/group-block',
    addAlignmentToGroups
);

And the PHP code to load it:

8 – Align the integrated multimedia images

When I embed an image in CKEditor text, I can choose alignment options. When I embed a multimedia image, I cannot choose the alignment, but a multimedia view. A multimedia view allows me to specify the size of the image (via the image style) but not the alignment

Embedding an image does not add the image to the media library and it would be good to only use the integration of multimedia images in order to manage the image library of the site.

What is the preferred method for specifying the alignment of embedded media?

Context

I am just switching to using basic multimedia modules in Drupal 8.8. I gave up what I used before:
* To integrate
* Integrated entity
* DropzoneJS entity browser widget
* Entity browser
* IEF entity browser