Seriously!
Go Back   Seriously! Forums > Gaming > Serious Sam HD > Serious Sam HD Workshop

Serious Sam HD Workshop The official forum for Serious Sam: HD projects, be it maps, mods, or something else.

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 02-10-2013, 06:43 AM   #1  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Cloth and Wind Tutorial for Serious Editor 3/3.5

A few days ago, out of curiosity, I've checked out the Cloth entity. Originally buggy, this entity now is working mostly properly (it's still buggy sometimes, though).

So what is the Cloth Entity? Cloth entity is a mostly two dimensional plane that have the physics of working just like a cloth hanging from somewhere, or just like a flag. Remember those Mental flags from the first Serious Sam 3 teaser? Those are Clothes.

Setting up Clothes are actually quite easy.

http://i.imgur.com/94GalNKl.jpg

What you can see there is what I think is the ideal set up for the Cloth entity, after many experiments. I might be wrong, and I might change it, but this is what I've been using now.

As for the fields:

Width/Height in meters - The size of the Cloth.
Nodes per Width/Height - How many "nodes" the Cloth is made out of; basically, how many polygons. Having this to be high can make the Cloth look more realistic, but it can eat your performance FAST! Having 9 Clothes with 31/31 nodes will cause the game to slow down to 0.5 FPS. Not kidding.
Verlet iterations - I have no idea what this is. Default is always 2 and can't be less.
Thickness - Determines the collision size of all of the nodes. This is most noticeable to the player if they rub up against the cloth.
Render nodes/constraints - Render the nodes and the polygons, even in the game. Set them both off so the Clothes look normal in game.
Structural/shear/bend spring stiffness - These fields control how much the cloth can bend, bounce or how stiff the thing is. Experimenting with this can cause some interesting results. My ideal is 1/1/0.01.
Shader preset - Where you set your shaders and textures, the regular stuff. More about this downwards.
Cast shadows - Set if you want the Cloth to cast dynamic shadows.
Fix cloth points - Now this is an important one. You have to set to fix either the edges and/or the corners of the Cloth to work properly. Without a fixed point, the Cloth will just fall down and through the floor.
Parent part - I have no idea. Maybe it's to set which part of the cloth is parented to another model. Haven't tested it yet.
Mass per square meter [kg/m^2] - This sets how heavy the cloth is. Important when it comes to Wind. I set it to be pretty light (0.01).

About Shader Preset

This is mostly the same as the usual stuff when it comes to texturing. The Cloth itself has a default "Texture" UVmap, so you can use those. For ideal results, I suggest using the default fabric normal texture for normalmap and detail normalmap, since it makes the flag to feel like some sort of fabric from close.

http://i.imgur.com/cDqr0d9l.jpg

MOST IMPORTANT THING: Set the "Double sided" field to be on. It's most important, otherwise your Cloth will be invisible from behind, and all buggy.

http://i.imgur.com/CiiWaS7.jpg


What the Cloth entity can do:

- Look cool.
- Naturally affected by the Wind Entity.
- Naturally affected by the player and LeggedCharacter puppets. Dunno about Aircraft and other puppets though.
- Naturally affected by projectiles.
- It can bug out the most weirdest ways.
- Destroy your framerate if not set up properly.

What the Cloth entity can't do:

- Shockwaves (like those from explosions) can't affect it.
- Non projectile shots (from hitscan weapons, and possibly Magical projectiles) can't affect it.
- It can't be destroyed, aka if you shoot it with a rocket, it will just go through it.
- Can't collide with other cloth and Simple Models. Just goes through them. It might collide with Static Models, though.


About the Wind Entity

The Wind entity is what it sounds like, it generates wind. In SS3, it is barely used, but you might have seen some fields here and there, how some stuff could be set to be effected by it (like particle effects). One usage of it is on the first level "Summer in Cairo", where it's used on the Khnum street where it blows paper into your face.
Cloth entities are naturally affected by them, so Wind is important if you want those flags flutter in the wind.

My current setup of the Wind entity, which I use with the flags in a set area (aka not on the whole level), is this:

http://i.imgur.com/OsY3cVzl.jpg

Most of the fields are self explanatory.

http://i.imgur.com/ROESVWZ.jpg

It can be three types of Wind: Directional, Point and Vortex.

Directional makes the wind blow in a certain direction. Now this is when the entity can bug out, and blow to a different direction than it should do.

I haven't tried Point wind yet.

Vortex wind is wind that blows up from the ground. Could be used for vents.

About Drift


Drift is basically the strength of the wind and is important when it comes to your Cloth fluttering. I usually use a Drift of 0.1, which can be described as "light wind".
A Drift of 1 however is "strong wind", so it makes the Clothes flutter wildly.

EDIT: The Speed of the wind is also important here, forgot that.

http://i.imgur.com/e0urQi5l.jpg


I hope this little tutorial was helpful to you fellow mappers, in understanding the basic workings of the Cloth and Wind entities. Using these entities properly could make some scenes look really cool.

http://i.imgur.com/8RnKOHjl.jpg
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.

Last edited by Solais; 02-10-2013 at 01:59 PM.
  Reply With Quote
Old 02-10-2013, 10:13 AM   #2  
Pan
Silver Lined Boots
 
Pan's Avatar
 
Joined: May 2007
Location: Looking for Snake
 
Pan is offline Gamertag: SeriousPan PSN ID: YueStrife Steam ID: Yuethetmerchant
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

This was great, thank you.

