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.

3 Dimensional Chat / How should i create a painting tool?

Author
Message
TGC_User
8
Years of Service
User Offline
Joined: 3rd Feb 2016
Location:
Posted: 7th Aug 2018 16:11
Here is an example picture:

In some games or map editors you can modify the terrain texture in realtime.
But does anyone know how i should do this in agk because i have no clue where to start.
Should i used memblocks and change each vertex normal map or something. Or directly change the texture?
Any help is very much appreciated!
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 7th Aug 2018 23:38
Hi

yes you would memblocks to do this

several people have posted code for the program Dark Basic Pro
it's some ware in the forum .. use search to find out that info

there should be some similarity's between DBP and AGK2

this is all the info I can give you as that ware my skill set is
at this point
TGC_User
8
Years of Service
User Offline
Joined: 3rd Feb 2016
Location:
Posted: 8th Aug 2018 18:44
Thanks! i will check it out
TGC_User
8
Years of Service
User Offline
Joined: 3rd Feb 2016
Location:
Posted: 10th Aug 2018 17:39
So should i create a new image using memblocks? Wouldn't that be inefficient if i have a 16K resolution texture for the terrain model?
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 11th Aug 2018 15:28
From what I have seen
the image is loaded into memory
then changes are made in that

with what computer has today i would not think it would be a problem
most ground texturing is 2 images
for for the height and the other for giving the look of shapes on the ground for a more 3d look

so both need to have the changes dun to them

I hope this helps to give you a pointer
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Aug 2018 22:14
Might want to consider looking into shaders for the texturing blending. I don't know the extent of the control you have but may be worth looking into because it could be much faster.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
TGC_User
8
Years of Service
User Offline
Joined: 3rd Feb 2016
Location:
Posted: 25th Aug 2018 18:21
Thanks for the help the the agk commands says that the CreateImageFromMemblock command uses a lot of GPU bandwidth so it is not recommended that this command be called every frame on large images.(copied from here https://www.appgamekit.com/documentation/Reference/Memblock/CreateImageFromMemblock.htm).
I will look into shaders.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 22nd Sep 2018 16:50
Quote: "Wouldn't that be inefficient if i have a 16K resolution texture for the terrain model?
"


If you are using a 16k resolution image you should rethink your underlying approach.

Shaders are the way to go with atlas texture blending. Then for the painting, you only need to edit the blend map image which really never needs to be more than 2k max and doesn't need any of the detail of the actual textures
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.

Login to post a reply

Server time is: 2024-04-20 13:40:06
Your offset time is: 2024-04-20 13:40:06