Horde3D

Next-Generation Graphics Engine
It is currently 28.04.2024, 17:09

All times are UTC + 1 hour




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Terrain Shots
PostPosted: 17.04.2008, 16:20 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Would you mind explaining how you fixed the seams in the atlas? I hope you don't mind, but I borrowed your atlas texture above to do a quick attempt at procedural texture-splatting:

Click for full size
Image

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 17.04.2008, 17:30 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Nope, I don't mind at all.

I downsized each individual texture from 256x256 to 250x250, centered it inside its part of the atlas, and then tiled its edges. The UV sample region has to adjust for it, but its just a "gutter_size" float. 250x250 was chosen arbitrarily. This seems to be the dominant way of solving atlas seam issues but I haven't tried using different texture2D functions yet (the ones with bias and such).


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 17.04.2008, 17:37 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
AcidFaucet wrote:
I downsized each individual texture from 256x256 to 250x250, centered it inside its part of the atlas, and then tiled its edges. The UV sample region has to adjust for it, but its just a "gutter_size" float. 250x250 was chosen arbitrarily. This seems to be the dominant way of solving atlas seam issues but I haven't tried using different texture2D functions yet (the ones with bias and such).
All right, I thought that was going to be simple to implement. However, something must still be wrong with my border code, because mipmapping still produces very noticeable borders.

By-the-bye, have you had a chance to look at this entry by Ysaneya on atlas-based terrain texturing? I have been able to implement mipmapping successfully using his method, were the mipmap level is calculated manually in the shader, using dFdx() and dFdy(). This doesn't require the use of borders on the altas, but does push the minimum GPU-spec up a lot.

Click for full size
Image

I would be interested in pursuing your method further at some point, but for now this does the trick :D

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 18.04.2008, 18:52 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Quote:
using dFdx() and dFdy()


That's what I meant when I said bias, for some reason I was thinking that bias was the GL term used for all that stuff, consulting the orange-book says I was wrong. That's great that it worked for the seams, I had read some conflicting stuff so was weary about using it.

Quote:
have you had a chance to look at this entry by Ysaneya on atlas-based terrain texturing?


No I hadn't, everything I looked at existed before I started, a blessing from the heavens that he'd pop that out in this particular time frame. I love his planetary stuff.

Shouldn't be too bad for performance unless you're blending textures, which IMO looks too fake in many cases.


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 18.04.2008, 22:15 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
AcidFaucet wrote:
Quote:
using dFdx() and dFdy()

Shouldn't be too bad for performance unless you're blending textures, which IMO looks too fake in many cases.

I meant to ask you about that - your screenshots look like you are performing some blending. Is it full blending, or just a single repeated blend?

Apologies for hijacking your thread again, but further progress, this time slope and altitude dependant:
Image Image
first image full size
second image full size

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 19.04.2008, 21:56 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
The blending is incidental, its not real and is probably just a consequence of having a default texture. I've still been working primarily over a base color map which is probably also helping to soften it up.


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 21.04.2008, 05:23 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
I've started posting this stuff to the wiki, I've only got the detail texturing stuff up at the moment. Use this thread to make commentary on the wiki posts as well as the thread itself.

I probably won't write up anything about the atlas usage since Ysaneya's article pretty much covers everything in explanation and code.

Side note:
I'm not sure about my parallax mapping, it acts funky with lights in the scene, so I probably botched something with the surface normals as I still don't have intimate knowledge of the whats and whys of the terrain extension, or the whats and whys of parallax mapping either.


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 01.05.2008, 02:16 
Offline

Joined: 01.05.2008, 01:59
Posts: 2
Hello!

In the new ShaderX6 there is an article on Filtered Tilemaps, which i think discusses some these issues.

Erlend

btw 1. Just looked into Horde3D and it seems like a great rendering framework!

btw 2. I implmented the GpuTerrain thing in ShaderX4 in OpenGL and am trying to extend it to several heightmaps. I havent looked into the terrain extension that much, but it seems to be kind of the same algorithm.. Im doing the dot product thing for detail textures, but havent figured out how to get the colors right yet.. only dividing 4 detail textures into on texture. But this kindof limits the num of detail textures.. One way It can be done (i think) is to divide the terrain using a quadtree than generate each textures per quad when needing by blending a number of textures into one based on some alpha values (or other attributes) either using shaders, or using alpha blending.


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 01.05.2008, 16:52 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
There's no article really focused on terrain rendering in ShaderX4, just terrain texturing. Being "Dot-Product for Efficient Detail Texture Mapping" and "Cached Procedural Textures for Terrain Rendering." If you're referring to the latter article then the terrain extension is considerably different. That article uses a Thatcher Ulrich style chunk LOD scheme, the terrain extension is essentially a quadtree block rendering scheme from what I can see in the guts of it.

Quote:
In the new ShaderX6 there is an article on Filtered Tilemaps, which i think discusses some these issues.


Gasp! Book is too new. The best information is all in older books, especially GRAPHICSProgramming Gems I - V (anyone remember those?). I am kidding of course. Thanks for the article reference.


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 16.05.2008, 02:00 
Offline

Joined: 01.05.2008, 01:59
Posts: 2
I actually meant to say, game programming gems 6, Gpu Terrain.. Of course there are waste of methods of generating lod terrain, but i believe offsetting vertices in the vertex shader using texture sampling is the way to go on todays gpu's.


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 16.05.2008, 02:05 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
If I remember right they said they already gave vertex texture fetch a shot with the terrain extension and that CPU was faster than GPU, there was no mention of hardware used. I would expect that hardware from more recent series that are DX10 capable would be pretty fast with vtf.


Top
 Profile  
Reply with quote  
 Post subject: Re: Terrain Shots
PostPosted: 16.05.2008, 02:48 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
ef80 wrote:
I believe offsetting vertices in the vertex shader using texture sampling is the way to go on todays gpu's.
If you are willing to limit your audience to brand-new NVidia gaming rigs, then yes. ATI cards don't in general have VTF, instead they use the more flexible Render-to-Vertex-Buffer. Unfortunately, most NVidia cards don't do this well, so you have to implement both code-paths.

However, I still don't see the necessity of either approach for something as trivial as LOD terrain - every LOD terrain I have built has been pixel-bound. True, one could free up a few more CPU cycles for AI, etc. by moving to vertex textures, but it doesn't seem worth the effort at this juncture.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group