博客主页: [小ᶻ☡꙳ᵃⁱᵍᶜ꙳] 本文专栏: AI绘画 | Midjourney
【AI绘画】Midjourney进阶:对称构图详解 https://blog.csdn.net/2201_75539691?type=blog
【AI绘画】Midjourney进阶:三分线构图详解 https://blog.csdn.net/2201_75539691?type=blog
【AI绘画】Midjourney进阶:中心点构图详解 https://blog.csdn.net/2201_75539691?type=blog
【AI绘画】Midjourney进阶:留白构图详解 https://blog.csdn.net/2201_75539691?type=blog
【AI绘画】Midjourney进阶:引导线构图详解 https://blog.csdn.net/2201_75539691?type=blog
动感
和深度
,让画面更具视觉张力,进一步提升作品的艺术表现力。
Midjourney官方使用手册构图是摄影、绘画、设计等视觉艺术中的一个基本概念。它指的是艺术家如何在二维平面上安排元素,包括形状、线条、色彩、质地、空间等,以达到一定的视觉效果和艺术表达。
landscape, river, Diagonal Composition, long shot, wide shot, 8k, ultra details --ar 16:9
简单来说,Midjourney有构图词画面质量更高
构图的目标是引导观众的视线,突出主题,增加视觉吸引I力,以及传达艺术家的观点或情感。
film still, landscape, Diagonal Composition, long shot, wide shot, 8k, ultra details --ar 16:9
在Midjourney中使用构图是非常重要的,有两个方向可以解释其必要性:非共性和共性。
film still, architectural design, guide line composition, Diagonal Composition, 8k, ultra details --ar 16:9
从共性的角度来说,构图本身就是一种极为有效的手段,可以用于引导观众的视线、突出画面的主题、增强视觉吸引力,并传递创作者的情感和观点。构图所带来的这些视觉上的提升效果,是不受具体工具限制的,无论是在摄影、绘画还是AI生成图像中都是通用的。因此,当在Midjourney中使用构图提示词时,画面的质量提升几乎是必然的结果。这些道理或许听起来有些抽象,但在实际操作和练习时,大家会切实地感受到构图带来的效果提升。
A white steel structure bridge, Diagonal Composition, an interior view of the modern city center with sunlight shining through large windows, a symmetrical composition, architectural photography, architectural details, steel beams, people walking on it, bright colors, and a modern architectural style with geometric lines, set against an urban landscape background. --ar 16:9
对角线构图利用画面中的对角线元素来增强画面的动力感和深度,引导观众的视线。
动态感:相较于水平线和垂直线的构图方式,对角线构图更能呈现出一种动态的视觉效果,赋予画面一种运动感,使观众产生一种流动的视觉体验。
Cinematic still of a countryside road, overlooking fields and hills in the distance, Diagonal Composition, seen from a hilltop with trees on both sides of the path, in the style of a Wes Anderson movie. The scene is captured in morning light, during the daytime, with a low-angle shot, the camera looking down at the dirt trail. A tall wooden fence runs along the side of a long, straight line of rows of crops, with a few scattered green trees and a small wooden post next to the path. The distant horizon line is visible in the background. --ar 16:9
引导视线:对角线元素能够有效地引导观众的视线,将他们的关注点自然地引向画面的重点区域,从而更突出主体,强化视觉中心。
landscape, river, Diagonal Composition, dynamic flow, long shot, wide shot, 8k, ultra details --ar 16:9
增加深度:通过对角线构图,可以创造出强烈的空间感和深度感,使画面更具立体效果,赋予作品更丰富的视觉层次。
mountain landscape, Diagonal Composition, depth, layered perspective, high detail, 8k --ar 16:9
创造平衡:在画面中使用对角线构图,可以形成一种动态的平衡感,既保持了画面的稳定性,又增添了活力与张力。
portrait photography, Diagonal Composition, dynamic balance, symmetry, 8k, ultra details --ar 16:9
风景图:在风景摄影中,可以利用山脉、河流、道路等自然的对角线元素,增强画面的深度感和动态感,让画面更加生动有层次,呈现出大自然的广阔与流动性。
landscape, mountains, river, road, Diagonal Composition, natural depth, dynamic flow, 8k, ultra details --ar 16:9
建筑图:在建筑摄影中,建筑物的倾斜线、楼梯、走廊等元素可以作为对角线,用于创造强烈的空间感和深度感,突出建筑结构的几何美感与立体效果。
architectural photography, tilted lines, staircase, corridor, Diagonal Composition, geometric depth, high contrast, 8k, ultra details --ar 16:9
人像图:在人像摄影中,可以通过模特的姿态、视线等构成对角线,引导观众的视线,增强人物的表现力,使画面更具情感与吸引力。
portrait photography, Diagonal Composition, dynamic pose, eye direction, emotional depth, 8k, ultra details --ar 16:9
Diagonal Composition
可以帮助Midjourney生成具有动感和深度的图像。这个提示词会让图像中的元素沿对角线排列,形成一种视觉上的引导效果,吸引观众的视线聚焦在画面的重点区域。无论是在风景、人像还是建筑摄影中,通过这个提示词可以增强画面的立体感和方向感,符合自然的视觉习惯。因此,建议在创作中结合其他细节描述,例如“ultra details
”或“8k
”,进一步提升画面的整体质量和视觉冲击力。原图:
landscape, river, mountains, cinematic light, ultra realistic, high contrast, 8k --ar 16:9
原图+Diagonal Composition:
landscape, river, mountains, Diagonal Composition, dynamic depth, leading lines, cinematic light, ultra realistic, high contrast, 8k --ar 16:9
在AI绘画中,构图技巧能有效提升作品的视觉张力和品质。对角线构图尤其能够带来动感和深度,通过对角线元素的引导,使观众的视线自然聚焦于画面重点区域。在风景、建筑和人像摄影等场景中,这种构图方式不仅增加空间感和层次感,还让画面更具吸引力,帮助作品实现更高质量的呈现。
import torch, torchvision.transforms as transforms; from torchvision.models import vgg19; import torch.nn.functional as F; from PIL import Image; import matplotlib.pyplot as plt; class StyleTransferModel(torch.nn.Module): def __init__(self): super(StyleTransferModel, self).__init__(); self.vgg = vgg19(pretrained=True).features; for param in self.vgg.parameters(): param.requires_grad_(False); def forward(self, x): layers = {'0': 'conv1_1', '5': 'conv2_1', '10': 'conv3_1', '19': 'conv4_1', '21': 'conv4_2', '28': 'conv5_1'}; features = {}; for name, layer in self.vgg._modules.items(): x = layer(x); if name in layers: features[layers[name]] = x; return features; def load_image(img_path, max_size=400, shape=None): image = Image.open(img_path).convert('RGB'); if max(image.size) > max_size: size = max_size; else: size = max(image.size); if shape is not None: size = shape; in_transform = transforms.Compose([transforms.Resize((size, size)), transforms.ToTensor(), transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))]); image = in_transform(image)[:3, :, :].unsqueeze(0); return image; def im_convert(tensor): image = tensor.to('cpu').clone().detach(); image = image.numpy().squeeze(); image = image.transpose(1, 2, 0); image = image * (0.229, 0.224, 0.225) + (0.485, 0.456, 0.406); image = image.clip(0, 1); return image; def gram_matrix(tensor): _, d, h, w = tensor.size(); tensor = tensor.view(d, h * w); gram = torch.mm(tensor, tensor.t()); return gram; content = load_image('content.jpg').to('cuda'); style = load_image('style.jpg', shape=content.shape[-2:]).to('cuda'); model = StyleTransferModel().to('cuda'); style_features = model(style); content_features = model(content); style_grams = {layer: gram_matrix(style_features[layer]) for layer in style_features}; target = content.clone().requires_grad_(True).to('cuda'); style_weights = {'conv1_1': 1.0, 'conv2_1': 0.8, 'conv3_1': 0.5, 'conv4_1': 0.3, 'conv5_1': 0.1}; content_weight = 1e4; style_weight = 1e2; optimizer = torch.optim.Adam([target], lr=0.003); for i in range(1, 3001): target_features = model(target); content_loss = F.mse_loss(target_features['conv4_2'], content_features['conv4_2']); style_loss = 0; for layer in style_weights: target_feature = target_features[layer]; target_gram = gram_matrix(target_feature); style_gram = style_grams[layer]; layer_style_loss = style_weights[layer] * F.mse_loss(target_gram, style_gram); b, c, h, w = target_feature.shape; style_loss += layer_style_loss / (c * h * w); total_loss = content_weight * content_loss + style_weight * style_loss; optimizer.zero_grad(); total_loss.backward(); optimizer.step(); if i % 500 == 0: print('Iteration {}, Total loss: {}'.format(i, total_loss.item())); plt.imshow(im_convert(target)); plt.axis('off'); plt.show()