Jump to content


Photo

Animated flag asset not working


Best Answer Jimbobh , 05 February 2017 - 12:47 AM

Here is a short tutorial on getting a Flag in Unity.  Not great but will give you an idea how it works.

Sorry I have no mic so I used captions. Hope this helps a little.

 

Unity Flag package: This is my finished Flag

https://drive.google...iew?usp=sharing

 

Materials and double sided shader. unzip and Put these in your assets folder.  (the dbl sided shader allows texture to both sides of flag)

https://drive.google...iew?usp=sharing

 

 

Good Luck,, Jim

Go to the full post


  • Please log in to reply
28 replies to this topic

#1 M Rose

M Rose

    Advanced Member

  • Members
  • PipPipPip
  • 1,918 posts
  • LocationMelbourne, Australia

Posted 03 February 2017 - 09:11 PM

I purchased an animated flag kit as there is an Australian flag near the Royal Melbourne clubhouse that I wanted to add in; the flag moves in Unity if I press the "play" button, but it does not work in Perfect Golf, and CF won't let me do a build unless I stop the animation.

 

Is there a way to have this work, or will the two not be compatible with each other?


VG2 • PG • 2k21 • 2019 • Links • GBC • JN5


#2 pingzing

pingzing

    Advanced Member

  • Members
  • PipPipPip
  • 954 posts
  • LocationQld Australia

Posted 03 February 2017 - 09:24 PM

The drop down icon above on the top above scene window  in cf , the window that shows scene , game, asset store, its the icon under asset store , shows a picture 

where you tick skybox, fog, etc, is animated materails ticked

 

Could be that



#3 NoPutt

NoPutt

    Advanced Member

  • Members
  • PipPipPip
  • 2,902 posts
  • LocationSouth Carolina

Posted 03 February 2017 - 09:39 PM

The flag most likely has a script that PG

doesn't allow. 


Dry Gulch...................Released                     Smithfield Golf Club...........Released

Millstone Golf Club....Released                      The Walker Course............Released

Kingsmill Woods Course...Released               Pine Lake Golf Club..........Released

Woodhaven Golf Club (9) Released                The Reserve at Keowee...Released

Cliffs at Keowee Vineyards..Released              The Ace Club...................Released

Dry Gulch 2..........Released                               Blackberry Oaks.............Released

 


#4 M Rose

M Rose

    Advanced Member

  • Members
  • PipPipPip
  • 1,918 posts
  • LocationMelbourne, Australia

Posted 03 February 2017 - 09:56 PM

It is ticked. I'm guessing it is probably a script, which means it won't work at all.

 

Not really important, but I guess I wasted five bucks :P


VG2 • PG • 2k21 • 2019 • Links • GBC • JN5


#5 garynorman

garynorman

    Advanced Member

  • Members
  • PipPipPip
  • 481 posts
  • LocationBedfordshire, England

Posted 03 February 2017 - 09:56 PM

The flag most likely has a script that PG

doesn't allow. 

 

That'd be my guess too...

 

It's really annoying that Unity doesn't work with deformed mesh animations from third party 3d applications.  I wonder if there's any way that the devs could allow us to tap into the script that animates the pin flags?



#6 NoPutt

NoPutt

    Advanced Member

  • Members
  • PipPipPip
  • 2,902 posts
  • LocationSouth Carolina

Posted 03 February 2017 - 10:14 PM

I'm animating some flags with blender.

The cloth collisions work great and the

air-flow can also be adjusted. A little more 

testing to get the FPS just right and the looping

down to a few seconds and all should work great.

Fingers Crossed.


  • garynorman and DPRoberts like this

Dry Gulch...................Released                     Smithfield Golf Club...........Released

Millstone Golf Club....Released                      The Walker Course............Released

Kingsmill Woods Course...Released               Pine Lake Golf Club..........Released

Woodhaven Golf Club (9) Released                The Reserve at Keowee...Released

Cliffs at Keowee Vineyards..Released              The Ace Club...................Released

Dry Gulch 2..........Released                               Blackberry Oaks.............Released

 


#7 M Rose

M Rose

    Advanced Member

  • Members
  • PipPipPip
  • 1,918 posts
  • LocationMelbourne, Australia

Posted 03 February 2017 - 10:56 PM

I figure there has to be some way to do it if we can make water move, and (Dogz?) can make a moving train.

 

I was hoping to put some flags in for Royal Melbourne on a couple of the holes that are on the plot but out of play, so if you can find a technique that works, I'd love to learn how to do it.


VG2 • PG • 2k21 • 2019 • Links • GBC • JN5


#8 Crow357

