Planetside Software Forums

General => Terragen Discussion => Topic started by: WAS on May 08, 2018, 03:05:31 PM

Title: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 03:05:31 PM
When I transform my Galaxy Background, the entire structure changes ass if I hit a new seed? Why is this? Are the noises not translating with everything else? Trying to make it so the background can be centered in your scene without building a scene around a fix position, especially since the construction of the scene is straight up out of most cameras viewport in scenes.
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 08, 2018, 04:32:37 PM

By background what you mean (which method did you use to make it) ?
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 04:46:49 PM
Quote from: Kadri on May 08, 2018, 04:32:37 PM

By background what you mean (which method did you use to make it) ?

This is on the background sphere object like the previous night sky or others works. It's not a 3D cloud setup.  So it's prone to distortion when translating, to begin with, but I notice when you correct this with rotation, and position, the actual PF masks, and forms, are different.
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 08, 2018, 05:00:40 PM

As a side note the further from zero you get, the more problematic will be position changes in every 3D program (you know this i think).

If you change the position of the background you have to change the position in the same way of the power fractals etc too.
If you did that and still see that problem it might be related to the above, but can't say anything without seeing the scene.

If you will, get rid of the parts you don't want to share and share what you can here to have a look.



Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 05:15:17 PM
Quote from: Kadri on May 08, 2018, 05:00:40 PM

As a side note the further from zero you get, the more problematic will be position changes in every 3D program (you know this i think).

If you change the position of the background you have to change the position in the same way of the power fractals etc too.
If you did that and still see that problem it might be related to the above, but can't say anything without seeing the scene.

If you will, get rid of the parts you don't want to share and share what you can here to have a look.

I haven't actually tried changing the position of the background, I've only been translating the the background shaders. Like translating textures so-to-speak. The background is in the same place and size (though haven't tried increasing the radius of the Background object to possibly get less distortion  from spherical anomalies).

I'll see if I can mock up an example where it's easier to see the differences in the PF too.
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 08, 2018, 05:29:21 PM
Quote from: WASasquatch on May 08, 2018, 05:15:17 PM

I haven't actually tried changing the position of the background, I've only been translating the the background shaders. Like translating textures so-to-speak. The background is in the same place and size (though haven't tried increasing the radius of the Background object to possibly get less distortion  from spherical anomalies)....

If you translate a fractal on a sphere some parts (depending on axis and where you translate) could be translating as you think like a texture.

But as it is a sphere most other parts will be looking quite different (as Oshyan explained on the other thread about noise animation).
So i can't be sure but from what i understand, what you see is normal in that aspect.

You have to translate the sphere too in the same way.
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 05:47:46 PM
Quote from: Kadri on May 08, 2018, 05:29:21 PM
You have to translate the sphere too in the same way.

That's what I was thinking. Just rotating the sphere. Didn't think of it at first.

Here is a mockup example anyway

Screenshot 5 is translated. There is also a render time difference for some reason, where ironically the translated and rotated render is significantly faster. 
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 06:06:27 PM
Rotating the sphere does nothing.
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 08, 2018, 06:11:25 PM
The background node does have a Centre setting but i am not comfortable with it.
If i would use this kind of setting, i would use a sphere object(imported sphere or plane object)that you can easily transform like the Transform input shader as a background. Sorry can't help much here.
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 06:37:05 PM
Quote from: Kadri on May 08, 2018, 06:11:25 PM
The background node does have a Centre setting but i am not comfortable with it.
If i would use this kind of setting, i would use a sphere object(imported sphere or plane object)that you can easily transform like the Transform input shader as a background. Sorry can't help much here.

That... That's fun. This'll be fun. I look forward to it.   :-X

I was able to put the mockup on a card... with a rotation of 80-85 degres... for some reason?

I've zoomed waaay out in this screen shot (you can see the sun in there we're out so far) and you can see the card object with the stars blends well with the background with the same stars. This can't be said if I put any sort of nebula detail to star background... so at this part not even calling it a work around, just an idea for something basic, like a distant galaxy. I don't know.
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 08, 2018, 08:11:37 PM

I tried to make a basic scene with an imported object sphere as an example for you.
But when i used your nodes (from the background node) i got confused what you want to try.
There is rotation and translation.
When i first tried i got nothing until i saw your masks that were rotated and
translated too of course and nothing was left to see in the camera view (i think).

Your translate values are very high too if you take the background sphere radius to account (-2e+008).
If you translate a sphere by that much it would be already problematic maybe.
So really not sure what you are trying to do and what is not working.
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 08:55:25 PM
It would probably be best to ingore that translations used to attempt to get the  view I want, and disable them and attempt to get a position from base values. I'd assume that's where one would start when debugging. That's what I did to get there. I just happened to upload a save. The construction scene, is where translation is disabled or at 0,0,0 (or a right click position through coordinates, either works), and thus above the camera in a normal scene. So you need to rotate x by -90 to view it.

All I want is the ability to center the galactic core where you want. When you get coordinates from.right click and translate, there is no depth so it translates on the sphere where it is able, on x and z. It's a easy way to Target where you want the center to be and works with transforming on the sphere, but you have to fiddle with rotation to get a band and not a circle. That's probably where the confusion is. This also changes the masks/pfs look.

Come to think of it the change in shapes probably comes from the Y axis which isn't used EXCEPT by noise when on the sphere. I bet a translation with Y on 0 (or whatever value construction is based on) will yield right results.

Update: Tried keeping all Y axis's at 0 in the galaxy shaders, and when I translated it and rotated, I tried to keep the Y at 0, but still all the shapes are different. So when you translated other translations of shaders, they stay relative, but the textures (PF noises) don't? Seems to be the case
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 10:11:20 PM
And hey... it is at least translatable without having to edit every mask.... lol So at least it works.
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 08, 2018, 10:13:34 PM
I am testing some XYZ rotations just now.

But in the meantime i thought, if the only thing is rotating the look you see on the background,
maybe making a sphere render and using that as an image map could be easier probably?

Edit: Free version problem i think. Hmmm
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 08, 2018, 10:40:56 PM

I tried  rotating your nodes on all axes from zero to 90 and
rotated the camera from -90 to zero (to see the moves of the textures on the background) and they didn't changed shape.
They behaved as they should. They only changed where they are.
Rotating fractals on a sphere should only change the place where they are on a sphere, not their shape.
Not sure why you get different shapes with rotating.

I will test another thing too; rotating translated fractals.
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 08, 2018, 11:05:21 PM
Quote from: Kadri on May 08, 2018, 10:40:56 PM

I tried  rotating your nodes on all axes from zero to 90 and
rotated the camera from -90 to zero (to see the moves of the textures on the background) and they didn't changed shape.
They behaved as they should. They only changed where they are.
Rotating fractals on a sphere should only change the place where they are on a sphere, not their shape.
Not sure why you get different shapes with rotating.

I will test another thing too; rotating translated fractals.

I'm not sure what you are doing differently but you can plainly see from the construction render of the galaxy, to the translated version, every single shape is different besides the SSS's

Also, please check your Facebook messenger. :)
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 09, 2018, 01:08:19 AM

