Planet surface Shader and hightmap question.

Started by vissroid, December 29, 2006, 07:22:46 PM

Previous topic - Next topic

vissroid

Okay I've read around and saw what was said about PSS(heh) and from what I can see its still being worked on(since it has a few bugs)

but my question is about making the planet suface look real(not all flat completely) would like to see the peaks(mountains0 have shadows behind them.

It seem PSS only works in the shader section(of course); but is there a way to get it to work for the hight field as well(so the bumps are in the right place)? lol


now for the hightmap question.

in my free tiem in art I make terraspace images. like so: http://www.deviantart.com/deviation/23220991/?qo=18&q=by%3Avissroid&qh=sort%3Atime+-in%3Ascraps

this is TG1 on teh bottom.
and then I do planets withen Photoshop and 3ds max: http://www.deviantart.com/deviation/34317202/?qo=17&q=by%3Avissroid+in%3Ascraps&qh=sort%3Atime

So what I do with my planet is I make a bumpmap thats seemless(so it can be wrapped around a sphere perfectly) Im wondering if I can get the same effect. so i can mape this hightmap into the TG2 and create a real 3d land scape with it(and not with bumpmaps).

So I guess Im wondering if you can wrap a hightmap all the way around the planet(so doin this you can paint the intire hight map and make you're own planet in the style you want)

I hope theres a way form both of these questions to be answered. and thanx(and I hope I didnt waste anyone's tiem by blabbering) lol

NOTE; heres my first try at a planet in TG2
the land just looks too flat really. but still looking pretty good so far: http://www.deviantart.com/deviation/45585818/

Oshyan

The Planet Surface Shader does actually create dimension (raised terrain) already. You may need to adjust the Amplitude in the shader to see it, but if you go find the snowy areas you should find that they're higher and generally more mountainous than other areas. The snow is based on height (you can set this in the Planet Surface Shader itself). So it must be producing height for this to work.

Keep in mind that you don't need to do all terrain adjustments in the Terrain group, you can actually do almost anything to the terrain in the Shaders group as well. It's just better to do it in Terrain if possible because the Compute Terrain node at the end of the Terrain group network gives you a computed normal, necessary for proper texture placement by slope or height. The Planet Surface Shader seems to provide most of what's necessary all by itself, so if you're just working with that and adjusting its colors and settings, you don't need to worry about the rest. You should even be able to add surface layers on top of it to provide more detail and variation.

If the Planet Surface Shader doesn't give you as much detail or control as you want, you can always build up your planet shape and texturing manually using displacement. Large-scale displacements could be continents, you can use medium-scale with a large-scale blend shader for isolated mountain chains, etc. It takes a bit of experimentation but the potential is definitely there.

As for using a bump map you've already made as a displacement map for a planet, yes this is currently possible. You would add an Image Map shader in the Shaders Layout, load your image, then set the projection to Spherical. Turn off Apply Colour in the Colour tab (unless you want it to also show up as a black and white texture on your planet) then go to the Displacement tab, turn on Apply Displacement and adjust Displacement Amplitude to taste. Try a value of about 10,000 for starters. This is measured in meters and is the height of the maximum displacement that will be applied. That should give you a good start.

- Oshyan

Ricowan

#2
Something else to keep in mind: if you could shrink the Earth down to the same size as a bowling ball, the Earth would be a lot smoother than the bowling ball!  Think about the largest variation between sea level and the highest mountain peak, versus the size of the planet, and you'll realize that at the distances you're rendering your planet from, it should look smooth.  :)

rcallicotte

That's a good point.  I've been wondering about this and this makes sense.
So this is Disney World.  Can we live here?

rcallicotte

Oshyan, this may seem off-topic, but I'm wondering where the 'Amplitude' setting would be in a Surface Layer.
So this is Disney World.  Can we live here?

vissroid

#5
Quote from: JavaJones on December 30, 2006, 04:41:43 AM
The Planet Surface Shader does actually create dimension (raised terrain) already. You may need to adjust the Amplitude in the shader to see it, but if you go find the snowy areas you should find that they're higher and generally more mountainous than other areas. The snow is based on height (you can set this in the Planet Surface Shader itself). So it must be producing height for this to work.

Keep in mind that you don't need to do all terrain adjustments in the Terrain group, you can actually do almost anything to the terrain in the Shaders group as well. It's just better to do it in Terrain if possible because the Compute Terrain node at the end of the Terrain group network gives you a computed normal, necessary for proper texture placement by slope or height. The Planet Surface Shader seems to provide most of what's necessary all by itself, so if you're just working with that and adjusting its colors and settings, you don't need to worry about the rest. You should even be able to add surface layers on top of it to provide more detail and variation.

If the Planet Surface Shader doesn't give you as much detail or control as you want, you can always build up your planet shape and texturing manually using displacement. Large-scale displacements could be continents, you can use medium-scale with a large-scale blend shader for isolated mountain chains, etc. It takes a bit of experimentation but the potential is definitely there.

As for using a bump map you've already made as a displacement map for a planet, yes this is currently possible. You would add an Image Map shader in the Shaders Layout, load your image, then set the projection to Spherical. Turn off Apply Colour in the Colour tab (unless you want it to also show up as a black and white texture on your planet) then go to the Displacement tab, turn on Apply Displacement and adjust Displacement Amplitude to taste. Try a value of about 10,000 for starters. This is measured in meters and is the height of the maximum displacement that will be applied. That should give you a good start.

- Oshyan

Okay i tried your idea and it seemed it was goin to work so i was happy. then i noticed something strange. when I do all that you said. i seem to just get a weird funnel/spiked look in one spot at the top of the planet. my layout for my bump maps are like what you see of earth normally: http://textures.forrest.cz/cgi-bin/textureslib.cgi?page=maps&s=3&p=0&r=3

all those textures are the same style i do in painting my planets. and I I'm trying to find out how to get the image to overlay on the planet correctly. I've tried a few settings and will continue but if anyone figures this out. it'll be awesome to hear from ya(cuz if you can get the bump map here working then it'd be the same for mine).

also still trying to figure where you can actually bring up the hight for the planet shader tho.


thank you all for you time and keep up the great work, Im def' buying the program soon. :)

EDIT: nevermind about the planet surface shader. I've got it all figured out now.
.::insert evil laughter here::.

Oshyan

The "Amplitude" setting doesn't exist in the Surface Layer, but if you are feeding a shader into its Displacement input you can use the Displacement Multiplier setting on the Displacement tab in a similar way.

- Oshyan

vissroid

okay Im still having a prob' with this.

i cant get the image to work correctly.

i do what you say(setting it to spherical) but this doesn't help. it seems to just mash it all together at the top of the planet and stretch out areas down.

you'd see what i mean if you grab one of the those earth images above in my last post and try using it. it doesn't lay out right. so I wondered about the UV part. but that doesn't seem to work either. unless thats just something that needs to be talked about first with a tut or something...

rcallicotte

Quote from: JavaJones on December 31, 2006, 03:45:49 AM
The "Amplitude" setting doesn't exist in the Surface Layer, but if you are feeding a shader into its Displacement input you can use the Displacement Multiplier setting on the Displacement tab in a similar way.

- Oshyan

Thank you.
So this is Disney World.  Can we live here?

Oshyan

Spherical mapping should work if the image is in the right (spherical) projection, intended for wrapping onto a sphere. There may be some bug rearing its ugly head though. Can you post an image of the result you're getting? Is it the same with all image files?

UV mapping could help but would require you to setup the UV map in another application as TG2 can't do this on its own. I believe there are fairly inexpensive applications out there that can do this.

- Oshyan

vissroid

heh. well heres the bumpmap that I use.

you can give it a try, but it looks like it stretches it out right at the middle(which you can see in my next reply since filesize is too big for one reply).

vissroid

and heres the image showing the "bug"

the upper is the same image in 3ds max strapped to a sphere(the way its meant to go).

the lower is in TG2. it looks like its trying to do the "spin" around the planet right. but doesn't seem like its placed it on its side right. its like it calls it good and just "twists" it around the planet. you'll see when you toss it in TG2 with the shader. lol

swift256

Hey vissroid,

Give these settings a shot for the image map:

Projection Type: Spherical

Position lower left - Checked

Size - 1 in the first box,  0.5 in the second.

vissroid

#13
actually you were a bit off in the size and now I got it. thanx man!

EDIT: heh. seems my setting were kinda wrong also. lmao.

but at least you sent me in the right direction. :P

it seems its turned right. but the equater is about 1/3 too low. lmao. must work at this more. lol

Oshyan

Yes, it just seems like a position/rotation/orientation issue. Should be fixable either with the right position, or possibly by flipping it.

- Oshyan