Crow357

    Advanced Member

  • Administrators
  • 4,670 posts

Posted 04 February 2017 - 12:13 AM

See if there's a script for the regular flag and see if you can apply it to your flag?
Win 10, i7-7700 @4.2 ghz, 16GB DDR4, EVGA GTX 1080
Swing Type: Tour Pro Wireless XBox 360 Controller.

#9 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 04 February 2017 - 12:32 AM

Eager to see if you guys can solve this. I downloaded something a few months back that I couldn't get to run in game either.

Can it be placed in the scripts folder like the flock of birds? Maybe they allow special pass through permission to that folder?

I couldn't find the PP script either that runs the in game flag.

I figured the NoPutt solution of Blender was the best no script way to do it. Just never got around to it.

#10 Jimbobh

Jimbobh

    Advanced Member

  • Members
  • PipPipPip
  • 539 posts
  • LocationMaine

Posted 04 February 2017 - 02:17 AM

I made this flag for my Highlands course. I am trying to make a unity package for it to upload, but unity isn't cooperating. Once I get it figured out, I'll upload it if anyone is interested. You would just need to change the flag texture to what you want.


  • Mike Jones, Justin9926 and DPRoberts like this

Gigabyte ga-z68x-ud3h-b3 Motherboard

Intel Core i5-2400 CPU@3.1GHz 3.70GHz

GeForce GTX 1050 Ti
16GB Ram   (2)G.Skill Ripjaws F3-10666L9S-8GBXL
Windows 7 Home Premium


#11 NoPutt

NoPutt

    Advanced Member

  • Members
  • PipPipPip
  • 2,902 posts
  • LocationSouth Carolina

Posted 04 February 2017 - 09:51 AM

Well. I can design and animate the flag in Blender,

but not sure if I'm exporting correctly into Unity.

Kinda stuck for now. Any ideas DP?


Dry Gulch...................Released                     Smithfield Golf Club...........Released

Millstone Golf Club....Released                      The Walker Course............Released

Kingsmill Woods Course...Released               Pine Lake Golf Club..........Released

Woodhaven Golf Club (9) Released                The Reserve at Keowee...Released

Cliffs at Keowee Vineyards..Released              The Ace Club...................Released

Dry Gulch 2..........Released                               Blackberry Oaks.............Released

 


#12 garynorman

garynorman

    Advanced Member

  • Members
  • PipPipPip
  • 481 posts
  • LocationBedfordshire, England

Posted 04 February 2017 - 10:18 AM

Well. I can design and animate the flag in Blender,

but not sure if I'm exporting correctly into Unity.

Kinda stuck for now. Any ideas DP?

As I already stated, I'm pretty sure that you cannot create animated meshes in 3rd party software and export them into Unity...

 

You can animate an object's position or animate two separate meshes either manually (with keyframes) or with the use of 'bones' but you cannot deform meshes have that deformation animate within Unity via 3rd party software (eg Blender)

 

Just in case you still don't believe me:

 

http://blender.stack...y-problem/72305

 

https://forum.unity3...g-a-flag.42495/



#13 NoPutt

NoPutt

    Advanced Member

  • Members
  • PipPipPip
  • 2,902 posts
  • LocationSouth Carolina

Posted 04 February 2017 - 10:57 AM

I believe you, and I've seen those questions and answers, I'm just too stubborn to give up.

I was hoping that sub-dividing the plane as above

and animating would work, but apparently not.

What a shame, flags really put a stamp on a course,

but I refuse to hoist a static rectangle. Thanks G.


Dry Gulch...................Released                     Smithfield Golf Club...........Released

Millstone Golf Club....Released                      The Walker Course............Released

Kingsmill Woods Course...Released               Pine Lake Golf Club..........Released

Woodhaven Golf Club (9) Released                The Reserve at Keowee...Released

Cliffs at Keowee Vineyards..Released              The Ace Club...................Released

Dry Gulch 2..........Released                               Blackberry Oaks.............Released

 


#14 Jimbobh

Jimbobh

    Advanced Member

  • Members
  • PipPipPip
  • 539 posts
  • LocationMaine

Posted 04 February 2017 - 03:16 PM

Ok, I made this prefab of the flag if you want to try it. I doesn't drag in to the scene quite right but I will work on that. Some adjustments might need to be made depending on wind direction between the flag and pole since they are not actually attached to each other.

Neil, did you add the Cloth physics to your flag?

https://drive.google...iew?usp=sharing

 

 

 


  • DPRoberts likes this

Gigabyte ga-z68x-ud3h-b3 Motherboard

Intel Core i5-2400 CPU@3.1GHz 3.70GHz

