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.

Newcomers AppGameKit Corner / MultiTexturing a simple plane for transition between the mesh textures

Author
Message
SomeBasics
User Offline
Joined: 25th Apr 2024
Location: Germany
Posted: 27th Aug 2024 20:03
I'm not sure if it is possible to set more then one texture to one simple plane that have only one mesh. I only found some information about models with more then one mesh and setting the textures to every mesh of the model. It was called as multi texturing. I read something of texture layers or stages in help. But I don not understand it well or how to use for what.

SetObjectMeshImage
AGK help wrote: "Sets an object mesh to use this image when rendering. A mesh can have up to 8 images assigned to it in the texture stages 0 to 7."


I want to create an Object with many plane Meshes, but every plane should have more than 5 textures. 1 for the ground type and 4 for each neighbor ground type with alpha pixels as transition. In except some textures more. So if there are ~10 texture types, 4 potential different neighbors. In review that sounds for as fps killer.

Is it possible to use the stages for simple textures or are they only reserved for a special operation on the 0 texture like lightmap and so on?
If it is not possible, is there another way to set multiple alpha textures on top of each other?
Or should I prebuild all texture versions for usage if needed? That results in many images.
Or is there a better solution for that, what I want to do?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 28th Aug 2024 08:13 Edited at: 28th Aug 2024 08:15
see the community shader thread, especially HERE and the next.

it does sound like what you're looking for?
SomeBasics
User Offline
Joined: 25th Apr 2024
Location: Germany
Posted: 28th Aug 2024 18:34
I looked into the Thread. Could be that I was in the thread earlier but at this time I had no understanding for shader. Seems so that this could work. I will give it a try and learn how to use them.

To prebuild ~10 * 4^10 textures is not funny cost disk space and RAM but it is faster on usage I think. I would have build them per code with a randomize texture generator. This is as it were my backup plan, if using shaders is to slow. But I don't think so at the moment. I will leave a note if it works.

Thanks for help
agkcoder
19
Years of Service
User Offline
Joined: 12th Dec 2004
Location: AGK Forums
Posted: 5th Sep 2024 21:43 Edited at: 5th Sep 2024 22:43
I think the "Useful Community Shaders Project" should be pinned. Way too useful...
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 5th Sep 2024 22:55
there are a lot of good threads (including the community shader thread), many linked in a single sticked post for quick reference HERE.
agkcoder
19
Years of Service
User Offline
Joined: 12th Dec 2004
Location: AGK Forums
Posted: 6th Sep 2024 01:59
Oh yesss...I forgot about that collection of resources. Thanks!

Login to post a reply

Server time is: 2024-11-07 04:36:25
Your offset time is: 2024-11-07 04:36:25