IPB Style© Fisana

Jump to content


Animated Trees


  • Please log in to reply
63 replies to this topic

#21 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 15 June 2012 - 10:55 AM

View PostPureon, on 14 June 2012 - 07:32 PM, said:

Interesting. Am I right in thinking something like that would take a long time to implement in order to test performance impact?
The correct answer is 25 minutes.

Edited by myconid, 15 June 2012 - 10:56 AM.

Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#22 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,220 posts)

Posted 15 June 2012 - 11:00 AM

View Postmyconid, on 15 June 2012 - 10:55 AM, said:

The correct answer is 25 minutes.

lol, now you're just showing off! Amazing.
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#23 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 15 June 2012 - 01:11 PM

View Postmyconid, on 15 June 2012 - 10:55 AM, said:

The correct answer is 25 minutes.
Very nice! Might it be advantageous to introduce a slight bit of randomness? Perhaps in the phase?

Edited by zoot, 15 June 2012 - 01:57 PM.


#24 Potter

Potter

  • Community Members
    Pip

  • Discens
    (63 posts)

Posted 15 June 2012 - 02:54 PM

View Postmyconid, on 15 June 2012 - 10:55 AM, said:

The correct answer is 25 minutes.

WOW! Looks amazing what a simple effect can do for the game ambience...

#25 Shield Bearer

Shield Bearer

  • 0 A.D. Art Team

  • Primus Pilus
    (1,583 posts)

Posted 15 June 2012 - 03:28 PM

Hahahahaha! Man, you are too cool! Did you say you could do this for cloth too? Amazing stuff! Keep it up bro (y)
Amish Coelho [aka Shield Bearer aka gAMeboy]
Wildfire Games Art Department
Contact me: amish13@gmail.com
AIM handle: Mythgamer
MSN Account: amish13@live.com


"The fate of 0 AD is in the hands of those who have vision and perseverance." - Ken Wood

#26 Wijitmaker

Wijitmaker

  • 0 A.D. Art Team

  • 0 A.D. Old Timer
    (9,451 posts)

Posted 15 June 2012 - 03:40 PM

Did you guys know that there was an actor made years ago for testing? Check this out if you have time:

binaries/data/mods/public/art/actors/flora/trees/pine_animated.xml (hopefully it still works)

See what kind of performance issues you might have if you load a map up with these actors as a comparison (probably poorer?). This test tree was also made to animate a fall on "death" (they should actually fall when first attacked).

I like myconid's method a lot better though, no animating required and I'm guessing better performance ;)
Jason Bishop [ aka Wijitmaker ]

Wildfire Games CFO, retired artist
Contact me: jason@wildfiregames.com

Support Wildfire Games!!!

#27 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,220 posts)

Posted 15 June 2012 - 04:21 PM

View PostWijitmaker, on 15 June 2012 - 03:40 PM, said:

Did you guys know that there was an actor made years ago for testing? Check this out if you have time:
Yep I saw that when I first started working on animations for 0 A.D. :)
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#28 twin

twin

  • Community Newbie

  • Tiro
    (3 posts)

Posted 15 June 2012 - 04:39 PM

Good animation. Do you think to move the smoke in the same direction to the wind? I think that it will more realistic.

#29 Shield Bearer

Shield Bearer

  • 0 A.D. Art Team

  • Primus Pilus
    (1,583 posts)

Posted 15 June 2012 - 05:22 PM

How feasible do you think adding falling trunks would be? And making the tree wobble when being chopped?
Amish Coelho [aka Shield Bearer aka gAMeboy]
Wildfire Games Art Department
Contact me: amish13@gmail.com
AIM handle: Mythgamer
MSN Account: amish13@live.com


"The fate of 0 AD is in the hands of those who have vision and perseverance." - Ken Wood

#30 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 15 June 2012 - 05:30 PM

View PostPureon, on 15 June 2012 - 11:00 AM, said:

lol, now you're just showing off! Amazing.
Just having a bit of fun. ;)

View Postzoot, on 15 June 2012 - 01:11 PM, said:

Very nice! Might it be advantageous to introduce a slight bit of randomness? Perhaps in the phase?
After the video I thought to use the object coordinates as an offset of the phase to make "waves" of wind passing through the terrain. Didn't quite work out the way I wanted, but it did make it look random! Right now I'm using three cosines per vertex... maybe kind of inefficient, so I'll need to find a way to approximate it...

View PostWijitmaker, on 15 June 2012 - 03:40 PM, said:

Did you guys know that there was an actor made years ago for testing?
Yeah, I came across it while changing the tree actors.

View Posttwin, on 15 June 2012 - 04:39 PM, said:

