Painting Alpha-blending

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Painting Alpha-blending

Postby Lontahv » Wed Oct 03, 2007 4:13 pm

Painting Alpha-blending, it's what Cyan does and now we can do it too! :) :) :) :) :) :)
Sort of. I have a way to paint alpha in Blender so that it will show up in the game! I'll give you some tips now since i don't have time to make a full tutorial now. :)
1. duplicate the object that you want to blend
2. make th duplicate have texture you want to blend into
3. go into the texture paint section of blender and paint black where you want alpha to be
4. paint
5. go into the face select mode of Bender and then go into the UV editor and take a look at you tex with black paint dots on it
6. save it as another file such as: if your texture was called rock.jpg call your altered texture rock_with_blending.jpg
7. go into gimp (or photoshop) and get the magic wand out
8. select the black spots with the wand and get rid of it (you should have a tex with alpha holes)
9. save a .png or whatever can handle alpha
10. go back into blender
11. replace your old texture with black holes in it with your new gimped (or photoshoped) texture
12. enjoy :)
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Painting Alpha-blending

Postby Owehn » Wed Oct 03, 2007 4:34 pm

That's what Cyan does? It seems odd that they would double the counts on every object with blending. Still, that's a nice trick to use.
User avatar
Owehn
 
Posts: 132
Joined: Sat Sep 29, 2007 8:05 am

Re: Painting Alpha-blending

Postby Nadnerb » Wed Oct 03, 2007 5:02 pm

that would be this: http://alcugs.almlys.org/wiki/index.php/Blend_Tutorial

Cyan does do this, (think Gira) but they also have the ability (we do not) to vertex paint alpha values, rather than making texture blends.

Also, the method you describe has some issues. This only works effectively if you do not allow textures to repeat/tile, meaning that if you have a very large area, you will need a ridiculously large texture. Something that we really can't do due to minimum texture memory requirements.

In other words, this is a great stopgap until we can get real alpha painting.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Painting Alpha-blending

Postby Lontahv » Wed Oct 03, 2007 7:30 pm

Yes Nadnerb, you have a point but if you take a look at the textures in the game they really aren't that tiled. I think that some tiling is good but for most stuff a very small texture 512x512 is the best for a whole landscape then you use micro textures to fill in the details--i just think that if you have a micro-tex over a high quality texture it looks very bad (blotches are what you want for variation rather than high quality textures that tend to make ages look very busy real. Also full shadow maps for ages are I've found the best, say 1024x1024 for a full, alpha shadow-map. I will make an age for you and the other writers to prove my point. :)


Best regards,

Lontahv
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Painting Alpha-blending

Postby Marcello » Mon Nov 05, 2007 2:26 am

As far as I have found out by studying Cyan's ages this is not what Cyan in general does. They use several methods which I already passed on to the PRP development team:

1. Inbetween meshes:
If for instance a grass landscape has a sandy patch in the middle that is alphablended than Cyan uses three (or more) meshes. One consists of the surrounding grass, which only uses the grass texture. The second consists of a mesh surrounding the sand patch and has both the grass and sand texture. In addition they use a lineair alpha texture that blends the two together. The alpha blend on the inbetween mesh is turned per face so it has al the black on one side and the white on the other, like a ring. The middel mesh again only has sand. The meshes don't overlap!!
Example: a small patch on the front of Relto and every spot where the ground in relto blends into the rock.

2. overlapping meshes 1
Used for instance in Gira and Ercana where the path has a grind kinda rim where the rock starts. The underlying meshes actually touch each other and the grindy mesh lies on top. To make this work it is necessary to be able to set z-buffering which is something Trylon just announced to have working in the development version of the plugin.

3. overlapping meshes 2: stamp decals
All the cracks on the floor in the city, the yeesha symbol on the wall and ground in our relto hut are all second meshes on top of a wall, the ground, etc. with textures with an alpha channel. Again z-buffering is necessay to make this work. I tried at first by using a small offset on the decal mesh, but this gets really messy and doesn't always work. (actually it never worked nice ;) ).

It pays of to study the textures in Cyan's ages with PRP explorer. You will notice they use normal maps too :D
User avatar
Marcello
 
Posts: 374
Joined: Sun Nov 04, 2007 8:59 am
Location: Haarlem, The Netherlands

Re: Painting Alpha-blending

Postby Aloys » Mon Nov 05, 2007 3:34 am

About that first method: essentially this could be done with Blender now that it supports multiple UVs per mesh. this is how it looks in Relto:
http://www.didanka.com/huru/ReltoBlendSpans.jpg (the grass is in white and the rock is in black)

About that second method: we already have a tutorial on how to do this here. It usually works perfectly; and with Trylon's upcoming update to the plugin we can be sure it'll work 100% of the time.

About that third method: again it usually works but indeed there are transparency issues at times.. Again, the next plugin should help a lot..
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Painting Alpha-blending

Postby Marcello » Mon Nov 05, 2007 11:21 am

Aloys, yes method 2 and 3 (they are indeed simular) already works. I've experimented with 2, but had problems rendering and ended up with flickering objects. Z-buffering will hopefully cure this too. I tried to give Paradox and later Trylon everything I found out about method one. I made a Blender file showing the method. It works great in Blender, although it takes some time setting each part up. The most important thing is that you have to take the method into account while modelling. Preferably from the start, so everything is in the right place.

What I intend to do while modelling is not modelling the entire terrain at once, but start with the "highlights". From there on make the blend-border and then start filling the terrain up. I read in several games related modelling tutorials that that is an often used method. It's nice to use terrain editors like Bryce, but they tend to end up with too few faces where one needs more and too many where less is needed. The fill in method looked great and easy and gives much more control.

Trylon is working on it method 1. I'm sure he'll manage at some point and that we will see something in one of the releases in the upcoming months.
User avatar
Marcello
 
Posts: 374
Joined: Sun Nov 04, 2007 8:59 am
Location: Haarlem, The Netherlands

Re: Painting Alpha-blending

Postby Paradox » Mon Nov 05, 2007 7:31 pm

Actual support for alpha vertex painting is planned for the near future in the plugin.

It will work by using multiple layers of vertex painting on a greyscale.
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada


Return to Building

Who is online

Users browsing this forum: No registered users and 4 guests