Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Object texturing with alpha masking

Author
Message
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 11th Feb 2018 14:18
Working on my project, I reached to the point where I have to decide how I will build the flat terrain:

The main character is moving around on a flat terrain, consisting of a grid which could be a quite large one (100x100 tiles).
My intention is to texture the ground with a base material (it can be grass, rock, marble or anything else, depending on the current game stage), but also I would have the ground textured, with some rocky roads that will have smooth transition with the base material (ie: grass)
What option do I have with AppGameKit?
How can I achieve my goal?
Should i use some kind of shader?
Any help will really appreciated

puzzler2018
User Banned
Posted: 11th Feb 2018 14:39
How you making that floor.

You using a 100x100 plane and repeat wrapping an image? or individual blocks?

If plane technique, then I would make 2 more planes with the same texture it the same and put it in those areas. so you dont see the void


george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 11th Feb 2018 14:49 Edited at: 11th Feb 2018 14:50
Quote: "You using a 100x100 plane and repeat wrapping an image?"

Yes
I use a single plane, but this is not my final solution.
If I can do my job with a single plane, then I will keep it.
puzzler2018
User Banned
Posted: 11th Feb 2018 15:04
Maybe perhaps set the plane then to say 120x120 and set the playing area 100x100 - so therefore the surrounding white areas you pointed out will go cause it will have an extra 20 tiles on the perimiters
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 11th Feb 2018 19:25
Is this the kind of thing you mean (scroll down)?

https://forum.thegamecreators.com/thread/221482
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 11th Feb 2018 20:48
Yes!!! Santman exactly
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 11th Feb 2018 21:01
I'm working on that now (big update hopefully finishing tonight.....if I can get the water smooth!), after which I'll try to make a user friendly cut down version and fire it up.
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 11th Feb 2018 22:13 Edited at: 11th Feb 2018 22:13
Good news! Thank you.
Please check your messages
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 12th Feb 2018 13:38 Edited at: 12th Feb 2018 13:52
Reading the following topic:
https://forum.thegamecreators.com/thread/214598
the AppGameKit help shader pages and some nice guides around the internet, I've manage to write a simple shader that blends textures at stages 0 and 1
I am not sure if I have apply the build in AppGameKit lighting and fog correct. Here are the vertex and pixel shaders:


Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 12th Feb 2018 13:41
I am looking at the same thing, too. Thanks!
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 12th Feb 2018 13:49
Here is the AppGameKit project

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 8th May 2018 17:52 Edited at: 8th May 2018 18:09
Very Neat George++
the next thing would be, is to have various height fields used
I have examples of height field creation and modification without alphablending
https://forum.thegamecreators.com/thread/222027
Combinations of both could create some very realistic terrains if you scroll down
to "an easier way to modify mesh" or there is other examples of modifying a mesh
that might help there that might help..

The heights could be changed between levels. That is ofcourse if you don't want to
keep the land flat which has its own advantages. Ie a flat land is better for uvshifting

fubar

Login to post a reply

Server time is: 2024-11-23 19:50:11
Your offset time is: 2024-11-23 19:50:11