Author Topic: Convert BMP to a topographic Image  (Read 4355 times)

Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Convert BMP to a topographic Image
« on: July 17, 2010, 12:04:31 PM »
Hello Iīm new at Terragen and I want to create a 3D visualisation from a spot image (see attached file). Red spots should be elevated, green ones the lowest. Yellow as well as black even level.
My first problem is how to get Terragen to reduce the area just on my image and to get all at one level so itīs not curved like a planet. Then how to asign the different colors to hights. I tried to find my answers in the online documentations but wasnīt really successful. I would be very thanksful for any help.


Offline Hetzen

  • Member
  • *
  • Posts: 1653
Re: Convert BMP to a topographic Image
« Reply #1 on: July 17, 2010, 01:31:17 PM »
What's it supposed to be? ;D

If you use it the way I think you're describing, then you'll get a series of positive and negative spikes. What sort of area is this supposed to cover?

To give you a start, use an image map shader, then connect a "Green to scaler" to it, then use that to drive a "displacement shader".

Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Re: Convert BMP to a topographic Image
« Reply #2 on: July 17, 2010, 01:50:09 PM »
Itīs an proteomic map. Red Spots show upregulated Proteins, Green ones downregulated. Yellow spots didnīt change.
Since itīs difficult to see different levels of colors i wanted to show them ass hills or slopes.  ;)

When you talk of image map shader do you mean in terragen or in another grafikprogramm like photoshop?

Offline Hetzen

  • Member
  • *
  • Posts: 1653
Re: Convert BMP to a topographic Image
« Reply #3 on: July 17, 2010, 03:06:21 PM »
Thanks for the explanation. In that case you might want to use a "Plain Object" instead of a planet.

The image map shader is in the colour shader set of nodes within the Create Shader options when you right click on the node layout pannel, and the Red/Green/Blue to Scalers are in the Convert set within the Create Function.

Position the image map shader with the same x,y,z and x,y sizes as your plain object, and use the 'project x,z' option.

The more resolution you have in your bitmap, the better the displacements will look, ie more shades of R/G/B to deifine your slopes.

Good luck and have fun.

Offline TheBlackHole

  • Member
  • *
  • Posts: 1068
  • I never finish anything I st
    • Maps and Such
Re: Convert BMP to a topographic Image
« Reply #4 on: July 17, 2010, 04:14:15 PM »
Try this edited version of your image. I converted it to a normal height map in Photoshop. Red areas are high, green areas are low, and black/yellow areas are level. Most of the image is higher than level, though, as there was a lot of red scattered in the black areas.
They just issued a tornado warning and said to stay away from windows. Does that mean I can't use my computer?

Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Re: Convert BMP to a topographic Image
« Reply #5 on: July 17, 2010, 04:48:33 PM »
Oh wow thanks a lot for the converted map. Right know i was trying to go the way Hetzen told me. I doīnt have troubles in finding the shader and scalers, but when I use Plane as Object I donīt get to see anything in the Renderwindow anymore. I must connect the nodes wrong. Is there also a way to lateron appling the BMP-Picture as skin on the model?

Offline Hetzen

  • Member
  • *
  • Posts: 1653
Re: Convert BMP to a topographic Image
« Reply #6 on: July 17, 2010, 07:04:15 PM »
Sorry, should have mentioned that you need to right click on the plane object and work in the 'internal network' area. Just as an aside. all nodes have the ability to place things inside them, which can be really usefull in complex node layouts.

Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Re: Convert BMP to a topographic Image
« Reply #7 on: July 17, 2010, 07:22:54 PM »
Oh Ok. First i deleted all nodes then  i added the different nodes to the areas. The Image map shader to the terrain part. Then I added the green scaler to it and connected the output from the Image map shader to the input of the Green scaler and the output of the scaler to the displacements shader. Do i also need to add a red scaler to it? I will try what you said? Thanks for your help till now.   

Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Re: Convert BMP to a topographic Image
« Reply #8 on: July 17, 2010, 07:59:34 PM »
Ok Here is a Picture of as far as I got till now. I do get a picture out of the Red to scalar function but iīm not able to see it on the Render window. I didnīt manage to get more scalars to the image map shader connected. The green scalar didnīt return any results so i added the red one. See View1.

Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Re: Convert BMP to a topographic Image
« Reply #9 on: July 17, 2010, 08:16:12 PM »
Here is the Picture about the internal network i did for the plane surface. Iīm realy lost right now in that software, to much triggers to pull and switches to turn. Well I will try on by searching were i have to do what for any further hint i would be realy greatful.

Offline Hetzen

  • Member
  • *
  • Posts: 1653
Re: Convert BMP to a topographic Image
« Reply #10 on: July 18, 2010, 12:12:37 AM »
You're not far wrong. You need to drive the displacement shader through it's function input. The displacement shader will displace what ever the input is via the function input...
« Last Edit: July 18, 2010, 12:14:12 AM by Hetzen »

Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Re: Convert BMP to a topographic Image
« Reply #11 on: July 18, 2010, 08:31:05 AM »
That was it! Now I got to see bumbs for the Red part (view3), still the renderd plane looks a bitt odd in the displacement shader. When i lock the camera to that view i still only get a black picture. I suppose i have to add something to my surface, a colour or something?
Also how can i get the Displacement shader to add a green to scaler? Is that possible? Specialy because my image map shader just shows me the picture in red. I donīt undertand why i only get the picture loaded in red.
Ah i also have another Question is there also a possibility to smoth my bumbs? And to get the displacement shader to a point that he only interprets spots of a certain size. So i can get rid of all the backnoise sound in my picture.
I went trough the whole online documentation and have now some very nice looking mountains but for my problems i didnīt find much answers.
Thanks to all for your help and patience.
« Last Edit: July 18, 2010, 10:47:09 AM by 3DGel-Vis »

Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Re: Convert BMP to a topographic Image
« Reply #12 on: July 18, 2010, 10:44:07 AM »
Ok I did try something new, by adding in the Image Map shader the original Picture. Now i donīt have the only red picture anymore but the yellow , green and red one. I must have lost informatiobn by converting the image. Then i created Transparancy in the Image map shader so all black is gone. In the "colour-tab" by switching of the button "Data is linear" to "Convert to linear" i could reduce most of the background noise. Especially with a high conversion gamma value.
Then I added a green to scaler with a negate scaler and a red to scaler. Both I attached to a add to scalar function which i attached to the displacement shader. In the displacement shader hills could be then createt with the displacement multiplier. As displacement direction i left along normal. See Picture below. That gets in the direction i wanted!!!!  ;D now i have still the troubles getting my view attached to the plane that i actually can see may results in the renderer. I Tried to connect it to the Background shader and that to the plane or directly to the Plane the results stay the same. Nothing to see in the rendering window and still i didnīt find a posibility to put colour to my surface


Offline 3DGel-Vis

  • Member
  • *
  • Posts: 9
Re: Convert BMP to a topographic Image
« Reply #13 on: July 18, 2010, 11:31:46 AM »
I got a sort off aproache with the coloring. I did add to the displacement shader a fractal breackup and a surface layer. And then applyed red as high and green as low colour in the fractal breakup. After that i tried to tweak it by pushing around different controls. But the result is not realy satisying.  :-\ I would prefer to attach the original picture to my layer and to stretch it over my surface. If that is possible. Yet still after conecting my surface layer to my plane object i still donīt get any results in my rendering view  ??? I donīt get it.

I attached my Terragen file. Maybe someone has an idea.

Thanks.

 

anything