createCurvedPlane misses vTilling parameter

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
User avatar
jordiperezarti
Kobold
Posts: 35
Joined: Sun Sep 01, 2024 7:50 pm

createCurvedPlane misses vTilling parameter

Post by jordiperezarti »

MeshManager::getSingleton().createCurvedPlane(
"cilindre", RGN_DEFAULT,
plane,
1000, 1000, 0,5, 12, 12,
true,
1, 5, 5,
Vector3::UNIT_Z);

The compiler throws error in vTilling int (seconf number 5 in the code), is asking for the Vector3, seems is missing both uTilling and vTilling.
Someone has seen this before?

rpgplayerrobin
Gnoll
Posts: 685
Joined: Wed Mar 18, 2009 3:03 am
x 379

Re: createCurvedPlane misses vTilling parameter

Post by rpgplayerrobin »

What Ogre version are you using?

In my Ogre version it does not even compile, so I had to adjust it a bit (removing the first 5, since it made no sense to be there):

Code: Select all

Ogre::Plane tmpPlane(Vector3::UNIT_Y, Vector3::ZERO);
	MeshPtr asd = MeshManager::getSingleton().createCurvedPlane(
		"cilindre", RGN_DEFAULT,
		tmpPlane,
		1000, 1000, 0, 12, 12,
		true,
		1, 5, 5,
		Vector3::UNIT_Z);

My guess would be that your compiler just lets it compile anyway and that makes it create it extremely wrong.

From https://github.com/OGRECave/ogre/blob/m ... hManager.h:

Code: Select all

MeshPtr createCurvedPlane( 
            const String& name, const String& groupName, const Plane& plane, 
            Real width, Real height, Real bow = 0.5f, 
            int xsegments = 1, int ysegments = 1,
            bool normals = false, unsigned short numTexCoordSets = 1, 
            Real uTile = 1.0f, Real vTile = 1.0f, const Vector3& upVector = Vector3::UNIT_Y,
            HardwareBuffer::Usage vertexBufferUsage = HBU_GPU_ONLY,
            HardwareBuffer::Usage indexBufferUsage = HBU_GPU_ONLY,
            bool vertexShadowBuffer = false, bool indexShadowBuffer = false);

It shows quite clearly that you are inputting the variables incorrectly, but I have no idea why you are not getting a compile error.

User avatar
jordiperezarti
Kobold
Posts: 35
Joined: Sun Sep 01, 2024 7:50 pm

Re: createCurvedPlane misses vTilling parameter

Post by jordiperezarti »

i typed "0.5" as "0" , "5" (two values, comma)
sorry, just noise threath

MeshManager::getSingleton().createCurvedPlane(
"cilindre", RGN_DEFAULT,
plane,
1000, 1000, 0,5, 12, 12,
true,
1, 5, 5,
Vector3::UNIT_Z);

User avatar
jordiperezarti
Kobold
Posts: 35
Joined: Sun Sep 01, 2024 7:50 pm

Re: createCurvedPlane misses vTilling parameter

Post by jordiperezarti »

https://drive.google.com/file/d/1_H1FI5 ... sp=sharing

In the atached frame capture, there is an artefact in the shadows in the pole of the courved plane.
I am using splitted shadows, modulative integrated.

Can you see what is happening?

rpgplayerrobin
Gnoll
Posts: 685
Joined: Wed Mar 18, 2009 3:03 am
x 379

Re: createCurvedPlane misses vTilling parameter

Post by rpgplayerrobin »

I tried around a bit, and my suggestion to you is simply to not use that function.
The plane is acting very strange with its normals even for me. Also, it does not have tangents created either by default.

If you want geometry, instead create it in a 3D program and export it, then you will have full control.

In the Ogre source for that function, it even mentions this:

// This part is kinda 'wrong' for curved planes... but curved planes are
// very valuable outside sky planes, which don't typically need normals
// so I'm not going to mess with it for now.