Texturing experiments

Published March 22, 2015
Advertisement
So, lately I've been getting back into working on Goblinson Crusoe. I've got the core working again (except for particle systems), but I've allowed myself to be sidetracked. In my previous journal entry, I mentioned how I was working on a terrain editor. Well, in the editor I implemented the terrain texture splatting described here. And that work got me thinking about different ways of doing the ground and rocks in GC.

In the current GC, ground tiles and rocks are separate objects, complete with diffuse/normal maps. Standard. Repetition crops up because I reuse the same small set of objects all over the place, merely with different rotations. So I thought that maybe I could "borrow" the texture splatting from the terrain materials. And combine that with a tri-planar blended texture map for the rocks? These are my preliminary results of that experiment:

jYuPYK6.jpg
RoBxgC1.jpg
vsD8Ioh.jpg

It's a quick experiment, a bit noisy-looking and nonsensical, but I think the idea is sound. The basis of the system is a texture atlas that holds 8 textures and a corresponding atlas for normals. The ground material uses 2 RGBA blend maps to blend between the 8 different terrain types in the atlas. In this case, I simply generate a noise fractal and blend between 2 textures on one layer, and select 2 textures on the other layer for the water tiles. The rock material is a tri-planar blend that uses the first blendmap for the ground textures (the one with the noise fractal) and uses the weights from that blend map to choose textures to apply in a tri-planar scheme.

The shaders are a tad heavy-weight, especially the tri-planar one. That one has 26 texture samples (1 weightmap, 1 object normal, 1 sample+normal for each of 4 terrain types per each of the 3 dimensions x, y and z). Even so, on my old Costco special box I get quite interactive framerates from this beast.

Whether or not I go through the gymnastics required to bring this scheme into GC proper, I still have yet to determine. Still, it gives me another potential tool in the toolbox, and it was kind of fun to work on anyway.
18 likes 10 comments

Comments

dsm1891

LOOKS GOOD

March 22, 2015 11:48 AM
Aardvajk
Awesome. Makes me want to get back into my game.
March 22, 2015 12:12 PM
Servant of the Lord

Very nice!

Even so ... I get quite interactive framerates


That's a very PR-friendly way to phrase that. laugh.png

Reporter: "So what's the typical framerate for the new game?"

Developer: "Uhm, it's a very... interactive... framerate. A framerate conducive to... interaction..."

March 22, 2015 08:32 PM
JTippetts

Heh, heh. Yeah. I don't have the debug console enabled at the moment, so the best I can say is "it's interactive." Doesn't feel too choppy. Kinda smooth, but sorta not smooth. Smooth-ish. At least in the neighborhood of playable, but I don't know if I can even say that considering all I'm drawing is the static terrain. Throw a few goblins in there, and who knows. Smooth-ish could turn into choppy-ish in a hurry.

March 23, 2015 01:31 AM
Ashaman73

Great work sofar :) Here are some thoughts:

The ground material uses 2 RGBA blend maps to blend between the 8 different terrain types in the atlas.

Just wanted to note, that with a default base map you have 9 different terrain types available.

The shaders are a tad heavy-weight, especially the tri-planar one. That one has 26 texture samples (1 weightmap, 1 object normal, 1 sample+normal for each of 4 terrain types per each of the 3 dimensions x, y and z). Even so, on my old Costco special box I get quite interactive framerates from this beast.

Looking at your basic tile shape , I could imagine a cylinder instead of a cube, this way a 2-planar blending could work too.


Instead of using 
   xy,xz,yz 
as texture access try to use 
   xz 
for the top and 
   wy 
for the rest with 
   w = normalized angle of direction vector xz
something like this (mirrored at 180° for first test ;-) )
   w = acos(dot(normalize(xz),vec2(1,0)))/PI

March 23, 2015 05:58 AM
MARS_999

Wow Josh very nice work!!! Love this game and how it's coming along!! I wish I had more time to get back into coding again, hopefully soon!!!! Keep up the great work!

March 23, 2015 07:48 AM
JTippetts
Yikes. Ashaman, pretend that accidental down vote was an upvote. Stupid tiny little Android screen, and stupid big fat fingers.
March 24, 2015 02:54 AM
Ashaman73

No problem :D I have my issues with these tiny smart phones too ;-)

March 24, 2015 07:03 AM
TheChubu

Very nice!

Even so ... I get quite interactive framerates


That's a very PR-friendly way to phrase that. laugh.png

Reporter: "So what's the typical framerate for the new game?"

Developer: "Uhm, it's a very... interactive... framerate. A framerate conducive to... interaction..."

The adjective you're looking for is "cinematic". Very cinematic JT!

March 27, 2015 07:22 AM
Navyman

WOW! I really like the rich colors!

April 06, 2015 01:26 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement