Matching Object Texturing to Terrain

Started by jaf, August 17, 2011, 12:47:57 PM

Previous topic - Next topic

jaf

I've got a terrain set up that I like the shading, but I want to bring in some rock formations from 3D-Coat and match the formations to the terrain.  Is there an easy way to do this? 
(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

Ogre

#1
Based on my tests.  That would be difficult.  Attached is a test file where I match  a cube to the terrain. Some Tricks
-A full width texture map on a cube matches a 1x1 M area on the terrain. So if the cube was 10 meters wide you need to scale the texture down by 10. It also seems my cube face took the shader on the X-Y plane and the terrain took it on the X-Z plane so I needed to rotate the texture 90 before applying it to the cube.  Then I need to translate it by 1/2 a cube (0.5x 0.5 y) most likley to match a difference in origin at corner to origin in center differences.
"If you find me feeding daisies
please turn my face up to the sky and leave me be watching the moon roll by.
What ever I was it was all because I've been on the town washing the BS down."

-Gordon Lightfoot

jaf

Knowing this probably wouldn't be easy, I tried this.  I did a rather large render of the terrain with the atmosphere off (thinking the atmosphere would add anther layer of complexity.)  Then I cut out a square area of the render in Photoshop (the marque area in the image) and made a seamless tile from it, which I applied to my object, which had no previous UV or texture map. I hoped this would would match the terrain -- not exact, but enough to look natural. Of course it wasn't close. 

I tried turning ray tracing off on the object and several attempts with the other parts shader options like reflectivity to zero, but could never get close.  I'm guessing the next step is to start darkening my image map, but that would be so "hit-and-miss."

I was hoping someone had a workflow or some magic process to get objects at least in the "ball park".
(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

JimB

Did you play with the gamma in the image map shader?
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Tangled-Universe

Copy the name of the last powerfractal/surfacelayer of your terrain.

Go to your objects surface shader, probably default shader.
Paste the name into the colour function and set the diffuse colour to pure white = 1.
Now the object should use the same colours as your terrain.

If this doesn't work then create a translate shader and connect the last powerfractal/surfacelayer of your terrain to the shader input of the translate shader (on the right).
Inside the translate shader enable "use world space (final position)".
Copy the translate shader's name and use that as colour function (see steps above).

I would expect one or both ways should work.

Cheers,
Martin

jaf

Thanks JimB and Martin!  This has gotten me going in the right direction.  Both methods can get me close and I can seethat I need to put more detail in my 3D-Coat model (I suspected that.)

I can see now that for natural terrain objects, the texturing is best done in tg2.  I've always done objects like a cabin in other applications and just made small adjustments to their shaders.
(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02