Corrado
Member
|
Brush and Water
Hello Grzeg,
I have some questions :
1) Its possible to have to use in C++ the following :
Height brush, Paint brush, Lakes and Rivers ? (You already have in World editor).
2) When a better water with the following :
a) Better quality
b) Good Waterfall
c) Waves and foaming at the passage of boats
Thanks and Bye,
Corrado
|
|
01-31-2010 11:11 AM |
|
Esenthel
Administrator
|
RE: Brush and Water
Hello,
I very suggest using the World Editor.
but if you want to use manual editing
height brush - yes
paint brush - what you mean by that?
lakes and rivers - yes, WaterArea class
2.
a- if you can show me that you've made a custom better shader for water (using custom shaders), than I can add some functions to replace water shaders with your own
b- please use custom shader or custom particles
c- its on my list, but it will not be available anytime soon, other things have greater priority
|
|
01-31-2010 05:19 PM |
|
Corrado
Member
|
RE: Brush and Water
Hello Grzeg,
1) Tks : i wait for the height brush and lake+river sample code.
Paint brush : a brush to paint on the terrain surface.
2) About the water : simply i see some engines with better water (like for example unigine engine).
Bye,
Corrado
|
|
01-31-2010 06:48 PM |
|
Esenthel
Administrator
|
RE: Brush and Water
1.
you can adjust mesh vertex positions by
REPA(mesh_base.vtx)mesh_base.vtx.pos.y+=value
then call mesh.setRender
or you can adjust heightmap image
REPD(x,gfx.x())
REPD(y,gfx.y())
{
Flt h=gfx.pixelF(x,y);
h+=value;
gfx.pixelF(x,y,h);
}
as for WaterArea, just call 'create' from custom mesh, and then draw in RM_WATER mode,
please check method comments
|
|
01-31-2010 08:10 PM |
|
Corrado
Member
|
RE: Brush and Water
Hello Grzeg,
Thanks for the code about the height brush and river/lake. Now im wait for the code of the paint brush (with a material).
About the water : have you see the unigine engine water (example : tropics demo) ? This water has also foam next to the coast and the water color depends on the color of the terrain under the water.
Tks and Bye,
Corrado
|
|
01-31-2010 08:20 PM |
|
Esenthel
Administrator
|
RE: Brush and Water
each mesh part can have only 1 combination of materials, for example
MeshPart::setMaterial(mat_a,mat_b,NULL,NULL);
then
you set blend values for the materials per vertex
mesh_base.vtx.material[0].set(128,128,0,0); // 0.5 blend for mat_a, 0.5 for mat_b
mesh_base.vtx.material[1].set(64,255-64,0,0); // 0.25 blend for mat_a, 0.75 for mat_b
and
mesh.setRender()
|
|
01-31-2010 08:25 PM |
|
Corrado
Member
|
RE: Brush and Water
tks but ...
... in your world editor i can select a material brush and then paint the terrain with it. Now i ask you, if its possible, to have a function like this :
PaintTerrainCircle(Vec2 center, float dim, *Material mat) or similar
to paint the terrain surface.
Many thanks
Corrado
|
|
02-02-2010 08:27 PM |
|
Esenthel
Administrator
|
RE: Brush and Water
No, there is no such function.
If you need such a function you'd need to implement it manually according to your own data architecture.
|
|
02-02-2010 08:39 PM |
|
Corrado
Member
|
RE: Brush and Water
... and what kind of Function you have in your World Editor to Paint the terrain with a brush ?
|
|
02-02-2010 08:46 PM |
|
Esenthel
Administrator
|
RE: Brush and Water
World Editor operates in the same way in which I have described above.
by setting the vertex data manually.
|
|
02-02-2010 08:59 PM |
|