Planetside Software Forums

General => Terragen Discussion => Topic started by: pagan on October 02, 2008, 07:06:31 AM

Title: image map extra
Post by: pagan on October 02, 2008, 07:06:31 AM
Coming from my other thread I have few question on image map
http://forums.planetside.co.uk/index.php?topic=4900.0

- is it possible o tile ?
- how do I use a TG shader into an image map or how do I position a tg shader only on a region of my terrain?
Title: Re: image map extra
Post by: Alfamike on October 02, 2008, 07:50:23 AM
Quote from: pagan on October 02, 2008, 07:06:31 AM
Coming from my other thread I have few question on image map
http://forums.planetside.co.uk/index.php?topic=4900.0

- is it possible o tile ?
- how do I use a TG shader into an image map or how do I position a tg shader only on a region of my terrain?

1   For tiling look at the image shader "Flip, Repeat" tab. You'd of course need a tilable image.

2   Positioning can be done by assigning the shader to a cam at a certain height, pitching -90°. Adjusting the cam height adjusts the size of the projected image, thus in a way its resolution. Or you could select projection type Plan Y and position & size the image.

AM.

EDIT. Think I got your second question wrong, you want to use a shader output into the image map shader?
Title: Re: image map extra
Post by: pagan on October 02, 2008, 10:20:50 AM
At the moment I am using plan y


flip repeat does not really do what I want.
Basically in order to up the resolution of my image map I would like to scale it down and then tile it withn the bounderies of the mapping and not tiling on the whole terrain

This could be a work around if I can not manage to use a TG shader as an image map
Title: Re: image map extra
Post by: Oshyan on October 02, 2008, 11:38:27 PM
What do you mean by "use a shader as an image map"? It's not very clear exactly what you want to do here but I suspect masking and/or use of "blend shaders" may help you get what you need.

- Oshyan
Title: Re: image map extra
Post by: pagan on October 03, 2008, 03:52:49 AM
Ok sorry for not explain too well
I would like to do 2 things both which are quite useful for me.

1- to tile an image map shader within a specified area(not along the whole highfield that I am using)
2 - to map a procedural shader in a specified area (like image mapping bur with a procedural image).

Is this is ok?

I have never used the blend shader I will give it a go
Thanks!
Title: Re: image map extra
Post by: bigben on October 03, 2008, 05:45:00 AM
The blending shader is what you want in both instances.
Title: Re: image map extra
Post by: pagan on October 03, 2008, 05:44:40 PM
Can't find the blend shader!
Am I being thick ???
Title: Re: image map extra
Post by: Oshyan on October 03, 2008, 11:08:47 PM
It is an input that is present on almost every regular shader. You would attach some other shader (for example another Image Map Shader with a mask image to control distribution) to the Blend Shader input of the node you wish to control the distribution of.

- Oshyan
Title: Re: image map extra
Post by: pagan on October 05, 2008, 11:46:32 AM
Ok I have manage to get some result with blending
however I also would like to use a distance map to have different resolution images.
So that when I am close I will have the high one and when I am far I have the low one.

I know that this will spoil the purpose of using terragen(being the procedural guru) but I just want to try by mixing this techniques.

Which one is the node to use?I could not find a suitable one
Title: Re: image map extra
Post by: bigben on October 05, 2008, 03:39:43 PM
You're still using the blending shader input, using the distance shader as a mask.  If you want to use it in conjunction with another mask then you need to combine all of the masks first before connecting it to the blending shader.  There are many ways of doing this.

Title: Re: image map extra
Post by: Oshyan on October 06, 2008, 12:13:46 AM
It sounds like you're trying to manually setup some kind of Level of Detail (LoD) system, which is unnecessary as TG2 essentially handles this for you. So the only reason to use different resolution images would be memory-related, for example if you were able to use lower resolution images in the background of a scene and thus be able to load fewer large, high resolution images for the foreground. But it sounds like you're aiming for an animation (judging by "...so that when I am close... and when I am far..."), in which case you have to load the high resolution images anyway if you're going to be close enough to them to notice the difference. Dynamically switching between high and low resolution images based on distance probably isn't going to be that useful in an animation.

- Oshyan
Title: Re: image map extra
Post by: pagan on October 06, 2008, 12:37:06 PM
thanks Ben I will try that!

yes Oshyan I was trying to set up some animation LOD system but I see your point.

However I have seen many people using image maps blended with procedural shaders in still shots.
Does this mean that I can load very(very) high resolution images for close up shots(foreground) and don't bother with low resolution one for the background ?

What is the maximum resolution I can load up?
Title: Re: image map extra
Post by: Oshyan on October 07, 2008, 01:46:41 AM
Theoretically yes, you can load high resolution image maps. I have successfully loaded up around 10,000x10,000 myself. But you do run into memory limitations simply because it is a 32 bit application. A 10,000x10,000 24 bit image is 300MB uncompressed. I wouldn't recommend loading many of those at once! You may be better off with smaller tiled images, which is what most people use to enhance detail. When combined with procedurals, you can get rid of any tiling effects fairly easily.

- Oshyan
Title: Re: image map extra
Post by: pagan on October 07, 2008, 07:18:44 AM
Whao! didn't know that!
I will try straight away!