Looks like translating is kinda like changing the the centre of the shapes.
So rotating gets different shapes like changing the pivot point of an object and trying to rotate it afterwards.
When you translate the sphere-background too at the same amount rotating the nodes is ok.
Or we got just lucky at the last test :)
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 09, 2018, 03:58:36 AM
Quote from: Kadri on May 09, 2018, 01:08:19 AM

Looks like translating is kinda like changing the the centre of the shapes.
So rotating gets different shapes like changing the pivot point of an object and trying to rotate it afterwards.
When you translate the sphere-background too at the same amount rotating the nodes is ok.
Or we got just lucky at the last test :)

I think I have what you mean by translating the sphere too, though would this translation of the sphere clip the planet? Little out of it after a 6 hour nap.
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 09, 2018, 09:28:21 AM
Quote from: WASasquatch on May 09, 2018, 03:58:36 AM
... though would this translation of the sphere clip the planet?...

Those high translate values could be a problem in that way yes.
You could use a higher radius (not sure how big you can get it without render error or something) for the sphere but then the look of the nodes will change etc.
It is best to plan it in the beginning accordingly.
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 09, 2018, 02:05:59 PM
Quote from: Kadri on May 09, 2018, 09:28:21 AM
It is best to plan it in the beginning accordingly.

That makes it pretty much useless as a shareable clip file. If you get confused in it, let alone needing to rebuild it in a new location on the background. Was a nice idea. Lots of limitations I am encountering with TG at every turn these days. I've pretty much stopped working with terrain as such and start simply modeling it in blender with their (free) erosion plugins and stuff. Terragen seems powerful for terrain generation in the sense it creates a planet. I'm starting to see less of this powerfulness in practicality over a lot of other programs seeing more casual use in cinema. It's realistic in the sense you can go from orbit to a planets surface without destroying your RAM in another program. Or travel along that planet.

