Realistic Flags? How can I go about doing this!

Im currently working on a project and im wondering how I can make some wavy and realistic flags!
here’s a example of some other devs who have done similar stuff!

https://cdn.discordapp.com/attachments/697453759953109154/726088629146877992/flag.mp4

https://cdn.discordapp.com/attachments/663963422110515220/739332150406676520/3W34qUq6Ll.mp4

Any help loved!

7 Likes

I think they use attachments for the flag like many other flags are made, or they use tons of meshes of the flag and make the previous one transparent in a loop to achieve this affect

3 Likes

You could probably use a beam to make this. If you mess around with beam’s curve sizes and attachment’s position and orientation, you could make a realistic wavy flag.

Here's a short video of how I did it


(The flag may not look very realistic compared to the one you provided as I didn’t spend much time on it.)

And the script used to animate the flag (note that I rushed making it)
local TweenService = game:GetService("TweenService")

local TInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

local Part = script.Parent
local Beam = Part:WaitForChild("Beam")
local Attachment2 = Part:WaitForChild("Attachment2")

coroutine.wrap(function()
	while true do
		TweenService:Create(Attachment2, TInfo, {Position = Vector3.new(Attachment2.Position.X, Attachment2.Position.Y, 1)}):Play()
		TweenService:Create(Attachment2, TInfo, {Orientation = Vector3.new(5, 5, 5)}):Play()
		wait(1)
		TweenService:Create(Attachment2, TInfo, {Position = Vector3.new(Attachment2.Position.X, Attachment2.Position.Y, -1)}):Play()
		TweenService:Create(Attachment2, TInfo, {Orientation = Vector3.new(-5, -5, -5)}):Play()
		wait(1)
	end
end)()

coroutine.wrap(function()
	while true do
		for i = 0, 5, 0.1 do
			game:GetService("RunService").Stepped:Wait()
			Beam.CurveSize0 = i
		end
		for i = 5, 0, -0.1 do
			game:GetService("RunService").Stepped:Wait()
			Beam.CurveSize0 = i
		end
	end
end)()

coroutine.wrap(function()
	while true do
		for i = 0, 5, 0.1 do
			game:GetService("RunService").Stepped:Wait()
			Beam.CurveSize1 = i
		end
		for i = 5, 0, -0.1 do
			game:GetService("RunService").Stepped:Wait()
			Beam.CurveSize1 = i
		end
	end
end)()

I believe you could also do this through mesh deformation, but that’s still in Studio beta, which means it’s not available in-game.

10 Likes

alright im gonna explain a lot: FIRST. you can make a flag with BLENDER MESHES and do so by making a flag in blender, find a tutorial for that, putting a wind part on, and auto keying it so it records the flags wind movements. there are plugins to import blender animation to roblox, follow those. and boom. yay. flag. havent tested this out yet but I might ill edit this post if I do.

3 Likes

This might help: Roblox-How to use beam to make flag - YouTube

2 Likes

The way GC did it is basically by using cloth physics in blender, adding some wind then exporting each individual mesh.

Its a very unoptimised way of doing it, as he used over 30 meshes, with each mesh having about 1k tris.
The way it basically worked was that he had a script changing the transparency of each mesh making it look animated.

One solution i might find is by using live meshes, jsut make a simple rig and hand animate the mesh using bones.

1 Like

So they used a part with a decal and used bones to turn it into a rig, keep in mind you will have to animate it! after you are done with the animation, use an animationController instead of a humanoid to play the animation

There are 2 simpler options:

  1. Create the flat flag mesh in Blender, rig the mesh with Bones. Then import as an .fbx into Studio and animate using the animation editor.
    OR
  2. Create the flat flag mesh in Blender, rig the mesh with Bones. Then import as an .fbx or .obj into Studio. Then use MeshDeformation to move the mesh.

No need to import multiple meshes for a simple procedure.

I were to say that Mesh Deformation is for most of them, they probably put a few bones in them in an modelling software like blender then put it in studio.