BluePrintで生成したスタティックメッシュ群を固定するには

BluePrintを使って数種類のビルの1階分だけのスタティックメッシュを積み上げて、自動的に様々な形状、マテリアル、高さのビルを作り出す半自動生成のビル街を作ったのですが、これはコンストラクションスクリプトなのでマップを読み込むたびに実行され、パターンが変わってしまい、そのたびにビルドしなければFPSが下がってしまいます。
そこで一度コンストラクションスクリプトを実行してビル街を生成した後、マップを保存すれば、エディタを終了してから次にエディタを起動したときに、以前のビル街のパターンが再現され、ビルドの必要がないようにしたいのですが、これは可能でしょうか?
また、毎回ゲームを起動するたびにビル街のパターンが変わっても(つまり、ビルドしなくても)ビルドしたときのFPSと同じFPSが出せる方法があれば教えて下さい。

照明が焼成されるので、CPUは、予め計算された照明計算を使用することを可能とすることができる。

私は、Googleが翻訳使用しています。ごめんなさい。

You don’t need to use google translation to post an answer.
I understand English to a certain extent.

“How would I lock a result of blueprint procedural buildings?” It is my question.

thanks for your reply

Oh… I am sorry, since I thought you mean the lighting and the FPS caused by it. I can’t help you much with procedural lighting issue. And could you clarify what you mean by “locking” the result of your procedural buildings?

When you lock, what expectations are you achieving?

My Automatic building generator BP runs every time when the level is loaded, so the buildings patterns change. Then the built lighting will be lost and the FPS will decrease.

I want to achieve:

  1. The BP’s construction script runs when I put it on the level.(or when I move it)
  2. Then I save the level and close UE4 Editor.
  3. When I open the UE4 Editor, the procedural buildings doesn’t change.
  4. Lighting does NOT need to rebuilt.

sorry for my poor English

That would be really hard to do. You would have to tweak the rendering pipeline Unreal Engine 4 uses, as well as tweaking where the lighting does not need to be recalculated each time the building is regenerated.

Also, when you open Unreal Engine 4 Editor, it runs your level blueprints multiple times before it finishes loading and initializing everything you have. Since you put your procedural building generations in the construction script, it will definitely run multiple times, which will cause invalid lighting calculations.

You can test this by using Visual Studio, setting a breakpoint somewhere that a function will be called at the start in UE4, compiling the code via F5, and wait until the VS debugger reaches the breakpoint. For me, I ran a unit test case scenario where it just prints a string onto the screen. When debugging my project, the code ran 5 times.

(Also, unrelated, I don’t even speak English at all.)

I think it is not rendering problem, If the generated buildings(static meshes of BP) change into “normal” static meshes, this issue will be solved. There’s no way to convert a static mesh component to a world static mesh?

There is no notion of a world static mesh. What you may want is a class blueprint Actor consisting of all of the static mesh components you need.

Blueprintを見ないとどんな作り方をしているか分かりませんが、どこかでランダムの数字を使っているでしょうか。ならRandom Streamの使い方を以下のビデオでご覧ください。それを使うと、ビルはシードによって決まった場所に配置されますので、保存してまたロードしてもその位置は変わりません。ビデオは英語ですが、問題ないようですね。

Random Streams

配置が同じでもレベルのロードのたびにあとから作られるものなので結局ビルドが必要だと勝手に思い込んでいました。配置が同じになるようにすればよかったのですね。 ありがとうございました。