Planetside Software Forums

General => Terragen Discussion => Topic started by: Nathan.c on June 29, 2020, 11:39:16 AM

Title: Rotated Heightmap / Image map ?
Post by: Nathan.c on June 29, 2020, 11:39:16 AM
Ok this could be a stupid question, but where do I add the rotation coordinates so my image map lines up with my rotated heightmap ?

Always have trouble with attachments.
https://ibb.co/Mgr3q73
Title: Re: Rotated Heightmap / Image map ?
Post by: uuderzo on June 29, 2020, 12:28:29 PM
The only way i found is to feed a projection camera into che image node. Set the camera as orthographic and point it down (-90 X rotation) then you can rotate on the Y axis the camera and set the projection width and height.
Title: Re: Rotated Heightmap / Image map ?
Post by: Hetzen on June 29, 2020, 12:44:33 PM
Another way is to feed the image map into a Transform Input shader and do the rotation and offset within that node. You can do a similar thing with a Simple Shape shader set to the same size as your image to use for blending.
Title: Re: Rotated Heightmap / Image map ?
Post by: uuderzo on June 29, 2020, 01:01:15 PM
Waaaay easier with the transform node! I tought that it would transform everything entering in the node, also the terrain.
But looks like it acts only on the node directly inputed.
Cool.

By the way, sometimes it's difficult to understand what is the scope of a node, or more likely i didn't understand something :D
Title: Re: Rotated Heightmap / Image map ?
Post by: Hetzen on June 29, 2020, 01:48:41 PM
Yes it can be confusing. It maybe should have been called 'Transform Texture Input', but its a legacy thing now. It used to be called Transform Merge.

Another one, Warp Input, warps the texture input.
Title: Re: Rotated Heightmap / Image map ?
Post by: WAS on June 29, 2020, 03:37:17 PM
Quote from: Hetzen on June 29, 2020, 01:48:41 PMbut its a legacy thing now. It used to be called Transform Merge.

That's a different shader. Transform input is pretty fitting, and transform can be scale, rotation, or translation. As for texture, yes, somewhat, but it can transform displacement to a degree. Though Matt did talk about finally adding proper displacement transforming but haven't seen that.
Title: Re: Rotated Heightmap / Image map ?
Post by: Nathan.c on June 30, 2020, 07:15:40 AM
Quote from: Hetzen on June 29, 2020, 12:44:33 PMAnother way is to feed the image map into a Transform Input shader and do the rotation and offset within that node. You can do a similar thing with a Simple Shape shader set to the same size as your image to use for blending.

Perfect worked a treat, thanks  :)
Title: Re: Rotated Heightmap / Image map ?
Post by: Nathan.c on June 30, 2020, 09:07:29 AM
Ran into another problem now. Rotating on Terragens default 0,0,0 position works fine, as soon as I move the heightfield it goes to titsup. As far as I can tell everything is right (obviously not) see screenshot https://ibb.co/gWNZWDV

Also, If I copy/paste position from the heightfield into the translate of the transform shader it's even further off, I cant get it any closer than this.
Title: Re: Rotated Heightmap / Image map ?
Post by: Hetzen on June 30, 2020, 11:29:40 AM
Keep the image map at 0,0,0 and put your heightfield coordinates into the Transform Input. That should work.
Title: Re: Rotated Heightmap / Image map ?
Post by: Nathan.c on July 02, 2020, 09:36:41 AM
Quote from: Hetzen on June 30, 2020, 11:29:40 AMKeep the image map at 0,0,0 and put your heightfield coordinates into the Transform Input. That should work.
Sorry for late reply, wifi problem. That was the problem, thanks Hetzen and everyone else.
Title: Re: Rotated Heightmap / Image map ?
Post by: amandas on July 06, 2020, 06:40:56 AM
I use Transform Input Shader, both for the heightmap and diffuse map, works very well!