Dynamic Skies (New programming project)

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Dynamic Skies (New programming project)

Postby JulyForToday » Sun Oct 21, 2007 12:41 pm

Okay, I've mentioned this in the improvements thread. I would really like to investigate it, and see if it would be possible to do.

In Uru (and most games), the skies consist of textures applied onto a plane or dome of sorts. Now some are static (the cleft during the day) and many just have simple textures that scroll (Relto, and pretty much everything else).

My idea is something a little different. Most of the user ages I've seen so far the sky dome just has a single texture which doesn't move (yet). They can look really good if you spent time to make them look good, but they have no life in them. Just a painting of a sky.

Now imagine if we could apply a movie (bink, avi whatever) to that same dome? Like the static skies, if you spent the time and effort, you could make it look rather nice and convincing. However, it's has a few problems. Say you wanted dynamic lighting? (day/night stuff). Then you might be stuck. Unless you wanted to render an ungodly amount of animation... X-P

What I really have in mind is that we could apply dynamically generated images to the sky dome.

Take a look at these:

List of cloud research
SkyWorks

Imagine if we could us something like SkyWorks to generate clouds while the game is running. If you try those demos, you may find that it runs sluggishly. So instead of having those 'volumetric' clouds actually being in the age's sky, it would be somehow separate (maybe somewhere else hidden in the age) and not directly visible to the user. The clouds and lights would be set up and rendered every second (or every few seconds), and then output to an image that can be used as a texture for the sky-dome. The texture is updated when a new version is rendered. It would be like having an animation applied to the skydome, but without the pre-rendered space-taking files. It wouldn't actually be in 60-100fps real-time, but it doesn't have to be.

But since this process would be going on while the game is running, the clouds can change as the environment changes. So if your age has day/night cycles, the clouds would be lit according to where the sunlight is coming from. Of course in reality the light in your age's scene would have nothing to do with the appearance of the texture on the skydome. They would have to be synchronized. Much like voices synchronized with live action footage.

Plus unlike pre-rendered images which you end up stuck with, the texture changes on-the-fly. So they'd never have to look the same or like they are looping. And you can have different types (big billowing clouds, or teledahn-like overcast grayness).

Now of course, this assumes a few things:

1.) Being able to integrate something like skyworks into Uru so that it works while Uru is working -- this is the most important (duh)
2.) We can figure out how to set-up the sky's scene properly (synchronize the lighting, where in the scene it will go)
4.) Rendering a panoramic image for the skydome, and output it to .png or something
2.) Being able to have an object use a texture not in a prp file (kinda like the link-panel images)
3.) Being able to update that texture

If you want to get really advanced (maybe Im getting ahead of myself!) it would be cool to output the sky data to alpha-channeled .png's that could be partially transparent so that elements like the sun/stars/moons can be normal objects in the age's scene, rather than being part of the texture. (makes it easier if they are objects so then you can properly set them up astronomically)
User avatar
JulyForToday
 
Posts: 118
Joined: Sat Sep 29, 2007 5:34 am

Re: Dynamic Skies (New programming project)

Postby Kierra » Mon Oct 29, 2007 3:42 am

while working towards this would be great, I kind of think we need to learn how to crawl before we learn how to run.

Like you said, the most advanced age skies we've seen (so far) are stationary sky domes.

I personally would like see work on scrolling cloud animations, etc, because as far as I know, those tools don't exist yet.

~Kia
User avatar
Kierra
 
Posts: 371
Joined: Sat Sep 29, 2007 12:05 am
Location: 311 miles West of Cyan. roughly.

Re: Dynamic Skies (New programming project)

Postby Trylon » Mon Oct 29, 2007 4:54 am

While it would be a cool idea, in my experiences with plasma, I think we can safely forget about inclusion of other sub-applications/plugins/etc to do something special.

As far as I know, plasma has no support for external application links for special effects.
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Dynamic Skies (New programming project)

Postby Marcello » Sun Nov 04, 2007 9:04 am

As far as I can judge Cyan relies on only a few basic techniques to create many effects. For instance the moving texture thing is used for:

- scrolling skies
- moving fog or sand (Pariferen)
- water (often in multiple layers that have different speeds and sometimes a different direction)
- falling water
- button effects (instead of changing the actual texture to make a button or image light up, why not move a masked texture? much more efficient ;) ).
- etc.

So in my opinion if we eventually have animated textures, then we can do many, many new things.

Same goes for texture blending. Being able to do that makes it possible to do many more things. For instance. The water flowing from a waterfall or the water effects around rocks, etc. need some sort of blend to disappear after a while. The combination of only two techniques, makes new illusions possible.
User avatar
Marcello
 
Posts: 374
Joined: Sun Nov 04, 2007 8:59 am
Location: Haarlem, The Netherlands

Re: Dynamic Skies (New programming project)

Postby JulyForToday » Sat Nov 17, 2007 2:33 pm

While it would be a cool idea, in my experiences with plasma, I think we can safely forget about inclusion of other sub-applications/plugins/etc to do something special.

As far as I know, plasma has no support for external application links for special effects.



While that may very well be the case at the moment, it does not mean that it has to stay that way.

And another thing to remember is that if you think of a cool idea, someone else has probably already thought of it... behold, Cloudwright!!

Cool, huh?... Now if only we could get around what you were talking about Trylon, lol...
User avatar
JulyForToday
 
Posts: 118
Joined: Sat Sep 29, 2007 5:34 am

Re: Dynamic Skies (New programming project)

Postby SeryousYew » Sat Feb 27, 2010 4:11 pm

I was working on a dynamic environment just befor reading this thread and I would like to share it.
Is a rotating skydome with "day" & "night" textures faded by a scrolling stancil map and with a "sun" and "moon" orbiting around and lighting too. Actually I cant make the animation working in URU because it crash almost every time I'm trying with anims... Would be great if someone can help with this.

environment_01.zip
I hope this will be useful.
SeryousYew
 
Posts: 19
Joined: Mon Aug 04, 2008 1:58 am

Re: Dynamic Skies (New programming project)

Postby D'Lanor » Sat Feb 27, 2010 5:08 pm

You are probably crashing because your Sky_dome object does not have the Actor button pressed (I'm not sure if layer animations really need that but I always set it anyway).
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Dynamic Skies (New programming project)

Postby Trylon » Sun Feb 28, 2010 1:05 am

Necromancing! ;)
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Dynamic Skies (New programming project)

Postby SeryousYew » Sun Feb 28, 2010 9:44 am

Thanks! You're right D'Lanor, I've missed it and also Sun_sprite and Moon_sprite need Actor button pressed but the the stencil layer is not moving/working; I'll try to fix it and make it work with global animations when I have some spare time.
Do you have some suggestions or opinions?
SeryousYew
 
Posts: 19
Joined: Mon Aug 04, 2008 1:58 am

Re: Dynamic Skies (New programming project)

Postby GPNMilano » Sun Feb 28, 2010 4:17 pm

Day night cycles with layer animations are not AgeGlobal animations. If you're trying to create a day night cycle by animating a texture it cannot be done with the current pyprp. There are two types of SDL animations. plAgeGlobalAnim (These are the global animations that are currently supported by PyPRP, they animate only an object's location in an age, and a light's RGB values. Animating textures for age/night cycles require a class called plLayerSDLAnimations. This class isn't currently supported by pyprp.

plLayerSDLAnimations were in development before the newest release, and they are finished in my contrib branch of the svn, but since no one seems to be working on a new release of pyprp, it's sitting in development hell. See this thread for more info Merging my Branch with the Trunk
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron