Jump to content
The Dark Mod Forums

Vertex Painting Terrain


Renzatic

Recommended Posts

Simple question. I want to make a terrain, and I want to make it fancy. To achieve that without butchering texture resolution by attempting to UV it direction, I figured I'd do some vertex painting. Even came across a nice tutorial on how to achieve it.

 

I've got one question, though. Can I use more than 2 textures per terrain? That might work well for caves, but I want rocks, and dirt, and mud, and mindblowing transitionary textures, and all that good stuff. Something that's hard to do with just two textures. So can it be done, or do I have to break a terrain apart into dozens of tiny chunks to get the detail in and still maintain resolution on the UV?

Link to comment
Share on other sites

Nope. I ended up splitting my terrain and using A-B B-C junctions to make seamless transitions between 3 textures.

 

Hmm...don't think I'm quite following you. The way it sounds, you broke up the mesh so you'd have, say, grass to dirt on A-B, then dirt to rock, on B-C. That right?

Link to comment
Share on other sites

Hmm, might take a little forward thinking, but that shouldn't be too hard to pull off.

 

But for simplicity sake, what about using a 4096x texture? No normalmap or anything, just the diffuse by itself. It'll end up being huge, of course. But with it just being a single texture, it shouldn't be too much of a drain on performance. Think it's feasible?

Link to comment
Share on other sites

But for simplicity sake, what about using a 4096x texture? No normalmap or anything, just the diffuse by itself. It'll end up being huge, of course. But with it just being a single texture, it shouldn't be too much of a drain on performance. Think it's feasible?

Of course that depends how large the terrain is - if you have a 2000 unit floor to texture the 4096x4096 image will still be blurred like hell.

Link to comment
Share on other sites

Simple question. I want to make a terrain, and I want to make it fancy. To achieve that without butchering texture resolution by attempting to UV it direction, I figured I'd do some vertex painting. Even came across a nice tutorial on how to achieve it.

 

I've got one question, though. Can I use more than 2 textures per terrain? That might work well for caves, but I want rocks, and dirt, and mud, and mindblowing transitionary textures, and all that good stuff. Something that's hard to do with just two textures. So can it be done, or do I have to break a terrain apart into dozens of tiny chunks to get the detail in and still maintain resolution on the UV?

 

Decl patches!!

Link to comment
Share on other sites

Of course that depends how large the terrain is - if you have a 2000 unit floor to texture the 4096x4096 image will still be blurred like hell.

 

