Page 1 of 1

blender texture drawing

Posted: Tue Nov 20, 2012 8:14 am
by pera
Im making terrain in Blender, and I would like to draw patches of grass over the dirt that blend softly one over another. So far I know how to apply texture to each face, but that makes sharp transition between areas of dirt and grass. Im asking here because I want result to be exported to X format and loaded to Irrlicht, not some special Blender technique that can not be loaded to Irrlicht.

Also, textures need to be repeated over, not just one big texture over whole terrain. Please give me some links and hints and keywords..

Re: blender texture drawing

Posted: Tue Nov 20, 2012 8:45 am
by ACE247
You would have to try splattmaps. You can draw them in Blender and export the stencils for every texture on your terrain. But you will have to use a shader to render them. Or else you would have to uv map a full resolution terrain texture but thats not very suitable/good.
Have a look at this:
http://irrlicht.sourceforge.net/forum/v ... =9&t=38676
Also there are dx shaders in the post somewhere I think.
As youre using irr 1.6 though you dont need to fix the shader texture constant from float to int though.
Just thought Id mention that, incase you get weird render results.

Re: blender texture drawing

Posted: Tue Nov 20, 2012 9:41 am
by pera
thank you for quick reply! This is new to me all together, will have to spend some time to use it. I never used shaders before, and was hoping to postpone it, but it seems theres not other way, yeah one big texture would be lousy solution.

Re: blender texture drawing

Posted: Tue Nov 20, 2012 11:47 am
by Cube_
Ehrrmmm... with apply a texture to each face, do you mean
a) selecting a face and assigning a texture to it manually
or
b) Unwrapping the model and texture painting it, in this case there *shouldn't* be any sharp transitions.

Re: blender texture drawing

Posted: Tue Nov 20, 2012 12:46 pm
by ACE247
aaammmsterdddam.... Now think a bit of what you wrote. When you texture paint it, what actually happens? You get one huge texture and thats not very viable when working with a terrain.

Re: blender texture drawing

Posted: Tue Nov 20, 2012 1:20 pm
by pera
I meant a)
I just learned b)
and now I must seek c) to make it right.

Re: blender texture drawing

Posted: Wed Nov 21, 2012 12:54 pm
by Cube_
@ACE247
That really depends on the terrain size. (which is directly related to the kind of game being made, an arena based FPS could use a big texture or two without a problem)

Re: blender texture drawing

Posted: Mon Dec 03, 2012 10:24 pm
by Dareltibus
use parallax grass drawed on cubes. or just drawed above the terrain offsetted again from ground level.
You *JUST* need a different texture for each triangle of the offsetted terrain, but result will be real-looking.

Re: blender texture drawing

Posted: Thu Dec 27, 2012 2:03 am
by christianclavet
Hi, Pera.

There is also one other solution (no code, but modeling work): you can create your terrain in "tiles" and use a texture for each tile. Just paint each texture as needed.

So a 2x2 tiled terrain would need 4 textures. (Each could be of 1024x1024 pixels and would be still manageable).
I don't know how to select a different Texture id in Blender, but in MAX, I would select groups of polygons to define a "tile" and assign them a different material ID for each "tile", then in the material editor would assign a different texture for each material ID.

You don't need to create your tiles separately (as a model for each tile), this can be contained in a single model, the idea is to define different material id to sets of polygons that are defining "the tile" and assign them a different texture. If you make your tiles separately, you will have the extra problem of "sewing" them after... (As we have to do in IRB)

The only drawback of using this, is for having a big terrain with "crisp" details you will need lots of tiles, (ex: 10x10 terrain, having each tile sized 250 units each, so 100 files of textures to paint. and the mesh would need 100 material ids). Using shaders to use splatting and color masks will allow you to use bigger sized terrain segments.

Doing a single mega texture for the whole thing is nonsense anyway. (You will still have to use a similar approach even with shaders with your terrain if you want it to be big)

Another thing that I was thinking is to use the "Decal node" from the forum and "decal/paint" road segments or other stuff on the map with it.
http://irrlicht.sourceforge.net/forum/v ... =6&t=44968