Forest from Orbit

Started by PeanutMocha, May 26, 2011, 12:39:58 AM

Previous topic - Next topic

PeanutMocha

I'm trying to figure out how to shade different land types for a render from low orbit.

One land type is a (large) forest.  I'm trying to use a Power Fractal Shader but limit it's area of effect (is there a more realistic method?)

Trouble is, I can't figure out how to limit where the Power Fractal Shader renders.  My first thought was to use a blend shader.  That "works" in that only the white areas of my blend bitmap are shaded as a forest, **but** all areas outside the blend bitmap are also drawn as a forest.

Ideas?

Matt

Make sure that the image map shader has no inputs, because the inputs will also be used as the blend shader.
Just because milk is white doesn't mean that clouds are made of milk.

PeanutMocha

The image map shader has no inputs.  Screenshot of network node attached (there are some inactive nodes in here because I tried a few different things).

Matt

Ah OK. It seems like the image map is producing white outside its boundaries, somehow. You can test this by connecting the image map shader directly to the planet. What do you see?

I'm just guessing, but is "unpremultiply" enabled in the image map? Maybe that could produce white outside the image. If so, it's a bug we should fix.

I'll take a look if you send us the project or clip file, or even just pasting the image map shader and fractal shader into a reply might tell us a lot.
Just because milk is white doesn't mean that clouds are made of milk.

Hetzen

Is "Invert Blendshader" switched on in the PF by any chance? Your mickey mouse shape on your bitmap should be white on a black background.

PeanutMocha

Heh... that did it.  Turning off invert blend shader solved the overrun problem (unpremultiply was checked but had no effect).

Still, if it's correct behavior for invert blendshader to generate white pixels outside the boundaries of the image, that limits the utility of that option.  For example, if I have a mask for things that are forest vs. things that are non-forest, I now need 2 masks rather than a single mask that is inverted once if I want to limit the area of effect to (in my case) a single continent on a world.  Am I missing something here?

Thanks for everyone's help with this!

Hetzen

if you reverse our image map in a paint program, then it will work as you want it to.

PeanutMocha

Yes,  but then I have to load two copies into memory if I want to use a single mask to differentiate between two types of things.  Since my scenes tend to be pretty memory-intensive, I was hoping to avoid that.

Hetzen

#8
Well, you can always put a "compliment colour" function node between your image map and your PF which will invert the colour.

Another tip, is that you can create masks in the colour channels of your bitmap, so there's a different mask in red, green, blue of the channels, then use a "red to scaler" to extract the red value as a black and white mask, etc. This means you can have three masks taking up the memory space of one bitmap if ram is an issue.

Kadri

#9

You didn't mention what kind of images  you use PeanutMocha ,
but use 8 bit gray scale images where you can , if you have a memory problem.
They are mostly sufficient as masks and highfields .
And easier to use for mortals like me .  :) .

TheBlackHole

Put a black Constant Shader as the input of the image map.
They just issued a tornado warning and said to stay away from windows. Does that mean I can't use my computer?