My plan is to have maybe roughly a half acre of traversable land, basically the area surrounding my building, with the rest of the landscape (moors, in case you're wondering) stretching off in the distance. It only has to be sharp and detailed in the immediate area, with the rest of the area getting more and more generalized the farther out you go. If it get too blurry, I could just shrink down the landscape mesh a bit and fog off the distance. That'd still look impressive, and be easier on the resources.

 

Right now I'm trying to find the most efficient way to do this. Vertex painting is the best from a texture performance standpoint, but having to split apart my mesh for each transition will end up with the map having alot of excess vertice lying around. Decal patches would work for some things, but not for the entire map. I gotta find that nice balance that can net me the best looks without sacrificing much performance.

 

edit: just thought of another question. How expensive performancewise are alot of alpha mapped textures crammed into a single scene? I've already got a few experimental tufts of grass modeled out. They're just 4 tris each. But I'm worried having a whole bunch in a single scene will hurt performance.

Link to comment
Share on other sites

Well it depends on how many you think will be rendered at any one time. If you do the toad as a decal it should be fine. There are places on the training map that have 50 odd alpha blended decals out at the same time in a small area, performance barely changes. As normal patches there is a depth cull which is rather harsh, I'm not sure on the distance tho and it depends on how close the surfaces are. All in all, the only way to know is to mock up a scene, I'd use an existing map and just add an area of it - so that you can get some idea of a realistic performance overhead.

Link to comment
Share on other sites

I'm going to have far more than just 50 alpha mapped textures in there. Probably more along the lines of 300 or so at least, since I'm going for fairly thick grass, roots, ivy growing on the side of my building, and other various cool looking details.

 

I've got a couple options for the grass. I could probably clump huge amounts in a single model so it doesn't eat up the entity count. I could also try and do billboard grass, which will only take up 2 tris per clump, but might look weird with the grass always orienting itself towards your view. But no matter how I do it, I'm gonna have alot of alpha maps in a single scene.

 

Right now, I think the best thing I can do is follow your advice and try it out. If it works, then it'll be awesome, if not...then I'll at least have some new assets to donate to TDM.

Link to comment
Share on other sites

I meant to imply that there was no change in performance - running the map with decals and without gives me no noticable change in performance on 4+ year old hardware. The timedemo result stays pretty much exactly the same.

 

Something that might help you mock it up quickly is Aliencodec's Plantlife, it hasnt been updated in years but offers something between those modeling plugins to generate foliage - but aimed specifically at games and stand alone. It doesnt export directly to ASE/LWO, but it does let you make things quite painlessly and with a stop over in a modeling suite you'll have them in TDM I suppose. I only mention it as it has a module for generating large clumps of modeled grass with custom materials etc and can convert to billboards. Worth a look perhaps... I only recently started playing with it, but it looks somewhat promising.

Link to comment
Share on other sites

Hmm, might take a little forward thinking, but that shouldn't be too hard to pull off.

 

But for simplicity sake, what about using a 4096x texture? No normalmap or anything, just the diffuse by itself. It'll end up being huge, of course. But with it just being a single texture, it shouldn't be too much of a drain on performance. Think it's feasible?

 

Erm, why not use Doom's MegaTexture feature? (Ok, I admit, I have no idea if it works in TDM; but it looks like it solves exactly this problem).

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Something that might help you mock it up quickly is Aliencodec's Plantlife...

 

Looks pretty cool. I'll try the demo out and see how she does. I've also been using Modo's nifty fur features to make the grass textures. It's a helluva lot easier than going in and painting out individual blades of grass in Photoshop, but I haven't been able to get a nice, realistic set of grass out of it yet.

 

Erm, why not use Doom's MegaTexture feature? (Ok, I admit, I have no idea if it works in TDM; but it looks like it solves exactly this problem).

 

Man, if I had access to Megatextures, I wouldn't be having this discussion. I'd be out doing my thing with a goofy grin on my face. Thing is, unless something's changed I wasn't aware of, the version in Doom 3 was just a testbed for the technology, and didn't get properly integrated into the engine until Quake Wars.

Link to comment
Share on other sites

A fan-team got it integrated and working in Doom 3. There's a link somewhere in these forums (search "megatexture" of course), or do a search at Doom3World.org where their original thread was. It's not as polished as Quake Wars iirc, but it does look very cool. You can download and play their test-map with it, too, and there's also a YouTube video showing it if you search "Doom 3 megatexture" on YouTube.

 

I think one draw-back (again iirc) is that the megatexture doesn't compress in their version like it does for Quake Wars: ET, so it can get quite large depending on just how big a megatex you're making, which also adds to load time. But the one they used wasn't too big, the filesize wasn't great but not the worst, and it still covered a lot of ground and looked pretty good.

 

I think it would be awesome, aside from the coolness of having a megatexture in a Darkmod FM at all, if someone could getting it working in a Darkmod map just to prove it can be done, and then hopefully they write up a little tutorial on it for posterity. That is, I think it's worth going for it if you're interested, even if you're not sure if it's the best solution in the end. Somebody needs to try it sooner or later. (And talk to the original guys that did it for technical guidance.)

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

You can find the map etc over here :

http://doom3.filefront.com/file/Megatexture_Technology_Mod;80169

 

From what it says you will just need to move the shader over and make sure materials are correctly defined. If you compress well I think it would be quite good for the ground texture.

 

jcd might have some ideas/things to say about megatextures, worth poking him :)

Link to comment
Share on other sites

Well there we go. Now I just have to figure out how to apply it to a mesh, reference the mesh to the megatexture, and hell...make the megatexture itself. Based on the little I've read, it sounds like you're slapping together a bunch of 2048x textures and using the ReactorEngine EXE inside the zip to produce a combined massive 16k*16k res texture.

 

I'll need to read up on it some more, but so far, this is damn promising.

 

edit: the readme file isn't exactly too helpful here. It tells you how to extract and convert a file to a megatexture, but not from what or where. And unfortunately, the original creator's website is down. Looks like I've got alot of trial and error fun ahead of me.

Link to comment
Share on other sites

Now that I've done a little bit of reading, I believe I'm starting to understand how this works. See, Megatextures, at least as they are in Quake Wars, are organized by nodes before the final bake. For example, you start out with a base texture that covers all your geometry, like sand for instance. That's node 1. If you want some grass in there, that's node 2. You can then go and start painting, dabbing, transitioning, ect. Want some rock? Node 3. It goes on and on, and I think you can have as many nodes as you want.

 

Now before you start painting, you have a few modifiers you can play with. Like where one texture ends and the other begins is marked by a height, the smoothness of the line of demarcation between textures is a ramp, where textures go based on steepness is slope, and the smoothness of transition is blend. All this neat stuff, nodes and all is grouped under what's referred to in engine as the surface tree.

 

Now after all is said and done, the end result of all this rather easy to understand technojargon is you're basically painting stuff, adding more textures to paint on more stuff, and throwing around a few modifiers to help you out a bit. In short, it's alot like the system used to paint terrain in Oblivion or NWN2, cept you have no limits on anything, and the end result is baked into one giant contiguous texture.

 

It gets a little more complicated in Doom 3. There aren't any tutorials anyway, so I have to take information as I get it. But it looks like you're doing all of this via text, with no real control over what goes where. This is what I've gleamed off the readme, and a few files inside the zip. It doesn't seem too terribly promising. I'm hoping you can make an uncompressed megatex in Quake Wars and simply throw it over into Megagen to be ported into Doom 3. If you can't, it might just be better to fall back on the tried and true methods.

 

