Global DEM and rotation

Started by edlo, December 27, 2018, 09:49:31 AM

Previous topic - Next topic

edlo

Hi there guys.
We have come across something that seems to be kind of a problem.
We have a global DEM of a planet surface mapped perfectly and looking great; then some simple procedural texturing through surface layers, only 4.
Everything cool so far; now the problem is that we need to slightly animate the rotation of the planet, Translate Textures with Planet and Rotate Textures with planet seem to have no effect on the DEM so al features remain static. However we tried animating the Lat Long on the planet settings and there ! fantastic now it moves; kind of a workaround that doesnt give you full control of the positioning with only two values driving this, but hell it moves. Sadly enough we render the sequence just to find out that the textures dont seem to be informed of the surface movement so now those are static against the Terrain moving.
We need to find a solution to rotating averything and matching both texture and DEM terrain features.
Sorry to say that this is a production enviroment so I cant share the file here for you to take a look, but the setup is as simple as I stated DEM -4 surface procedurals- one planet.
Thanks in advance for your help.
ED.

Matt

You mentioned you tried "Rotate textures with planet" first. It doesn't work for heightfields but it works for most other shaders. Do you still have that enabled and are you rotating the planet?

Some shaders may need to be adjusted to work in texture space rather than world space. If some shaders aren't responding, let us know which ones.
Just because milk is white doesn't mean that clouds are made of milk.

cyphyr

You can rotate the procedural textures with a transform node?
If you have the procedurals plugged into the child of a surface (or distribution) shader you can rotate them "en-masse" with a transform node between the last procedural shader and the surface (or distribution) shader.
You may have to place the planet at 0,0,0 first.
If the planet is tilted (easier to tilt the camera) you will need TWO transform shaders, the first one to tilt, the second to rotate.

Hope this is of some help or at lease illuminates a way forward.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

edlo

Quote from: Matt on December 27, 2018, 10:48:46 AM
You mentioned you tried "Rotate textures with planet" first. It doesn't work for heightfields but it works for most other shaders. Do you still have that enabled and are you rotating the planet?

Some shaders may need to be adjusted to work in texture space rather than world space. If some shaders aren't responding, let us know which ones.

HI Matt. Thanks for the quick reply.
Precisely, "rotate textures with planet" moves the textures the DEM remains in place.
When we Managed to move the DEM through the Lat Long at apex settings on the planet The motion on the textures does not correspond and trying to match it seems impossible to get.
We also tried moving the textures with the Transform input shader and the DEM with the position settings on the Height-field node itself, but again matching both movements so they dont slide against/different to each other its proving to be unattainable.
We would need a solution which rotates both accurately as we thought the Rotate planet with textures was going to deliver.
We finally have tried to save the DEM as a .ter file yet that only crashes TG
BTW we are on the latest TG 4.3.18
Thanks for your help.
ED.

edlo

Quote from: cyphyr on December 27, 2018, 10:54:42 AM
You can rotate the procedural textures with a transform node?
If you have the procedurals plugged into the child of a surface (or distribution) shader you can rotate them "en-masse" with a transform node between the last procedural shader and the surface (or distribution) shader.
You may have to place the planet at 0,0,0 first.
If the planet is tilted (easier to tilt the camera) you will need TWO transform shaders, the first one to tilt, the second to rotate.

Hope this is of some help or at lease illuminates a way forward.

Hi and thanks for the help.we have tried a similar approach but we will give your exact procedure a try and I will get back to you; however as I explained to Matt matching this to the movement of the DEM would be the tricky part.
Cheers.
ED.

cyphyr

Another solution that "may" be easier is if you can load your global dem in to something that will convert it to a bitmap format (16bit tif is good) you could just project is as a spherical texture.
Then you could rotate everything with a transform node or directly with the "Rotate textures with planet".
Try Global mapper if you have access to it. If the DEM is a GeoTiff you are already there and you can just project it as a spherical texture.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

edlo

#6
Quote from: cyphyr on December 27, 2018, 02:54:58 PM
Another solution that "may" be easier is if you can load your global dem in to something that will convert it to a bitmap format (16bit tif is good) you could just project is as a spherical texture.
Then you could rotate everything with a transform node or directly with the "Rotate textures with planet".
Try Global mapper if you have access to it. If the DEM is a GeoTiff you are already there and you can just project it as a spherical texture.

Sounds like a nice approach thanks a bunch; however if I manage to load it, its an 8.98 GB geo Tiff (fingers crossed) Im afraid of loosing the exquisite detail the DEM its giving me at this point.
Keep you posted.
ED.


UPDATE: Sadly the geo tiff does not load as a spherical texture TG crashes on the attempt

cyphyr

Could you try just using half the geoTiff?, the half facing the camera.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Matt

I will attempt to get planet rotation working with DEMs in the next update. How urgently do you need this and which platforms do you need it to work on?

If you need a solution that works in the current version, the level of difficulty depends on the axis of rotation, what your current lat-long values are, and how flexible you are about changing these things. If possible, please share your setup with us privately to the support email.
Just because milk is white doesn't mean that clouds are made of milk.

edlo

Quote from: Matt on December 27, 2018, 07:21:38 PM
I will attempt to get planet rotation working with DEMs in the next update. How urgently do you need this and which platforms do you need it to work on?

If you need a solution that works in the current version, the level of difficulty depends on the axis of rotation, what your current lat-long values are, and how flexible you are about changing these things. If possible, please share your setup with us privately to the support email.

Hi Matt
We are in production of this so the time we need it is ASAP We already have other animated assets placed in this shot and the camera and layout have been approved so changing anything at this point would be quite difficult This is being tried in Maya yet without the beautiful results from TG which I have been championing; but the thing rotates in Maya which is what they want. Will have to clear sharing the file with you with the higher powers would you be ok signing an NDA and using your direct email for this?.
Cheers.
ED.

edlo

Quote from: cyphyr on December 27, 2018, 06:06:59 PM
Could you try just using half the geoTiff?, the half facing the camera.

I managed to reduce the tiff to a size that doesnt crash TG 4.4 GB; yet what I was afraid of the detail its not the same, not close to what we need.
Thanks a bunch.
ED.

cyphyr

I don't mean half the size as such, I mean using only half of the original image so the detail stays the same.
A spherical projection is normally in the ratio of 2:1(2048 x 1024 for example).
I am suggesting using a crop of your original image at 1:1 (1024:1024) and use spherical projection planet cantered at 0,0,0 and the size set to x= 0.5 and y=1.


Basically if the planet is only rotating a small amount there is no point loading data that is not seen by the camera.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Matt

Ed, can you try loading your DEM into a Geog Image Map Shader instead of Geog Heightfield Load? That should respond to the rotation, and I believe it will work with all the same formats. Geog Image Map Shader has displacement capabilities.
Just because milk is white doesn't mean that clouds are made of milk.

edlo

#13
Quote from: Matt on December 31, 2018, 08:45:07 AM
Ed, can you try loading your DEM into a Geog Image Map Shader instead of Geog Heightfield Load? That should respond to the rotation, and I believe it will work with all the same formats. Geog Image Map Shader has displacement capabilities.

Hi Matt.
Thanks I will try this and get back to you.
Cheers.

UPDATE: It loads, and it rotates, however all the detail from the DEM its not there anymore. The displacement only shows a fraction of the detail contained in the 8 GB Geo tiff.