GeForce GTX 1050 Ti
16GB Ram   (2)G.Skill Ripjaws F3-10666L9S-8GBXL
Windows 7 Home Premium


#15 NoPutt

NoPutt

    Advanced Member

  • Members
  • PipPipPip
  • 2,902 posts
  • LocationSouth Carolina

Posted 04 February 2017 - 03:25 PM

I did add the Cloth physics in Blender.

Did you export into Unity as  .FBX?


Dry Gulch...................Released                     Smithfield Golf Club...........Released

Millstone Golf Club....Released                      The Walker Course............Released

Kingsmill Woods Course...Released               Pine Lake Golf Club..........Released

Woodhaven Golf Club (9) Released                The Reserve at Keowee...Released

Cliffs at Keowee Vineyards..Released              The Ace Club...................Released

Dry Gulch 2..........Released                               Blackberry Oaks.............Released

 


#16 Jimbobh

Jimbobh

    Advanced Member

  • Members
  • PipPipPip
  • 539 posts
  • LocationMaine

Posted 04 February 2017 - 03:42 PM

I saved as a blender file, and added the unity cloth physics to it. Just add component and search for cloth. It was a long time ago when I made this so I have forgotten a lot..lol

Gigabyte ga-z68x-ud3h-b3 Motherboard

Intel Core i5-2400 CPU@3.1GHz 3.70GHz

GeForce GTX 1050 Ti
16GB Ram   (2)G.Skill Ripjaws F3-10666L9S-8GBXL
Windows 7 Home Premium


#17 NoPutt

NoPutt

    Advanced Member

  • Members
  • PipPipPip
  • 2,902 posts
  • LocationSouth Carolina

Posted 04 February 2017 - 03:48 PM

So the animating was done in Unity also?

I was able to drag your flag into the scene,

worked great. I suppose you just used Blender

for texturing a 2 sided plane, and exporting to Unity?


Dry Gulch...................Released                     Smithfield Golf Club...........Released

Millstone Golf Club....Released                      The Walker Course............Released

Kingsmill Woods Course...Released               Pine Lake Golf Club..........Released

Woodhaven Golf Club (9) Released                The Reserve at Keowee...Released

Cliffs at Keowee Vineyards..Released              The Ace Club...................Released

Dry Gulch 2..........Released                               Blackberry Oaks.............Released

 


#18 Jimbobh

Jimbobh

    Advanced Member

  • Members
  • PipPipPip
  • 539 posts
  • LocationMaine

Posted 04 February 2017 - 04:02 PM

I don't remember exactly what I did...lol. I'll send you my blender file so you can check it out. I know I had to add weights or something to it, and maybe an artmature.


Gigabyte ga-z68x-ud3h-b3 Motherboard

Intel Core i5-2400 CPU@3.1GHz 3.70GHz

GeForce GTX 1050 Ti
16GB Ram   (2)G.Skill Ripjaws F3-10666L9S-8GBXL
Windows 7 Home Premium


#19 NoPutt

NoPutt

    Advanced Member

  • Members
  • PipPipPip
  • 2,902 posts
  • LocationSouth Carolina

Posted 04 February 2017 - 04:09 PM

Thanks Jim, I'd be interested in seeing the Blender file.


Dry Gulch...................Released                     Smithfield Golf Club...........Released

Millstone Golf Club....Released                      The Walker Course............Released

Kingsmill Woods Course...Released               Pine Lake Golf Club..........Released

Woodhaven Golf Club (9) Released                The Reserve at Keowee...Released

Cliffs at Keowee Vineyards..Released              The Ace Club...................Released

Dry Gulch 2..........Released                               Blackberry Oaks.............Released

 


#20 Jimbobh

Jimbobh

    Advanced Member

  • Members
  • PipPipPip
  • 539 posts
  • LocationMaine

Posted 05 February 2017 - 12:47 AM   Best Answer

Here is a short tutorial on getting a Flag in Unity.  Not great but will give you an idea how it works.

Sorry I have no mic so I used captions. Hope this helps a little.

 

Unity Flag package: This is my finished Flag

https://drive.google...iew?usp=sharing

 

Materials and double sided shader. unzip and Put these in your assets folder.  (the dbl sided shader allows texture to both sides of flag)

https://drive.google...iew?usp=sharing

 

 

Good Luck,, Jim


  • DPRoberts and jspirate like this

Gigabyte ga-z68x-ud3h-b3 Motherboard

Intel Core i5-2400 CPU@3.1GHz 3.70GHz

GeForce GTX 1050 Ti
16GB Ram   (2)G.Skill Ripjaws F3-10666L9S-8GBXL
Windows 7 Home Premium





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users