For now, I think my best bet is to post a message on Doom3World and see what answers I get. Wish me luck.

 

edit: figures I figure out something new right after posting this. It looks like you can export a small version of the megatexture, edit it somehow in photoshop, then port it back in to get then full res treatment. That'll help out tremendously, though I'd prefer to be able to play with it on a mesh.

 

...maybe I can. Since I'm building the terrain off a heightmap built in a 3D program. I could take the original model, UV it, then overlay a slightly larger version of the exported mini megatex (like 4096x) to paint on detail.

 

It's starting to make a little more sense now. But I think if people want to do their own megatextures inside of TDM, they'll have to get at least fairly decent at using Blender or something similar.

Link to comment
Share on other sites

A little update. I've been harassing the guys at Doom3World on how to do megatextures in D3. So far, it seems very possible, and might actually be very handy once I figure out the ins and outs of the thing. The only downside is I don't have the amount of control I'd like. I can't just go in and paint stuff. I have to make textures and set them up according to slope and height.

 

On another note, I figured I'd try to see how making a landscape out of multiple meshes with a single texture would turn out. This approach might actually end up to be pretty feasible if I do it properly. Right now, I'm playing around seeing what I can do and get some good practice in, and came up with this. The texture is a little big at 2048x, but since I don't want to add a normalmaps or a specular, I could easily get away quite a few DXT compressed textures that large and have it barely take up any memory. With all the detail I'm planning on adding, you probably wouldn't notice that they're not normalmapped. And the mesh? Just 242 tris. I could make an entire cliffside and end up with less geometry than that stupid lamp I made a little while back.

 

Course I'd rather have access to fully paintable megatextures, but we'll see what happens. Just got back from Doom3World. Detailed paintable megatextures are a go. :D

Link to comment
Share on other sites

That single-texture landscape is looking pretty good. It's going to help for having outside missions to have some believable landscape like that.

 

And it's great you're keeping us updated on the megatexture stuff. Detailed paintable megatextures sounds fantastic! I hope you can eventually put together a tutorial for everything you're learning. This is something that could raise the bar for all FMs.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

And it's great you're keeping us updated on the megatexture stuff. Detailed paintable megatextures sounds fantastic! I hope you can eventually put together a tutorial for everything you're learning. This is something that could raise the bar for all FMs.

 

I'll give you a basic rundown on how I think it works. Keep in mind this is all halfassed conjecture and semi-educated assumptions, so I could be making this far more complicated than it needs to be. To get to it, Tron over at D3W said you can use multiple masks to achieve more control in your megatexture baking. So with that now known, I think there are two ways I can get a usable texture out of Megagen.

 

One. You design your landscape texture in layers. Like you take a single texture in your 3D paint program, tile it a bunch of times, add a black mask, and start splashing in detail on your mesh using a white brush. This is emulating the aforementioned node system, and you'll tell the generator via text file something like "This is mask 1, I want it to reference sandstone. This is mask 2, I want it to reference grass". Depending on how detailed you want to go, you'll end up with anywhere between 3 to 50 masks that you bake into the final product.

 

Two. This is the one I'm hoping works, because it'll net me the most control. You design your maps in chunks like what I did above. When your finished modeling and painting your entire landscape, you'll want to take all your chunks, rescale and organize your UVs, then export a mask of each individual UV chunk by itself that references whatever corner of the UV you placed that particular chunk, then finally weld your mesh together. If you go by my scale, you'll end up with roughly 64 textures that each contain a single UV referencing one of your chunks. You bake that, and get the exact texture you painted. The downside to this is that it's slightly time consuming, require exacting precision with your scaling and placement, and probably take forever to bake and eat a metric fuckton of ram. The upside is you know exactly what you're gonna end up with.

 

I'm gonna experiment with method two by making 3 more chunks and trying to render a 4096 megatexture. If it works, it'll be my preferred method.

 

Ultimately though, it might be complicated to the point that only the most stalwart, brave, and skilled will want to attempt it. Now in a perfect world, I'd try to get some genius programmer type to look through the pre-exported megagen files from Quake Wars and see if he could whip up something from that based around megagen. After all, everything Carmack does, from textures all the way to map files, either reference or produce a readable text file. If it contained pertinent information, said genius programmer type could reverse engineer something that'd allow people to use the QW world builder to make maps for Doom 3. I have no idea who'd be willing to do that, so for the time being we're stuck to the abovementioned methods.

 

And I'm still not sure how you edit around the finished product. Like how will I place my grass, my building mesh, my throwaway details, my light placement? Is D3Radiant secretly able to display megatexture files? I dunno. I still have alot of questions here that need to be answered.

Link to comment
Share on other sites

DarkRadiant wouldn't have such support, but Doomedit should in theory display anything that displays in Doom 3. I think.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Moving decal meshes with pixelshaders and very small subtle particle emitters? That'd be my only idea. Maybe you could have a look at Crysis and its editor or some presentations about Crysis. Might find some valuable information.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 1 reply
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
×
×
  • Create New...