terrain height painting

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Post by ACE247 »

Thanks that works now.
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

Hi,

A free 3D heightmap editor.

http://www.filefactory.com/file/b457367 ... itor03.rar

Enjoy !
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

Here the link to Clady_ColormapEditor, can be used in conjunction with
Clady3DHeightMapEditor;

http://www.filefactory.com/file/b46ge82 ... Editor.rar


Enjoy !
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

and finaly....Clady3DTerrainEditor, sculpt and paint togheter.
Is free.


http://www.filefactory.com/file/b484e74 ... Editor.rar


Enjoy !
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

next.....real time terrain painting with texture splatting (OpenGL-GLSL, 1'st, then, DirectX-HLSL). It is in working now.
How many pass do you want? (more than 3 is slowing)
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

The 02 version of Clady3DTerrainEditor.
It has DirectX mode too (9.0c) and is faster than the old version
It is free.

http://www.filefactory.com/file/b4a0c9f ... itor02.rar

Enjoy!
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

Clady3DTerrainSplatEditor with GLSL shader and HLSL shader, for both OpenGL and DirectX9.0c.

Multipass, max 4 stages;

Lightmap;

Your graphic card must have GLSL or HLSL shader capability. (>2.0);

The link :

http://www.filefactory.com/file/cadd81c ... latGUI.rar


Enjoy !!!
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

and here a new version of the old Clady3DTerrainEditor03 with fixed functions pipeline (no shader) ;

it was a bug, but fixed now (radius tool).

http://www.filefactory.com/file/cade60d ... itor03.rar


Alls of the Clady's Editors are free, for commercial or just for play with them!

Enjoy !
jfisher446
Posts: 11
Joined: Mon Mar 14, 2011 10:48 am

Post by jfisher446 »

Can't seem to get this line of the code from the first post working. Looks like the engine has changed:

if (smgr->getSceneCollisionManager()->getCollisionPoint(ray, terrainSelector, pos, Tri))

How could I modify it to work correctly? It now needs 5 params, the 5th being an outNode and I cant pass the terrainNode. How would I go about this?
virtual bool irr::scene::ISceneCollisionManager::getCollisionPoint ( const core::line3d< f32 > & ray,
ITriangleSelector * selector,
core::vector3df & outCollisionPoint,
core::triangle3df & outTriangle,
const ISceneNode *& outNode
)
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

this is a part of my wrapper code; don't care about the rest, focus to your need:

Code: Select all

DLL_EXPORT s32 DLL_APIENTRY GetXPoSArrow(ITerrainSceneNode* terrain,
											ISceneNode* arrow,
											ITriangleSelector* terrainSelector,
											ICameraSceneNode* cam,
											s32 terrscaleXZ,
											s32 terrscaleY,
											s32 terrsize)
		{

		// move the arrow to the nearest vertex ...
        const position2di clickPosition = device->getCursorControl()->getPosition(); 
        const line3df ray = SceneManager->getSceneCollisionManager()->getRayFromScreenCoordinates(clickPosition, cam);
        vector3df pos;
        triangle3df Tri;
		s32 x;
		s32 z;
		const ISceneNode* outNode=terrain;
        if (SceneManager->getSceneCollisionManager()->getCollisionPoint(ray, terrainSelector, pos, Tri,outNode))
        {
          
          static const s32 scale = terrscaleXZ;
          static const s32 size = terrsize; 
          x = (s32)(pos.X / scale);
          z = (s32)(pos.Z / scale);
         			
          x *= scale;
          z *= scale;

          arrow->setPosition(vector3df(x, terrain->getHeight(x, z) + 5, z));
        		
		}
		
	return   x;

	}
jfisher446
Posts: 11
Joined: Mon Mar 14, 2011 10:48 am

Post by jfisher446 »

Perfect. Thanks nespa. I had just figured out that I could make a const ISceneNode* outNode. but I was just leaving it hanging there without setting it to terrain. While it worked, im sure it wasn't right.
suliman
Posts: 379
Joined: Sat Sep 23, 2006 2:06 pm

Post by suliman »

Is there any way to see the code? I mean this is good stuff, but i need to expand on it to be able to make my game with it.

Erik
trivtn
Posts: 132
Joined: Tue Jan 17, 2006 12:30 pm
Location: Viet Nam
Contact:

Post by trivtn »

Thank Katsankat ! This's very helpful !
This is my terrain height and texture splating tool
Image
There's something is fantastic, there's nothing is absolute.
suliman
Posts: 379
Joined: Sat Sep 23, 2006 2:06 pm

Post by suliman »

Noone?
I would like to use this (cladys terrain) (and credits will be given of course) but there is no sourcecode.
Post Reply