Saving X, Y, Z coordinater in image created with Terragen

Started by new_user, June 21, 2011, 05:13:30 AM

Previous topic - Next topic

new_user

Hi to all,

I have a "little" problem!!!
I want to save in JPEG file (as comment) the coordinate X, Y and Z of every point of image that i have created with a DEM

It is possible this or something similar?

DutchDimension

Yes you can. In Photoshop for instance, open your image and go to File-->File Info. In the description tab you can then enter any text based information you'd like and this will get saved inside the jpeg file. You can store a whole range of other information in there also, such as Author, Copyright info etc.

I'm sure there are other applications out there than can accomplish similar feats, but I know them not. Photoshop is King.

Henry Blewer

Can't this also be entered using the properties of the image from Windows? Right click on the image icon and select properties.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

DutchDimension

Quote from: njeneb on June 21, 2011, 08:04:51 AM
Can't this also be entered using the properties of the image from Windows? Right click on the image icon and select properties.

If it's possible then I question the ability of that information being able to carry over to other platforms such as OSX and Linux. It depends where that information is ultimately stored and how. As I'm not a Windows user, I can't say.

Henry Blewer

I doubt it would be carried over. He may be ale to use GIMP for this. There is a comment section if you open the image properties. But then it may only work for GIMP.
Corel Paint X2 has a better image properties area.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

new_user

Wait, wait, wait...

I want to export the information about x,y, and z from terragen to jpeg file

DutchDimension

Yes, you can do that exactly as I described (or record any text based data you want). But to my knowledge it cannot be done directly from Terragen.

new_user

Ok, change the question!!!

Can I extract the X, Y and Z from a 2D image (only X and Y)?

Tangled-Universe

I believe he wants to generate a heightfield in TG2? (greyscale image where dimensions = x,z and greyscale-value = y)

If so, you'd need to connect the last shader of your terrain group (most of the times that's the compute terrain) into the "shader input" port of a "heightfield generate" shader. Inside that shader in the "use shader" tab define coordinates and size of the heightfield and press "generate".
After it's finished click on the node with right mouse button and choose "save (heightfield) as" and save it as .bmp for instance.

Roughly from my head, it should work like this.

Cheers,
Martin

DutchDimension

Quote from: Tangled-Universe on June 21, 2011, 10:17:01 AM
I believe he wants to generate a heightfield in TG2? (greyscale image where dimensions = x,z and greyscale-value = y)

Haha... you're probably right. In that case, never mind my rambling.  ;D

Henry Blewer

http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Matt

new_user,

I could interpret your question in a few different ways, so I am not sure how to answer. Can you tell us what the information will be used for, because that might help us to understand what you're asking for.

Do you want to store the camera position?

Do you want every pixel in the image to record the XYZ value of the pixel? So that the 3D scene can be decoded in another application? That would be possible with a node called "Get Position", but to store the data the data with any accuracy you would need to use the EXR format, not JPG.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

goldfarb

yes, knowing what the information would be used for would help...
I get the impression you're looking for P, as in the depth information...??
--
Michael Goldfarb | Senior Technical Director | SideFX | Toronto | Canada