Heightfield Load Blend By Shader

Started by rcallicotte, April 13, 2007, 11:58:02 PM

Previous topic - Next topic

rcallicotte

I've looked and haven't found this addressed, though it might be.  If you know it is, please give me the link.  Here's my problem - when I add a Default Shader to a Heightfields Blend By Shader, then add an image to that Default Shader, and finally enable the Blend By Shader in the Heightfield Load, the heightfield disappears.  I've tried Default Shader, Image Shader, Power Fractal...any ideas?
So this is Disney World.  Can we live here?

bigben

Something like this?  I'd use an image map rather than a default shader as the default shader doesn't have images size or placement options.

rcallicotte

Ben...no.  I can't upload the example [it's huge], but I have a loaded terrain file created in another program (old Terragen) and there doesn't seem to be any way to use the Loaded Terrain's Blend By Shader option.
So this is Disney World.  Can we live here?

bigben

Just upload the TGD.  Here's one with two TERs merged by a fractal shader with a surface to colour the region where the second terrain appears.

rcallicotte

Thanks, Ben.  I tried what you did in yours but it still fails.  The problem with sending the TGD file here is that it is flooded with all kinds of stuff that will just generate errors based upon other dependencies.  For example, I have at least 5 loaded terrains and I'm beginning to think this is my problem: the order in which these multiple terrains (over ten) are in the list affects everything.  So, I'm 75% sure I'm affecting something else with this Blend By Shader in the loaded terrain. 

If I sent the file here, it probably wouldn't fail based upon the fact the other added items wouldn't be available.  One of the terrain files is about 5M.  LOL.
So this is Disney World.  Can we live here?

bigben

A tgd plus a description of what you are trying to achieve with each terrain may make it possible to see where the problem is.  Otherwise, rebuild it from scratch one piece at a time and find out where things break... and then post that tgd  ;)

Without seeing what you are trying to do it's almost impossible to suggest a fix.

RedSquare

#6
QuoteFor example, I have at least 5 loaded terrains and I'm beginning to think this is my problem: the order in which these multiple terrains (over ten) are in the list affects everything
Quotethe heightfield disappears

And, how much RAM do you have available?

rcallicotte

Thanks for all of your help.  If I decide to unscramble these eggs, I'll post the TGD.  LOL.  But, you have helped, believe it or not.  I am beginning to understand how these Heightfields work and am pretty sure the loaded heightfields are just different than the generated ones.


Quote from: bigben on April 15, 2007, 04:56:01 PM
A tgd plus a description of what you are trying to achieve with each terrain may make it possible to see where the problem is.  Otherwise, rebuild it from scratch one piece at a time and find out where things break... and then post that tgd  ;)

Without seeing what you are trying to do it's almost impossible to suggest a fix.
So this is Disney World.  Can we live here?

rcallicotte

2G and I was doing little else.  Had a couple of windows open to the Internet like this one.

Quote from: RedSquare on April 15, 2007, 05:19:48 PM
And, how much RAM do you have available?
So this is Disney World.  Can we live here?

Oshyan

Loaded and generated heightfields do have differences, of course, but both should be modificable with the Blend Shader and other inputs. As Ben suggested I would say use an Image Map shader so you can control size and placement of the image mask. Use PlanY projection and set size and position appropriately.

The reason it may simply be making the terrain disappear is because the white parts of the mask are off in some other part of the scene and/or really small. The default image size is only 1x1 meters and position may also be wrong. You will probably want to give it the exact same size and position values as your heightfield, assuming you based on the mask on the original terrain itself. Otherwise adjust size and position to taste.

- Oshyan