## Example of easy implementation of Skorpios Tileset

### Example of easy implementation of Skorpios Tileset

Hallo Everyone,

I am using Skorpios Tilesets for my Dungeon Keeper Project.
So he ask me to share my Ideas with this Project and the Coders here, he suggest to post it in the Code Area, so thats what I am going to do in this Thread. As a very thankful gesture to Skorpio and to this amazing Project you have here!

I think my Idea is a good an simple solution and will work in every Programming Language (My Project is written in Java).

The Basic Idea:

Every Tile has 8 Neighbors. So you Could just check the Neighbors and do complicated if-then-else Code. Or you just develop a Code that identificates every Tile in an easy way to use it inside an algorithm:

As you can see every Neighbor has a Number. These Number represent the Position in a 8-Bit Binary Code.
So the Tile in the Example shown has no Neighbor. So that Code would be just 00000000.

So in the First step you have to rename every Tile Skorpio has Build (or in My Case i just rename them in Blender an re-export them):
b

The Tile in this Picture has the code 10000011. Because he has 3 Neighbors. one at Position 0, 1 and 7. (Remember you Read Binary Code from Right to Left).

So you have all the Tiles in an easy-to-use Binary Code:

drt

The Selected one has the Code 00111110. The c is just an identifier later in the alogrithm that there are several alternatives with the same Binary Code. So what you can see is the Filename. All the Files are already created in the correct Binary Code.

So all you have to do is to check the neighbors, calculate the code, concat it to the File-Adress-String and then Load the File which has the matching Binary Code!

In my Solution all the Objects for one Szene are Loaded over an .XML File with the XML-Parser we created. (To ensure that also people without programming skill can use our 3d support).
So the Code for that is:

xml

The "?" in the modelpath-url show my Program that there has to be an Calculation done before loading the Model.
I have a Dataholder for every Object in the Szene in Java with Propertys.
I save the Neighborhood Property in the Data-Representations of the Objects in Java.
The Neighborhood Property are set when I load the map and "recalculated" every time one of the neighbors changes. (Like destroying a wall by IMP or something). Its pretty fast an efficient.
The Class to Load the 3d Objects use this Property to Find the correct Tile in the Folder.

You also need an exception handler after calculating the algorithm.
Normally there would be 2^8 = 256 different Tiles.
There are less (47 or something) because several cases are the same with the tilesets of Skorpio.
You have to set the position of the corners 0, 2, 6 and 4 to zero if they don´t have at least one direct neighbor. (for 0 pos 7 and 1, for 2 pos 1 and 3 and so on...).

The result is than this (in the first 2 pictures you can see the neighborhood value):

Hope it helps you, i will post more examples or pictues if needed.

- Flipflop

PS: sorry for my bad english .)
Last edited by Flipflop on 23 Dec 2012, 23:57, edited 1 time in total.

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

In my Solution all the Objects for one Szene are Loaded over an .XML File with the XML-Parser we created. (To ensure that also people without programming skill can use our 3d support).

What is the Szene ? The schwartz, right ?

http://youtu.be/IjVatNQr-GM?t=3m32s

Edit:
Arght the Scene .
Well pun intending I thought it;s really the "Steel Rail " like Szyna in Polish. :P
Last edited by paul424 on 20 Dec 2012, 16:24, edited 1 time in total.

paul424
OD Moderator

Posts: 294
Joined: 24 Jan 2012, 13:54

### Re: Example of easy implementation of Skorpios Tileset

Nice explaination... don't let Paul424 distract you from your aweZome German typing skillZ
Contribute to http://www.opengameart.org NOW!

Julius
Community Moderator

Posts: 1114
Joined: 06 Dec 2009, 14:02
Location: Kampala

### Re: Example of easy implementation of Skorpios Tileset

Hehe, I got the Point ^^ Of course i mean the scene....

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

Very nice. I'll upload an updated blend file with the water and lava tiles tomorrow, if you want to integrate them, too.

Skorpio
OD Moderator

Posts: 742
Joined: 05 Dec 2009, 18:28

### Re: Example of easy implementation of Skorpios Tileset

Hehe, sure, would be nice. My Lave Tiles are at the moment just Planes with a low res Texture....

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

The water and lava tiles are now in the repository (in the OD_Tilesets2 file). I just noticed that there are some lighting seam issues which I could maybe fix with sharp edges around the bottom, but sharp edges are not optimal either. The materials are not perfect yet, too. By the way, do you have an idea for texture/alpha splatting across different tiles? I think Lips of Suna has texture splatting between different materials. TheAncientGoat can you tell us how it works?

Skorpio
OD Moderator

Posts: 742
Joined: 05 Dec 2009, 18:28

### Re: Example of easy implementation of Skorpios Tileset

I just reverted to the current HEAD of development and the AngelScript version is bad ( at least I get it's virtual machine crash at startup _)

God Have a Mercy upon Us ... >_>

paul424
OD Moderator

Posts: 294
Joined: 24 Jan 2012, 13:54

### Re: Example of easy implementation of Skorpios Tileset

@Skorpio, they look preety awesome!

I upload a better Screen when i found the time to rename every tile and re-export them ( you know christmas....). Then I can just simply use them in my algorithm and calculate the correct one like i did with the other tiles.

As you can see i make the water half transparent.

Happy Christmas, i hope i found time to do that these days
Last edited by Flipflop on 23 Dec 2012, 20:20, edited 1 time in total.

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

Happy Yaksmas! Good job. I think I have to make some bridges, too.

Have you already tried to combine the dirt walls with the claimed walls in the blend file?

Skorpio
OD Moderator

Posts: 742
Joined: 05 Dec 2009, 18:28

### Re: Example of easy implementation of Skorpios Tileset

TSome bridges would be very nice. Think i have time so rename them in my Binarycode After Xmas....
what Do You Mean By The Claimed Wall? The Castlelook tiles? I Think Thete Are Not That Matching From The Style. I Am Right Now Using The Dirt Meshes With The Claimed Ground Texture As You Can See In the Other Screenshots.

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

Sorry for the wierd text, Not used to my phone yet:-)

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

