About Store Forum Documentation Contact
Donations:
364$/mo



Post Reply 
In-Game WE-Style Texture Painting
Author Message
llynx Offline
Member

Post: #1
In-Game WE-Style Texture Painting
Is there a way to paint textures on the terrain the same way as it is done in WE but through code? (Not overlays/decals)
03-27-2011 04:18 AM
Find all posts by this user Quote this message in a reply
Mardok Offline
Member

Post: #2
RE: In-Game WE-Style Texture Painting
I join the llynx question about painting textures and i would like to ask about similar feature - "Removing grass in real time" - Esenthel - are you planning add this in near future? It will be very usefull and flexible and give more opportunities. Engine need this and many people too.
03-27-2011 12:47 PM
Find all posts by this user Quote this message in a reply
runewake2 Offline
Member

Post: #3
RE: In-Game WE-Style Texture Painting
Correct me if I'm wrong but the Editor's are written in C++ with Esenthel. So everything you can do with the Editor's you can do with code.
03-27-2011 11:36 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #4
RE: In-Game WE-Style Texture Painting
(03-27-2011 11:36 PM)runewake2 Wrote:  Correct me if I'm wrong but the Editor's are written in C++ with Esenthel. So everything you can do with the Editor's you can do with code.

It's possible to do it yourself, but if its already built into the engine it would be very useful and much less work.

I'm trying to make the terrain texture change based on a dozen parameters and right now my current implementation does it through decals, but this gets very slow very quickly, and adding overlays instead of decals makes the game lag for a millisecond when added.

So if there was a way to paint textures like in WE then this would easily be possible without a performance hit.

______________________
I guess I could do decal gridding, say 1-3 decals per meter and changing their textures/material properties based on in game parameters, but then this highly reduces the amount of complexity I want as well as giving the game a gridded nature (which I don't want). Additionally doing it with decals makes seamlessly blending textures with a "spray" brush is pretty much impossible.
(This post was last modified: 03-28-2011 05:14 AM by llynx.)
03-28-2011 01:10 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: In-Game WE-Style Texture Painting
You can use multi-texturing, but it needs to be done manually.
setup MeshBase::vtx.mtrl (it has material blend values intensities)
setup MeshPart::setMaterial for multiple materials
only up to 3 first materials are supported

on the roadmap it's something different: setting heightmap materials through code, but on the Editor side (if you have company+ license)
03-28-2011 10:36 AM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #6
RE: In-Game WE-Style Texture Painting
That's perfect! Combining this with decals should be a good solution! Thanks!
(This post was last modified: 03-28-2011 07:29 PM by llynx.)
03-28-2011 07:25 PM
Find all posts by this user Quote this message in a reply
Post Reply