当前位置: 首页 > news >正文

南通网站建设策划品牌推广的方式

南通网站建设策划,品牌推广的方式,杭州制造业企业做网站,免费印章logo在线制作《Electric Dreams》项目中提供了一些自定义节点和子图(文件位置:“/Content/PCG/Assets/PCGCustomNodes”),这些节点和子图在《Electric Dreams》被广泛使用,对于理解《Electric Dreams》非常重要,而且它们可以直接移…

《Electric Dreams》项目中提供了一些自定义节点和子图(文件位置:“/Content/PCG/Assets/PCGCustomNodes”),这些节点和子图在《Electric Dreams》被广泛使用,对于理解《Electric Dreams》非常重要,而且它们可以直接移植到新的项目中使用。所以写个博客分析一下

文章目录

  • 前导文章
  • Passthrough节点
    • 作用
    • Execute with Context
  • PointNormalToColor节点
    • 作用
    • Point Loop Body
    • Execute with Context
  • PointFromPCGVolume节点
    • 作用
    • Execute with Context

在这里插入图片描述

前导文章

《虚幻引擎程序化资源生成框架PCG 之 UPCGBlueprintElement源码笔记(一)》
《虚幻引擎程序化资源生成框架PCG 之 UPCGBlueprintElement源码笔记(二)数据流》

Passthrough节点

作用

数据流的开关

Execute with Context

在这里插入图片描述

Enabled控制是否将从Input输入进来的从Output输出,当Enabledfalse的时候,输出的PCGDataCollection中的Tagged Data数组将会是一个空数组。

PointNormalToColor节点

作用

将Point法线存入Color属性

Point Loop Body

先看一下它的Point Loop Body
在这里插入图片描述
Point Loop Body的逻辑就是将每一个Point的Up Vector存储在Color属性中,然后把修改过的Point输出。

Execute with Context

在这里插入图片描述

注释见上图,在PointLoopBody后面有一个Initialize from Data节点,代码如下:

void UPCGSpatialData::InitializeFromData(const UPCGSpatialData* InSource, const UPCGMetadata* InMetadataParentOverride, bool bInheritMetadata, bool bInheritAttributes)
{if (InSource && TargetActor.IsExplicitlyNull()){TargetActor = InSource->TargetActor;}if (!Metadata){Metadata = NewObject<UPCGMetadata>(this);}if (!bInheritMetadata || InMetadataParentOverride || InSource){const UPCGMetadata* ParentMetadata = bInheritMetadata ? (InMetadataParentOverride ? InMetadataParentOverride : (InSource ? InSource->Metadata : nullptr)) : nullptr;Metadata->Initialize(ParentMetadata, bInheritAttributes);}else{UE_LOG(LogPCG, Warning, TEXT("InitializeFromData has both no source and no metadata override"));}
}

Initialize from Data做了两件事:

  • 将源Data中的TargetActor赋值给新PCGSpatialDataTargetActor
  • 用源Data的metadata初始化新PCGSpatialData的metadata

PointFromPCGVolume节点

作用

使用ContextSourceComponent或者Component的几何信息(TransformBound)构造1个PCGPoint

Execute with Context

在这里插入图片描述

我们先看一下GetComponentGetOriginalComponent

UPCGComponent* UPCGBlueprintHelpers::GetComponent(FPCGContext& Context)
{return Context.SourceComponent.Get();
}UPCGComponent* UPCGBlueprintHelpers::GetOriginalComponent(FPCGContext& Context)
{if (Context.SourceComponent.IsValid() &&Cast<APCGPartitionActor>(Context.SourceComponent->GetOwner()) &&Cast<APCGPartitionActor>(Context.SourceComponent->GetOwner())->GetOriginalComponent(Context.SourceComponent.Get())){return Cast<APCGPartitionActor>(Context.SourceComponent->GetOwner())->GetOriginalComponent(Context.SourceComponent.Get());}else{return Context.SourceComponent.Get();}
}

再看看它是如何获取GetActorLocalBoundsPCG

UPCGBlueprintHelpers::GetActorLocalBoundsPCG

FBox UPCGBlueprintHelpers::GetActorLocalBoundsPCG(AActor* InActor, bool bIgnorePCGCreatedComponents)
{return PCGHelpers::GetActorLocalBounds(InActor, bIgnorePCGCreatedComponents);
}

PCGHelpers::GetActorLocalBounds

FBox GetActorLocalBounds(const AActor* InActor, bool bIgnorePCGCreatedComponents){// Specialized version of CalculateComponentsBoundingBoxInLocalScape that skips over PCG generated components// This is to ensure stable bounds and no timing issues (cleared ISMs, etc.)FBox Box(EForceInit::ForceInit);const bool bNonColliding = true;const bool bIncludeFromChildActors = true;if (InActor){const FTransform& ActorToWorld = InActor->GetTransform();const FTransform WorldToActor = ActorToWorld.Inverse();InActor->ForEachComponent<UPrimitiveComponent>(bIncludeFromChildActors, [bNonColliding, bIgnorePCGCreatedComponents, &WorldToActor, &Box](const UPrimitiveComponent* InPrimComp){if ((bNonColliding || InPrimComp->IsCollisionEnabled()) &&(!bIgnorePCGCreatedComponents || !InPrimComp->ComponentTags.Contains(DefaultPCGTag))){const FTransform ComponentToActor = InPrimComp->GetComponentTransform() * WorldToActor;Box += InPrimComp->CalcBounds(ComponentToActor).GetBox();}});}else{UE_LOG(LogPCG, Error, TEXT("Actor is invalid in GetActorLocalBounds"));}return Box;}

所谓LocalBounds就是把所属Actor的所有PrimitiveComponent叠加起来获得最大的FBox

在这里插入图片描述

http://www.mmbaike.com/news/95721.html

相关文章:

  • 丹徒网站建设平台谷歌seo排名优化
  • 推销产品的万能句子济南网络优化网址
  • 做兼职编辑的网站seo培训中心
  • 怎样创建个人购物网站网络文章发布平台
  • 体验营销宁波seo推广公司排名
  • 祥云平台做网站好不好推广软文范文800字
  • 有人打电话说请我做网站 骗子十大流量平台
  • 做网站建设公司排名免费制作网站
  • 网站做推广需要营业执照徐州网站优化
  • 鲜花外贸网站建设上海推广网络营销咨询热线
  • 升降机网站怎么做揭阳seo快速排名
  • 网站开发简单吗厦门人才网官网招聘信息网
  • 网站提高banner图打开速度知名网站排名
  • 怎么做简单的网站公关公司
  • 网站超链接怎么做 word文档郑州网站推广技术
  • 佛山网站建设专业公司网络营销和直播电商专业学什么
  • 正常网站 月均ip pv建一个自己的网站
  • 国内网站如何做流量提供seo顾问服务适合的对象是
  • 网站 php 源码推广产品的方法和步骤
  • 怎样弄网站广告推广网站
  • 重庆北京网站建设网站seo标题优化技巧
  • 深圳网站建设是什么seo的基本步骤
  • 织梦cms官方网站网站设计的基本原则
  • 建设银行官网学生交费网站百度推广电话销售话术
  • 武汉网站开发公司哪家好企业培训心得
  • 乐辰网站建设网推是什么
  • 黄色网站国外网络营销的网站建设
  • wordpress的主题下载上海官网seo
  • wordpress虚拟资源官方正版清理优化工具
  • 公司网站备案需要什么黄页大全