More Texture mapping stuff

Started by TheBadger, October 30, 2011, 09:37:42 PM

Previous topic - Next topic

TheBadger

Hello,

In looking through threads for information and discussions about texture mapping and image mapping (these terms sometimes are used interchangeably. Is it correct to do so?) I was un able to find a straight forward topic on applying a texture map to an image mapped terrain.

Can one apply an image map as a texture to a terrain? For example I attached a .tgd with a terrain made from an image map in the shape of a wall. here is a link to a high quality image for texture (should I say detail or texture in this case?) http://www.lovetextures.com/index.php/architectural/part-white-wall/

I tried to 'attach' the image to the terrain wall, in the same way I made the wall. I also tried using a distribution shader thinking I could apply the image to only a vertical surface. No luck.

I am able to get the image to appear and effect my wall but not in the way I want. Also I am trying to avoid using the render camera as the projection method. And so I am wondering if the notion of projection is the problem? When you use an object in a terrain, the object is not a projection, can I, within TG2, truly texture an image with a map (without clicking displacement check box? What about bump ambient specular, how do these play a roll in TG2?

Could use some help getting through this, so thanks in advance for your thoughts.
It has been eaten.

TheBadger

here is the simple wall for conversations sake ;)
It has been eaten.

Dune

Try this as a basic setup. Probably things to improve, but put together quick 'n dirty.

yossam

You forget to include your wall with the .tgd. Check out the render............it is very low quality so it may have some artifacts. What you are talking about is possible............it's just a pain to get it close to right.

TheBadger

Thank you Dune.
I was glad to see that my method was really close to the one you shared with me. You use more nodes, but I didn't see too much of a difference. Though I have a lot of displacement to make it hard to tell... Anyway, Same problem with what you showed me as what I was getting on my own, but at least now I am sure of what the problem is.

Its the Size filed in 'projection/location' filed. Can you or any one please tell me what the size is relative to? I mean should the size be as close to what the image for projection is? I cant seem to get it right and so my image map is all stretched out. Looks bad.

Yossam,
If possible, will you post your file for the image you showed. I would like to see if your doing something different.

Also,
If there is a simple answer to what TG2 can do with bump, ambient, specular please share.  :)

Thank you all
It has been eaten.

Dune

The size is relative to the number of pixels of the image map. Best to see if you project on the Y axis and see what it does on ground. You can also put a camera in front of whatever you want to project an image on and check projection through camera, and assign the camera, of course.

TheBadger

Hello,
Thanks Dune, but Im sorry to say I still need help with this. Please look at the images I am posting below and the 2 images in the following link: http://www.cadcourse.com/winston/BumpMaps.html
The link if for a different program, but bump mapping is bump mapping. Isn't it??

My question now is, why wont the texture 'wrap" the vertical in my terrain?

In the image Im trying to make I have many walls that go back to the horizon, and Im planing on animating the scene. So rather than projecting an image viewable from one spot, I want what you see below globally. I'm half way there! I just cant get the verticals to take the bump map no mater what I try. Sorry to be so slow.

Thank You


It has been eaten.

Dune

The terrain in TG is not UV-mapped, so to speak, like you would do an object. You have to decide how to project your image/bumpmap onto differently angled parts of the terrain. So you need at least three angles (top, left/right, front/back). It won't be easy, because you have to project on one side but not having the other side interfere with the first, to say the least. I'm afraid I can't help you very much further in this. Perhaps it is even quite impossible...

Kadri

#8


You have two topics about this , TheBadger. I thought this is the better place .

It can be done. But i would do it as an object if you ask me.

It has problems but planed accordingly you could use it anyway.

I did put two TGD files in the  " Projects.7z "  attachment file (below here in this post). One with a merger shader , the other without.
If you or anyone want to make better nodes etc. feel free. There are many ways probably.
For example i used 3 surface shaders ; You could use less (it works too).
Do not read too much in the settings. I made this very quickly only to test if this works.
There could be checked places i didn't wanted to check etc.  :)

The "The_Wall_Tests..."  picture ( look at the next post below) :

1 : I tried to merge the X and Z wall side textures but could not do it properly with this method .
     (The walls are not smooth because i made a very basic mask very fast . So please do not take it into consideration. )

2 : This is much better but you have to plan and make the masks accordingly.
     I only partially made some changes you see here marked .The mask is a little different. For the X and Z side.

3 : Texture only on "Projection type : Side X" .

4 : Texture only on "Projection type : Side Z" .
     Maybe if Planetside (or some of the node-math wizards here ;) ) would put kind of a "Cubic Mapping"(if possible) option most of this could be done more easier.


I tried the LWO exporter . It has his own problems (polygon heavy for better object) but i would use this (with Poseray(free) you can convert it to Obj ).
But everyone has his own work flow and programs of course .

Hope this is any use for you or others.

Cheers  :)



Kadri


Continued from above:

TheBadger

@Kadri!

Did you have this from before or did you make it just to explain your ideas about how to do it? Whichever is the case I thank you for the help. And if you made the files you posted just for this thread than thank you very much! But please don't be offended if I don't post something soon on the subject, I just looked at the files in your .7z and its going to take a while for me to understand what you have done. My user level is not as high as yours or the other members who have been helping me. I will want to understand the nodes them selves and not just how you used them, and that will take a bit for me.

Thanks again

It has been eaten.

Kadri

#11

No problem , TheBadger ! I made this test files only because you asked :)  What matters is if this helps you or not.

For better understanding look at the slope settings on the surface shaders.
This is maybe the most important part for getting the texture on the side walls and not affecting the ground..
And of course there could be other approaches  by the open nature of TG2.

bobbystahr

Looks like a sweet solution Kadri...well worked out...KUDOS .  ..   ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist


TheBadger

So kadri,

I have looked through the files you posted and found that I was able to understand them. Its really great because as a result I now understand a lot of other things too. Once I was able to figure out what your nodes where doing and how you used them I found that I could apply that knowledge to many other nodes!  8)

For example, By seeing you use the surface layer node the way you did I was able to think of other ways to use it my self. I also began to look for a similar node in the terrain node set. I found the redirect shader and because of your file my project and this conversation was able to use it for the texture bump, the way you used the surface node to build a loop for the detail image maps! lol, Terragen2 is much funner to use when you understand whats going on ;D

But I also have a question. When applying a bump with a redirect shader (x,y,z) I got total coverage. But in the set up you shared, to get the color and detail from the image map, masks are needed. Why does the one not require masks and the other does?

Also, Im not sure yet even how to make a mask, I have not got that far yet, I have been experimenting with the other stuff first. But my project is really shaping up!
It has been eaten.