One question. How do I stop the cloth pieces I have from falling through the map instead of staying where they belong?
__________________
"Don't you have to be told to do things to be considered a slave?"
  Reply With Quote
Old 02-10-2013, 10:26 AM   #3  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Fix cloth points - Now this is an important one. You have to set to fix either the edges and/or the corners of the Cloth to work properly. Without a fixed point, the Cloth will just fall down and through the floor.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.
  Reply With Quote
Old 02-10-2013, 10:34 AM   #4  
Albino Cyclops
 
Slayer5381's Avatar
 
Joined: Apr 2012
Location: Serbia
 
Slayer5381 is offline Steam ID: obito-kun Youtube: slayer5381
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Awesome! where can i find this?
  Reply With Quote
Old 02-10-2013, 10:45 AM   #5  
Scrapjack
 
Mental4's Avatar
 
Joined: May 2007
Location: France
 
Mental4 is offline Gamertag: MrMental4 PSN ID: MrMental4 Steam ID: Mental4 Raptr ID: Mental4 Send a message via MSN to Mental4 Send a message via Skype™ to Mental4 Facebook: Mental4 Twitter: Mental4 Youtube: MrMental4
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Great ! I need these flags !!!
__________________
My showcase here !!!

My futures mappack:
- Mental4's deathmatch (and survival) mappack (SS3)
- Arachnophobia (SS2)
- Survival map pack (SSHD)
- The Great Adventure: Part 7 (SSSE or SSR)
- The Great Adventure 2 (SS2)
  Reply With Quote
Old 02-10-2013, 10:47 AM   #6  
Oh Long Johnson
 
noam2000's Avatar
 
Joined: Sep 2012
 
noam2000 is offline
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

awesome! thanks solais!
  Reply With Quote
Old 02-10-2013, 10:50 AM   #7  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

The flag textures are part of SS3 Extended Part 1. You can use them when that is out, which is not very far away.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.
  Reply With Quote
Old 02-10-2013, 11:20 AM   #8  
Oh Long Johnson
 
noam2000's Avatar
 
Joined: Sep 2012
 
noam2000 is offline
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

http://img832.imageshack.us/img832/8356/123123123td.jpg

:3
  Reply With Quote
Old 02-10-2013, 11:26 AM   #9  
Pan
Silver Lined Boots
 
Pan's Avatar
 
Joined: May 2007
Location: Looking for Snake
 
Pan is offline Gamertag: SeriousPan PSN ID: YueStrife Steam ID: Yuethetmerchant
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Click Render Node and Render Constraints to get rid of those lines, bro. =>
__________________
"Don't you have to be told to do things to be considered a slave?"
  Reply With Quote
Old 02-10-2013, 11:32 AM   #10  
Albino Cyclops
 
Slayer5381's Avatar
 
Joined: Apr 2012
Location: Serbia
 
Slayer5381 is offline Steam ID: obito-kun Youtube: slayer5381
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Where flags going out?
  Reply With Quote
Old 02-10-2013, 01:48 PM   #11  
Night Sparrow
 
Ryason55's Avatar
 
Joined: Nov 2006
 
Ryason55 is offline
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Quote:
Originally Posted by Solais
Thickness - As far as I know, this field really does nothing.
It determines the collision size of all of the nodes. This is most noticeable to the player if they rub up against the cloth.
  Reply With Quote
Old 02-10-2013, 01:59 PM   #12  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Thanks! Add it to the first post.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.
  Reply With Quote
Old 08-25-2014, 01:45 AM   #13  
Lurker
 
Dankzaii's Avatar
 
Joined: Nov 2011
Location: Isengard
 
Dankzaii is offline Steam ID: SpazmadDankzaii
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Oh look, this thread got moved to a section it doesn't even belong, why is this in Serious Sam HD
  Reply With Quote
Old 08-25-2014, 03:25 AM   #14  
Oh Long Johnson
 
noam2000's Avatar
 
Joined: Sep 2012
 
noam2000 is offline
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Well technically cloth can also be used in SSHD IIRC.
  Reply With Quote
Old 08-25-2014, 03:29 AM   #15  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

Yep. Though wonder how bugged they are there. Hmm.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.
  Reply With Quote
Old 08-25-2014, 04:31 AM   #16  
Lurker
 
Dankzaii's Avatar
 
Joined: Nov 2011
Location: Isengard
 
Dankzaii is offline Steam ID: SpazmadDankzaii
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

If this tutorial was made for SS3 why is it here in SSHD?

Having a thread in SSHD saying "for SS3" is like posting in the SSNE subforum and writing "for SS2"
  Reply With Quote
Old 08-25-2014, 04:44 AM   #17  
Oh Long Johnson
 
noam2000's Avatar
 
Joined: Sep 2012
 
noam2000 is offline
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Sam 3

But if its for both SS3 and SSHD,why does it matter so much to be in SS3?
  Reply With Quote
Old 08-25-2014, 04:50 AM   #18  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Editor 3/3.5

There, fixed.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.
  Reply With Quote
Old 01-28-2015, 05:33 PM   #19  
Bio
Mechanoid
 
Bio's Avatar
 
Joined: Feb 2012
Location: Earth
 
Bio is offline
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Editor 3/3.5

Why isn't this thread stickied?
  Reply With Quote
Old 01-28-2015, 08:28 PM   #20  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: [Tutorial]Cloth and Wind Tutorial for Serious Editor 3/3.5

Because I wrote it before I had the power to do so.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:29 AM.