Good animation. Do you think to move the smoke in the same direction to the wind? I think that it will more realistic.
It's possible. The particle emitter could share the wind information with the tree shader, though the two are different effects.

View PostShield Bearer, on 15 June 2012 - 05:22 PM, said:

How feasible do you think adding falling trunks would be? And making the tree wobble when being chopped?
That's a job for the animators, I think. Adding a physics engine would take a lot longer than 25 minutes!
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#31 FeXoR

FeXoR

  • Community Members
    PipPipPipPipPip

  • Centurio
    (660 posts)

Posted 15 June 2012 - 06:33 PM

Great thing in general, even better for 25 min (y)

View Postmyconid, on 15 June 2012 - 05:30 PM, said:

That's a job for the animators, I think. Adding a physics engine would take a lot longer than 25 minutes!

Hehe ^^
Posted Image Im Übrigen bin ich der Meinung, dass 0A.D. Auslöser braucht. (IMO 0A.D. needs triggers ASAP.)

#32 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 15 June 2012 - 06:40 PM

Could more of the skeletal animations be moved to the GPU? Apparently it has been a concern in the past that they are too CPU-intensive.

#33 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 15 June 2012 - 07:22 PM

View Postzoot, on 15 June 2012 - 06:40 PM, said:

Could more of the skeletal animations be moved to the GPU? Apparently it has been a concern in the past that they are too CPU-intensive.
Check the config for the "GPU skinning" option. Apparently it's disabled because it's slower, though I haven't tested it.
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#34 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 15 June 2012 - 07:30 PM

I see (y)

#35 k776

k776

  • Open Source Development Manager

  • Centurio
    (658 posts)

Posted 15 June 2012 - 08:29 PM

Very nice work.

I notice the shadows flicker as the trees move though. Are shadows done on the CPU or GPU?

If they're on the CPU, it'd be nice to move them to GPU rendered. Should be faster right?

Kieran P [ aka k776 ]
Wildfire Games Open Source Development Manager
Contact me: kieran@wildfiregames.com


#36 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 15 June 2012 - 08:47 PM

View Postk776, on 15 June 2012 - 08:29 PM, said:

Very nice work.

I notice the shadows flicker as the trees move though. Are shadows done on the CPU or GPU?

If they're on the CPU, it'd be nice to move them to GPU rendered. Should be faster right?
I've noticed that flickering on other shadows too. I assume its a bug. See the shadows at 0:12 in this video:


Edited by zoot, 15 June 2012 - 08:49 PM.


#37 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 15 June 2012 - 08:54 PM

View Postk776, on 15 June 2012 - 08:29 PM, said:

Very nice work.

I notice the shadows flicker as the trees move though. Are shadows done on the CPU or GPU?

If they're on the CPU, it'd be nice to move them to GPU rendered. Should be faster right?
Shadows are already done on the GPU. The flickering/pixellation is a limitation of what current shadowmapping technology can do (you'll notice similar artifacts in AAA games as well).

There are some alternative techniques to mitigate the problem, such as cascaded shadowmaps, though in my view their results aren't good enough for their memory/performance cost.

There may also be some techniques to prevent the flickering under some circumstances, such as during rotations. I don't know much about them offhand, but they should be worth looking into.
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#38 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 15 June 2012 - 09:14 PM

What about shadow volumes? My choice source of objective information, Wikipedia, says this technique is slow when the shadows are large, but that doesn't really seem to be the case here.

#39 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 15 June 2012 - 09:49 PM

View Postzoot, on 15 June 2012 - 09:14 PM, said:

What about shadow volumes? My choice source of objective information, Wikipedia, says this technique is slow when the shadows are large, but that doesn't really seem to be the case here.
I think shadow volumes could become the industry's favourite in the upcoming generations of GPUs (geometry shaders! :D), though for the moment shadowmaps are a safer bet for us. Besides, it'll be much easier to get decent results out of what we've already got than if we start from scratch.

It's true that the shadowmap implementation we have needs some debugging, especially the GLSL version (it's on my list, but the list keeps getting longer!). If we can stop the flickering during camera rotations, we're good for 0ad part one. For part two, if there'll be moving lights, seasons and stuff like that, there'll need to be a way to fade smoothly between light states to reduce the flickering... so that can wait.
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#40 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,928 posts)

Posted 15 June 2012 - 11:25 PM

Let's get some of these patches cleaned up, tested, and integrated with the engine (y) I suppose #1493 and #1497 are a good place to start even though they have no visible effects. I think we can get them in A11 if the changes are validated.

View Postmyconid, on 15 June 2012 - 07:22 PM, said:

Check the config for the "GPU skinning" option. Apparently it's disabled because it's slower, though I haven't tested it.

Indeed, there was a discussion about that here.
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users