Planetside Software Forums

General => Terragen Discussion => Topic started by: Feenixnz on September 13, 2009, 04:43:47 PM

Title: Rotation of spherically projected textures.
Post by: Feenixnz on September 13, 2009, 04:43:47 PM
Hey guys,

I have a cloud map and I want to rotate it around the planet so that a feature formation of clouds can sit over a land and not water. As mentioned in the subject, the projection type within the image map shader is set to spherical. Does any one know how I would go about rotating?

Cheers
  :D
Title: Re: Rotation of spherically projected textures.
Post by: cyphyr on September 13, 2009, 06:08:01 PM
Pretty sure it cant be done :(
There may be a "function" based solution but I think its ben looked for before to no avail.
Similarly planets cant be rotated.

Two possible solutions:
Firstly you could create an image sequance of your cloud map and load that in frame by frame. There's a post somewhere on the forum about how ...
Secondly you could create a UV mapped sphere in your modelling app and rotate that.. You may run into issues with transparency however ...

Sorry couldn't be much help there :)

Richard
Title: Re: Rotation of spherically projected textures.
Post by: Henry Blewer on September 13, 2009, 06:31:03 PM
I think Cypher is right. The image sequence is the only way.
To get the image sequence, use your render from Terragen 2 for a reference background. Create a sphere in another 3D app. Sphere map your cloud image onto the sphere, then rotate the sphere the number of frames and amount of rotation you need. You'll need the alpha data also, I use png format for this. I would make the output image sequence at least  twice the resolution of the Terragen 2 render. Now you can map each image of the sequence onto the cloud map.
The background image is used to line up the Terragen 2 image planet with the 3d app sphere. It should help with the image mapping in Terragen 2.
I hope this helps.
Title: Re: Rotation of spherically projected textures.
Post by: Oshyan on September 13, 2009, 06:36:28 PM
At present rotation of spherically projected textures and planet objects is not possible, as others have said. However it sounds like you don't actually need to animate the rotation, rather you just want to change the position for alignment reasons. You can potentially accomplish this in a photo editor, though it would need to be one with good support for spherically projected textures. Alternatively you could do it in another modeling application with good texturing and UV mapping support and then export a modified spherically projected texture map. The UV mapped sphere is another approach, however spheres can't have atmospheres applied to them, nor many of the other planetary features, so if you're really trying to create a planet, that won't work well.

Clearly planet and texture rotation is a feature that needs to be added in the future, and it will be.

- Oshyan
Title: Re: Rotation of spherically projected textures.
Post by: Volker Harun on September 13, 2009, 06:59:38 PM
How far did your proceed on the terrain ... would it be a solution to build a new landmass under your clouds?
Title: Re: Rotation of spherically projected textures.
Post by: Feenixnz on September 13, 2009, 07:07:57 PM
hey all,

thanks for the replies.  The Terrain is also spherically mapped via image shader. So its either rotating that or the cloud map =) Oshyan is right. I do only want to change teh position for alignment.

Anyone know how long before this feature comes along?? =)
Title: Re: Rotation of spherically projected textures.
Post by: cyphyr on September 13, 2009, 07:50:32 PM
I'd load the cloud image into AfterFX (or a similar app) twice, and offset the second one by its full width. That way you'd have a tiled image twice the width of your initial image. Then I'd animate the two images moving across the frame window. Its unlikely you'll need a full 360 deg rotation so work out how much you'll need to move the clouds and move the two images accordingly. Now you can render out an image sequence that can be loaded into TG.

Another thought is that if you only need a small amount of movement you "could" get away with a using a transform shader. If your close enough you may not see/notice and distortion. A transform of  maybe 10 km viewed from 200km up might not look wrong but still give the effect of moving clouds.

The other solution is to go for a procedural approach of course. it all depends on your project needs.

:)
Richard
Title: Re: Rotation of spherically projected textures.
Post by: treddie on July 25, 2011, 01:21:54 AM
It is 2011, and I was curious if there has there been any progress on being able to easily rotate a planet texture, or to at least be able to rotate the planet and textures locked together?  This is such an important feature, I can't believe it is not "a done deal". 

Impatient, nagging me. ;D
Title: Re: Rotation of spherically projected textures.
Post by: Dune on July 25, 2011, 03:22:51 AM
It is now possible, but it might still be alpha... not sure.
Title: Re: Rotation of spherically projected textures.
Post by: j meyer on July 25, 2011, 10:25:59 AM
A quote from the 2.3 change log
"Planets have a rotation parameter which rotates the geometry (but does not automatically rotate the textures). This is necessary to avoid aliasing in animations where the planet's surface shaders are rotating."

Title: Re: Rotation of spherically projected textures.
Post by: dandelO on July 25, 2011, 11:01:08 AM
You can now use the transform shader to entirely rotate a cloud layer in any direction, not just Y.
Title: Re: Rotation of spherically projected textures.
Post by: treddie on July 25, 2011, 03:49:57 PM
Ahhh, excellent.  Thanks for your responses to my question despite my somewhat rude tone!   :)

I'll give transform a try.