I hope one day erosion comes into TG that's not a 3rd party plugin, or from a third party program. Erosion sorta defines "realistic" terrain.
Title: Re: Transform Translation and Distorting PFs
Post by: Matt on May 09, 2018, 04:54:06 PM
The fractals are 3D textures. The background sphere is a 2D surface. The appearance of the background depends where the 2D surface intersects (slices through) the 3D texture. If you translate the 3D texture only, or you translate the 2D surface only, you change the appearance of the slice because it's a different part of the 3D texture.

Now, because this is a sphere that's centred on (0,0,0), you should be able to move the galaxy around simply by rotating the texture around the same point (0,0,0). This will work because all points on the sphere are the same distance from that point, so the slice through the texture is the same.

In Terragen you should be able to do this by adding a Transform Input shader at the very end of the shader network. Even if you have lots of other translations going on, if the rotation is the very last thing at the end of the network then it should work. But you can only use rotation, not translation. If you use translation in the very last transform, then you'll need to move the sphere by the same amount.

Matt
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 09, 2018, 05:13:50 PM
Quote from: Matt on May 09, 2018, 04:54:06 PM
The fractals are 3D textures. The background sphere is a 2D surface. The appearance of the background depends where the 2D surface intersects (slices through) the 3D texture. If you translate the 3D texture only, or you translate the 2D surface only, you change the appearance of the slice because it's a different part of the 3D texture.

Now, because this is a sphere that's centred on (0,0,0), you should be able to move the galaxy around simply by rotating the texture around the same point (0,0,0). This will work because all points on the sphere are the same distance from that point, so the slice through the texture is the same.

In Terragen you should be able to do this by adding a Transform Input shader at the very end of the shader network. Even if you have lots of other translations going on, if the rotation is the very last thing at the end of the network then it should work. But you can only use rotation, not translation. If you use translation in the very last transform, then you'll need to move the sphere by the same amount. Especially when you forget one or two in the network and wonder what's going on haha

Matt

Hmm, this is informative. I do believe I did try simple rotation but it wasn't working, I'll have to attempt again. It's a lot less intuitive as you need to sort of guess the rotation to get your desired spot. But yeah, I rotated, on 90 degrees on every axis and was not able to see the galaxy while looking at a 90 degree face relative to XYZ and 0,0,0 of the base planet. 

Thinking of of SSS's today, I was thinking it would be pretty darn handy to have a anchor for them. Simply assign a master SSS and all other follow it's position. Would save so much time with tons of masks that relate to the same center.
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 09, 2018, 05:25:12 PM
Here is an example. This is the same rotation as the camera, which I am assuming would also be the same rotation on the sphere from position 0,0,0. Or at least relative.

If I use the translation setting you see there, with a rotation on the X axis of 90 degrees, the galaxy will be centered in frame.

Edit: Huh, I rotated 90 degrees on X without translation, and there is the Galaxy, what ya know. Going to compare the look between the construction camera. Would be cool if there was a convert function to rosterize noises or something for instances like this. 
Title: Re: Transform Translation and Distorting PFs
Post by: Matt on May 09, 2018, 08:29:22 PM
Quote from: WASasquatch on May 09, 2018, 05:13:50 PM
Quote from: Matt on May 09, 2018, 04:54:06 PM
If you use translation in the very last transform, then you'll need to move the sphere by the same amount. Especially when you forget one or two in the network and wonder what's going on haha

Matt

I'm pretty sure I never wrote the part in italic... ;) But it's fine to have translations in the network as long as your rotation is at the end.

Matt
Title: Re: Transform Translation and Distorting PFs
Post by: Matt on May 09, 2018, 08:33:37 PM
Quote from: WASasquatch on May 09, 2018, 05:25:12 PM
Edit: Huh, I rotated 90 degrees on X without translation, and there is the Galaxy, what ya know. Going to compare the look between the construction camera. Would be cool if there was a convert function to rosterize noises or something for instances like this.

Yeah. As I said, using rotation in the very last transform only works if you don't have any translation in that last transform. You can have as many translates as you like, but they have to come early in the network. The very last transform must be rotation only. Within a single transform shader, rotation occurs before translation, so if there is any translation in there then the rotation is no longer the last thing to happen.

Matt
Title: Re: Transform Translation and Distorting PFs
Post by: Kadri on May 09, 2018, 08:52:55 PM

Thanks for clarifying Matt.
Title: Re: Transform Translation and Distorting PFs
Post by: WAS on May 10, 2018, 12:07:36 AM
Weird thing though, what about instances like this? This is my Aurora fractals, and the SSS and Fractals won't rotate no matter settings. I can rotate the SSS manually via it's rotation, but I cannot rotate the cloud fractal at all.  Shape mask is just a long SSS, and the Fractal is just stretched on the Z axis for "bands".

Edit: Ehh, forgot to rotate on Z.