so, some screens from the water tilesets, i finnaly found an hour time ^^

not sure which color & transparency looks best.

water1

water2

water2
Last edited by Flipflop on 23 Dec 2012, 23:54, edited 1 time in total.

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

..........and the Lava Tilesets.

Not sure what should happend if water is neighbor from lava...any Ideas?

Dont know (yet) how to use the emit texture in JMonkey. There are lots of options, dont have time to read the documentation atm ^^
Last edited by Flipflop on 23 Dec 2012, 23:53, edited 1 time in total.

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

Cool, good job! I think lava and water shouldn't be neighbors at all or you need to figure out texture splatting. However, it would be cool, if you could dig a trench and then let the lava flow through it when the enemies try to enter it.

Skorpio
OD Moderator

Posts: 742
Joined: 05 Dec 2009, 18:28

### Re: Example of easy implementation of Skorpios Tileset

yeah....lava + water is some ultra hard material in minecraft I remember, obsidian, would also be cool

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

or I use this amazing reflection and wave-generations for your water tilesets......the Problem is: i need a skybox for good reflections (or the water is just totally black with only reflections from the buildings/creatures....)

But a sky is totally not matching for a dungen keeper game...i mean....its in a DUNGEON and UNDERGROUND!! .....have to think about it....but looks pretty awesome...or?

water/skybox

Happy x-mas btw!

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

hmm... maybe one could try a fancy looking underground skybox? Something with red glowing crystals or such?
Contribute to http://www.opengameart.org NOW!

Julius
Community Moderator

Posts: 1114
Joined: 06 Dec 2009, 14:02
Location: Kampala

### Re: Example of easy implementation of Skorpios Tileset

Nice realtime reflections. Yeah, a "cave skybox" would fit better than a real sky.

Merry Xmas everybody!

Skorpio
OD Moderator

Posts: 742
Joined: 05 Dec 2009, 18:28

### Re: Example of easy implementation of Skorpios Tileset

i kind of remember seeying a skybox like that somewhere, i will look around a for it.

Danimal
OD Moderator

Posts: 435
Joined: 23 Nov 2010, 13:50

### Re: Example of easy implementation of Skorpios Tileset

I tried out some of the alternatives in JMonkey. I tried a lot with the Post Water Filter. Also looks nice. Fits perfectly with the Tilesets from Skorpio. Maybe i should upload a Video sometimes....the moving waves looks awesome!

Post Water with Sun and Foam

Post Water without Sun and with Foam

Post Water with Sun and without Foam and more Transparency

and what do you all think about the sun? looks nice, but a dungeon dont have a sun ^^ And the Foam? Looks good or better without?

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

definitely better without foam. I guess with a bit of tweaking it could be made to look like the photo attached Just do an google image search and you will find more references like that.

P.S.: @ skorpio: did you ever make some spec and normal-maps for your tileset? I guess then the shader based water wouldn't look quite as out of place

Edit: and without sun. How about you add some under-water rocks and maybe some glowing crystals under the water to have it look similar to those flashlights in the back of the photo I added? Still think a cave like skybox with stalactites etc. might be worth a shot.
Attachments
Last edited by Julius on 26 Dec 2012, 11:12, edited 1 time in total.
Contribute to http://www.opengameart.org NOW!

Julius
Community Moderator

Posts: 1114
Joined: 06 Dec 2009, 14:02
Location: Kampala

### Re: Example of easy implementation of Skorpios Tileset

The new Water I am right now trying out is generated from JMonkey. I dont have much influence on them, just a setting list.

I made a Video for you guys so you can see the Effect better:

https://vimeo.com/56299411

The Settings for that Video are:

Vector3f lightDir = new Vector3f(1f, -1f, 1f);
WaterFilter water = new WaterFilter(rootNode, lightDir);
water.setWaterHeight(-0.2f*appDimension);
water.setUseFoam(false);
water.setUseRipples(true);
water.setDeepWaterColor(ColorRGBA.Cyan.mult(0.1f));
water.setWaterColor(ColorRGBA.Cyan.mult(0.15f));
water.setWaterTransparency(0.001f);
water.setMaxAmplitude(0.3f);
water.setWaveScale(0.008f);
water.setSpeed(0.5f);
water.setShoreHardness(1.0f);
water.setRefractionConstant(0.2f);
water.setShininess(0.3f);
water.setSunScale(1.0f);
water.setColorExtinction(new Vector3f(10.0f, 20.0f, 30.0f));

@Julius as you can in the older Screens Skorpio made some Spec and Bump maps for his Water. That also looks really cool. But I just wanted to try out moving Waves. Yeah, but we really should give a crystal Skymap or something a try.

Flipflop

Posts: 175
Joined: 19 Dec 2012, 13:31
Location: Hamburg, Germany

### Re: Example of easy implementation of Skorpios Tileset

Sorry i have been unable to find that skybox set, maybe asking OGA is worth a shot

Danimal
OD Moderator

Posts: 435
Joined: 23 Nov 2010, 13:50

### Re: Example of easy implementation of Skorpios Tileset

You could try this one:

http://www.3delyvisions.com/sky19.zip

It comes from this set:
http://www.3delyvisions.com/skf1.htm