Custom Map for Dying Light - Buidl Post #06

avatar
(Edited)

"So, back into Blender, and attempting Plan A" he confidently said, in his previous post.

Gamemapmaker had a clear idea of what he wanted to do. Problem was, Gamemapmaker hadn't the faintest idea of what he'd gotten himself into when attempting this level of modding!

Normal maps, alpha channels, opacity gradients. The list went on. Wrapping one's self's mind around all the concepts that lie therein a game engine is decidedly necessary in order to quickly think of the simplest and best solution to a problem. As opposed to tumbling, spiraling towards it.

Gamemapmaker was, in fact, a noob.

"Hey!", he exclaimed. "It's not completely like that!", he continued, seemingly speaking to no-one.

Gamemapmaker had apparently lost his mind. He was clearly the only one in the room. What other explanation could there be?

"I still had to find a way to stop the texture from having transparency applied to it's entirety.", he said. "It's not like the tools came with a manual! Some things i'm trying to do might not even be possible!"

Perhaps there actually was someone else in the room. All this talking to himself is not typical, for anyone. Or perhaps, it was the fever that got to him.

"Douche.", he said.

Gamemapmaker was now clearly annoyed at something. With a swift thumb movement he reached and pressed his phone's power butto

dldt_div_alpha.png

Plan C

Now that i've managed to figure out how to apply transparency to certain parts of a mesh (as opposed to what was happening, where the entire mesh gained a bit of transparency, i'll create a decal (a simple plane mesh with a texture) to simulate the smooth transition between the road and the wavy sand.

I could go into all the road meshes, add extra edges, then apply a similar gradient to the edges, but a separate mesh for the transition is better, in any case.

With a separated mesh i can position it at any angle, location and scale; it's just a matter of duplicating the model, over and over again, along the edges of the roads i've placed on the map.
before_n_after_shots_1.jpg

dldt_div_alpha.png

Creating the Decal

In Blender, i simply create a plane. Not much rocket science there.

Next, into Photoshop, to create the alpha channel that will be responsible for the transparency gradient. I'll start with a circle gradient. As i work on the map, i might come back and redo the alpha image, possibly make more than one decal, with different alpha patterns for the several of the curved roads i work with.
before_n_after_shots.jpg

Mesh and textures imported into the dev tools, set the model's texture and made the changes to it's material's properties.

And we have ourselves an almost proper decal, to hide the hard edge of the sandwaves and the road.
sKcpDJ6i9p.jpg

dldt_div_alpha.png

"I'm Gonna Need More Plans"

I say almost a proper decal because, in my hastiness to move past this problem, i didn't add the normal map to the terrain, while attempting to fix up the transition.

After noticing and adding it, the terrain pops through the decal.
6x2ZFvhJcp.jpg

No good.

This would have happened if i embedded the decal into the roads themselves, as well.
dldt_div_alpha.png
Pondering my options, and doing some tests.

Plan D was "add a normal map to the decal as well" and see if that fixes things. It didn't.

Plan E would have been simply to not use a normal map on the terrain; not at all my favorite plan. Leaving it for the last resort because the terrain is especially important to have normal maps, to create the illusion of the sand waves having height, as opposed to looking like a flat image of sand...waves.

dldt_div_alpha.png

Plan F

Plan F is Fucking great.

The terrain for the game is a single plane, made up of squares, and as with any mesh (in Blender or other 3D software) i can add any number of materials to it, and then apply a texture to each material, "painting" the terrain with how many different textures i want.
bpvtIIsYa1.jpg

When i paint one texture near another (or over another), there is a blend that happens between the two textures and a gradiency is automatically created, blending the two textures together.
Eo3bDIXBrY.jpg

This is what i have been trying to achieve; a blending of two sands with a transparency gradient.

I can use two sands on the terrain itself, and have the gradiency occur on the terrain, as opposed to using a decal to mimic this gradiency.
If15XTaXkO.jpg

dldt_div_alpha.png

Why i stayed away from this technique is because blending of the two textures only occurs on one square. And i cannot set the number of squares i want the gradiency to be applied throughout.
another_zoomo.jpg

What hadn't occurred to me is that i can change the terrain's resolution; the size of each square that makes up the terrain.
387mR10qUQ.jpg

And being that the transition between textures takes place on the one square, and that the squares can be increased in size, i can make the transition occur at a larger distance.
another_zoomo_2.jpg

This will, however, make the terrain's mesh less detailed. I increased the size of each square, but the terrain size stayed the same. So, there's less squares. The less squares (faces) a mesh has, the less detailed it will be.

So, for the terrain around each road, i'll have to decrease the resolution to get a high distance transition.

dldt_div_alpha.png

There is another catch though.

I can only change the resolution for blocks of terrain (entire groups of squares), and not individual ones. This means that there's considerable terrain around the roads that will have less detail.
xh6GJjku0y.png

But, the terrain around the roads is made up of desert dunes and, after all, just how detailed do sand dunes need to be?!

dldt_div_alpha.png

Final result.
NHBwsnXlBj.jpg

I'll end up, at some point replacing the terrain texture near the road, to fit the map better. And even reduce the transition distance by increasing the terrain resolution.



0
0
0.000
10 comments
avatar

I like plan F best :)

!PGM
!hivebits
!PIZZA

0
0
0.000
avatar

Sent 0.1 PGM - 0.1 LVL- 1 STARBITS - 0.05 DEC - 15 SBT tokens to @ruralio, @gamemapmaker

remaining commands 3

BUY AND STAKE THE PGM TO SEND A LOT OF TOKENS!

The tokens that the command sends are: 0.1 PGM-0.1 LVL-2.5 BUDS-0.01 MOTA-0.05 DEC-15 SBT-1 STARBITS-[0.00000001 BTC (SWAP.BTC) only if you have 2500 PGM in stake or more ]

5000 PGM IN STAKE = 2x rewards!

image.png
Discord image.png

Support the curation account @ pgm-curator with a delegation 10 HP - 50 HP - 100 HP - 500 HP - 1000 HP

Get potential votes from @ pgm-curator by paying in PGM, here is a guide

I'm a bot, if you want a hand ask @ zottone444


0
0
0.000