Planetside Software Forums

General => Terragen Discussion => Topic started by: tuggles on August 04, 2007, 05:51:44 PM

Title: Planet Masking Need Help
Post by: tuggles on August 04, 2007, 05:51:44 PM
Ok I am trying to make a full planet render using a black and white mask to define the continents. Now the way I would assume it would work is to put the image in an image shader node and then place the image shader into the blend input of the fractal node. Well, the problem I am having is that the image pinches severely it is completely unrecognizable on the planet. I try just using it as a shader to see whats going on it completely distorts the image. Anyone have any ideas on what I am doing wrong? Here is the image map I am using to attempt to define the continents.

(http://img.photobucket.com/albums/v175/tuggles/terraexp.jpg)
Title: Re: Planet Masking Need Help
Post by: Oshyan on August 04, 2007, 05:57:18 PM
Due to the distortion of wrapping a square image to a spherical planet you're going to get that "pinching". What you want to do is get your source image in a "spherical" projection. I believe Photoshop can take an existing image and reproject it, or alternatively a GIS program probably can.

Once you have your source image in the proper projection use an Image Map Shader with Spherical projection and make the position of the Image Map Shader the same as the center of your planet.

- Oshyan
Title: Re: Planet Masking Need Help
Post by: tuggles on August 06, 2007, 05:56:21 PM
Ok, let me clarify: The entire image goes straight to one point so you cant make out any continent shape at all.

I feel Im doing something wrong so I will upload the TGD file to see if anyone can tell what is wrong with the file, the next post will have the image file Im using to try and mask the planet.

Any help is appreciated!

edit: Ok I feel like an idiot...its just the preview window that looks like that. I loaded the image map as a color shader and everything looks fine! Doh! Well thanks for the tip Oshyan. It is a spherical projection btw you can see the distortion on the top and bottom. The top parts were just a little too far north and south for my taste. A little work and they look good now.

edit again: Now I feel like an even better idiot. I didnt bother to check out the north poll of this planet. So here is an image of what I am talking about when I say pinching. See the problem is in other modeling programs the texture matches up fine with no pinching at the polls. I would say that it goes way beyond what normal pinching should be considering there should be nothing at the polls.

Also .tgd and the image map.
Title: Re: Planet Masking Need Help
Post by: bigben on August 06, 2007, 06:56:11 PM
Haven't looked at the TGD yet (kinda busy at the moment) but my guess is that you need to set the position of the image shader to the same as the centre of your planet.
Title: Re: Planet Masking Need Help
Post by: tuggles on August 06, 2007, 07:08:22 PM
Yea thats it...I had it set then forgot to fix it when I changed the image map shader. Doh, thanks...

While I am here...is there a way to limit a surface layer to the image map locations? So that I can color the oceans and land masses seperatly?
Title: Re: Planet Masking Need Help
Post by: Will on August 06, 2007, 08:57:46 PM
I did a similar thing a long way back but I used displacement shaders. I'll attach a clip to at least give you an idea of what I did. I had one alpha for displacement one map for land color and one for water color and they worked pretty well. Yea my coloring job wast done all that great but it was a quicky done for my friends over at gaming Steve and the spore community (hydro get the credit for the maps). Anyway hope this helps
Title: Re: Planet Masking Need Help
Post by: bigben on August 06, 2007, 09:35:16 PM
Set surface shader coverage to 0.5, fractal breakup to 1. Connect image map to fractal breakup input
Title: Re: Planet Masking Need Help
Post by: Tangled-Universe on August 07, 2007, 06:48:54 PM
Hi Tuggles,

This should work I think.
As you can see I've created 2 surface layers.
The first one is "water shader parent" and the second is "land mass shader parent".
Just hook up surface layer childs to those parents to surface them further.
As you can see I've been using the mask you've posted first.
Using the last one is somewhat problematic because the amount of dark grey is too much so you'll hardly see any masking effect.
Hope this will be of any help.

Martin
Title: Re: Planet Masking Need Help
Post by: tuggles on August 08, 2007, 11:24:41 PM
Well, the work in progress continues. I appreciate everyones advice and have finally started to understand this thing. Here is a quick image of the planet I have been trying to get right.

(http://img.photobucket.com/albums/v175/tuggles/world2.jpg)

now it seems to me the displacement shader doesn't actually displace much. Im trying to get my mountain ranges in place and uses power fractal to give me the smaller details but when I apply my greyscale image it just lifts up all the land and thats it. Also, does anyone have an idea why its got that dark artifact on the lower half?
Title: Re: Planet Masking Need Help
Post by: bigben on August 08, 2007, 11:52:14 PM
The dark band is a known glitch with GI. http://forums.planetside.co.uk/index.php?topic=1778.0 (http://forums.planetside.co.uk/index.php?topic=1778.0)

To cast shadows like that from this distance, that's some serious displacement ;)

Are you using your greyscale image as a mask or an elevation map?
Title: Re: Planet Masking Need Help
Post by: tuggles on August 09, 2007, 11:11:10 AM
I really dont know. I put the displacement shader in then use my greyscale image map as the function. Is there another way I should be doing this? And yes, those are completly unrealistic mountains lol the settings are something like 100k max scale 500k lead in lol. I just wanted to see the mountains in the right place. Anyway, once again. Thanks for any help you can provide.
Title: Re: Planet Masking Need Help
Post by: bigben on August 10, 2007, 01:19:45 AM
Sounds  OK.  You could simplify it without the additional displacement shader by setting the displacement in the land mass shader.  If you can't see it, try the same numbers as your visible mountain range and work down from there.