Simple terrain splatting [OpenGL]

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Pyritie
Posts: 120
Joined: Fri Jan 16, 2009 12:59 pm
Contact:

Post by Pyritie »

bitplane wrote:The best way to do an advanced terrain is a completely custom solution that doesn't work in general cases. A custom editor, file format, custom vertex format, a node that prepares the data and shaders that render it using specially prepared data like 3D textures with manually edited mipmaps. This would be a very big job and would mean modifying Irrlicht too.
D:
Hive Workshop | deviantART

I've moved to Ogre.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Pyritie wrote:Also BlindSide your image link is broken.
No it's not.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Pyritie
Posts: 120
Joined: Fri Jan 16, 2009 12:59 pm
Contact:

Post by Pyritie »

Hm, now it's working. :o
Hive Workshop | deviantART

I've moved to Ogre.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Ugly borders can be solved by creating own mipmaps. Hybrid already promised some interface for accessing mipmaps directly from Irrlicht will be incorporated in to some future release. Until then, only solution is to turn off mimpaps or setting texture tile offset as Nadro suggested. Both doesn't really solve problem satisfactory.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yes there is an NVidia tool that generates mipmaps for atlas textures. Hopefully when the user mipmaps feature is implemented we will start to see some progress.

I managed to get rid of the white borders myself though by using Arras's terrain and setting all the texcoords in the range [0,1], that way I don't have to worry about "fract()" (Except for the bilinear filtering).

Heres one without the white grid:

Image


But you can still see some artifacts far away between texture boundarys.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

and setting all the texcoords in the range [0,1]
But that means you do not use texture atlas ...do you?

Also I see lighting is on on that screenshot ...how do you manage light in your shader ...some constant number and type of lights?
Post Reply