Manual Geometrik Mesh Generator
- sphinkie
- Greenskin
- Posts: 114
- Joined: Wed Jul 07, 2004 11:08 am
- Location: Paris
- x 1
- Contact:
Manual Geometrik Mesh Generator
Hello guys
I was looking for a piece of code to create planets during runtime.
I have used the MeshSphere written by snowblind in the wiki.
And modified it to create geospheres (better for planets, because of the pole texturing management).
I have created a generic class named GeometricMesh that can be derived into Mesh_Cube, Mesh_icosa, Mesh_sphere, and other simple shapes.
Then I have created a generic class named Geodesic that can be derived into Mesh_GeoSphere, Mesh_Geoellipse and other complex geodesic shapes (class 1 and class 2 shapes).
My question:
- Do you think this can be usefull to someone, and this is worth to be shared ?
- As there are many files, what is the best way to share it ? (wiki is not very appropriate for 10/12 files, I believe).
I can add some screenshots if necessary.
Thanks
I was looking for a piece of code to create planets during runtime.
I have used the MeshSphere written by snowblind in the wiki.
And modified it to create geospheres (better for planets, because of the pole texturing management).
I have created a generic class named GeometricMesh that can be derived into Mesh_Cube, Mesh_icosa, Mesh_sphere, and other simple shapes.
Then I have created a generic class named Geodesic that can be derived into Mesh_GeoSphere, Mesh_Geoellipse and other complex geodesic shapes (class 1 and class 2 shapes).
My question:
- Do you think this can be usefull to someone, and this is worth to be shared ?
- As there are many files, what is the best way to share it ? (wiki is not very appropriate for 10/12 files, I believe).
I can add some screenshots if necessary.
Thanks
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Sphinkie, this is definately wanted! 
It goes directly into OgreOpcode.
If I may.
And OGRE Wiki of course.
If you think so.

It goes directly into OgreOpcode.

If I may.

And OGRE Wiki of course.

If you think so.

/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- SpannerMan
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
- Contact:
- sphinkie
- Greenskin
- Posts: 114
- Joined: Wed Jul 07, 2004 11:08 am
- Location: Paris
- x 1
- Contact:
jacmoe: yes, you can use it for ogreopcode, but wait a little bit maybe, because I have to clean the code first ...
I have created the wiki page here, http://www.ogre3d.org/wiki/index.php/GeometricMesh
but it's not finished yet.... I'll need a few days .
I have created the wiki page here, http://www.ogre3d.org/wiki/index.php/GeometricMesh
but it's not finished yet.... I'll need a few days .
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Unclean code fits right into OgreOpcode!sphinkie wrote:jacmoe: yes, you can use it for ogreopcode, but wait a little bit maybe, because I have to clean the code first ...

Could be very cool to have this in RC1 (to be released by the end of May).

/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- sphinkie
- Greenskin
- Posts: 114
- Joined: Wed Jul 07, 2004 11:08 am
- Location: Paris
- x 1
- Contact:
OK: I am posting the sources files today (in the wiki) but be aware that this is not a final version.
I have called it WIP-01 and be aware that some comments will not be up-to-date, and that the source files may contain some functions or class that are unused...
The source files are doxygen compatible.
With this, you can have an an idea of what the library can do, and how to integrate it in your projet.
I have called it WIP-01 and be aware that some comments will not be up-to-date, and that the source files may contain some functions or class that are unused...
The source files are doxygen compatible.
With this, you can have an an idea of what the library can do, and how to integrate it in your projet.
- sphinkie
- Greenskin
- Posts: 114
- Joined: Wed Jul 07, 2004 11:08 am
- Location: Paris
- x 1
- Contact:
Well, it is done.
The version 1.0 is now available on wiki.
http://www.ogre3d.org/wiki/index.php/GeometricMesh
Enjoy
The version 1.0 is now available on wiki.
http://www.ogre3d.org/wiki/index.php/GeometricMesh
Enjoy
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Wow, this is really appreciated! 
Looking forward to tinker with that code.

Looking forward to tinker with that code.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- batomaeus
- Kobold
- Posts: 33
- Joined: Fri Jun 23, 2006 1:21 pm
- Location: St. Augustin, Fraunhofer Institute for Autonomous Intelligent Systems, Germany
- Contact:
- sphinkie
- Greenskin
- Posts: 114
- Joined: Wed Jul 07, 2004 11:08 am
- Location: Paris
- x 1
- Contact:
- batomaeus
- Kobold
- Posts: 33
- Joined: Fri Jun 23, 2006 1:21 pm
- Location: St. Augustin, Fraunhofer Institute for Autonomous Intelligent Systems, Germany
- Contact:
no, i didn't change the code (except that I commented lines like
TRACE(". mTriangles["+ITOA(index)+"].cornerA = "+ITOA(i));
out, because my linux-compiler didn't like the ITOAs).
For me, both pictures seem to be not OK: The rays in the wireframe-pic that radiate from the center of the sphere are not intended, they were generated from the sphere-class (as well as the rects in the first view). They are also flickering. Strangely, these rays (and also the surfaces if wireframe is not activated) are sometimes there, sometimes they dissapear - this also depends on the initial position of the camera.
TRACE(". mTriangles["+ITOA(index)+"].cornerA = "+ITOA(i));
out, because my linux-compiler didn't like the ITOAs).
For me, both pictures seem to be not OK: The rays in the wireframe-pic that radiate from the center of the sphere are not intended, they were generated from the sphere-class (as well as the rects in the first view). They are also flickering. Strangely, these rays (and also the surfaces if wireframe is not activated) are sometimes there, sometimes they dissapear - this also depends on the initial position of the camera.
Enter any 11-digit prime number to continue...
- sphinkie
- Greenskin
- Posts: 114
- Joined: Wed Jul 07, 2004 11:08 am
- Location: Paris
- x 1
- Contact:
strange...
I didn't see these artefacts before.
I just remember there is a bug with some even frequencies.
Also, I am using Ogre 1.2.0 with MS-windows.
Also, now, with the new functionnality of Ogre (called "MeshFactory" if I remember well), this component could surely be rewritten more efficiently.
Sorry, but I can't help you more, I'm leaving for 1 month holydays....

I didn't see these artefacts before.
I just remember there is a bug with some even frequencies.
Also, I am using Ogre 1.2.0 with MS-windows.
Also, now, with the new functionnality of Ogre (called "MeshFactory" if I remember well), this component could surely be rewritten more efficiently.
Sorry, but I can't help you more, I'm leaving for 1 month holydays....

- sphinkie
- Greenskin
- Posts: 114
- Joined: Wed Jul 07, 2004 11:08 am
- Location: Paris
- x 1
- Contact:
- detox
- Greenskin
- Posts: 103
- Joined: Thu Sep 07, 2006 1:13 am
- Location: Ohio, USA
- Contact:
- :wumpus:
- OGRE Retired Team Member
- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1
This tends to happen if the vertex buffer is larger than what goes into it (so vertices are created from random data), or some buffer overflow occurs. For example, rendering a larger range than represented the vertex buffer.batomaeus wrote:no, i didn't change the code (except that I commented lines like
TRACE(". mTriangles["+ITOA(index)+"].cornerA = "+ITOA(i));
out, because my linux-compiler didn't like the ITOAs).
For me, both pictures seem to be not OK: The rays in the wireframe-pic that radiate from the center of the sphere are not intended, they were generated from the sphere-class (as well as the rects in the first view). They are also flickering. Strangely, these rays (and also the surfaces if wireframe is not activated) are sometimes there, sometimes they dissapear - this also depends on the initial position of the camera.
You should check the buffer sizes, draw ranges etc...
-
- Gnoblar
- Posts: 5
- Joined: Fri Oct 12, 2007 3:06 pm
-
- Gnoblar
- Posts: 6
- Joined: Tue Jan 06, 2009 2:30 am
Re: Manual Geometrik Mesh Generator
Better, can you give a real, useable link for the rest of the community?
Thanx in advance.
Thanx in advance.
-
- Halfling
- Posts: 63
- Joined: Wed Feb 06, 2008 1:02 am
Re: Manual Geometrik Mesh Generator
The link to this code appears to be broken (again by the looks).. Does anyone have a link to it that works still, or a copy of the code?
jacmoe, did you end up getting a copy of this for Ogre Opcode? (I downloaded the latest Ogre Opcode source, but couldn't see it there)
Any help is *really* appreciated..
Thanks,
jacmoe, did you end up getting a copy of this for Ogre Opcode? (I downloaded the latest Ogre Opcode source, but couldn't see it there)

Any help is *really* appreciated..
Thanks,
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: Manual Geometrik Mesh Generator
Unfortunately not 
I am not even sure if I've got it lying around somewhere, but I'll keep it in mind..

I am not even sure if I've got it lying around somewhere, but I'll keep it in mind..
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Halfling
- Posts: 63
- Joined: Wed Feb 06, 2008 1:02 am
Re: Manual Geometrik Mesh Generator
Anyone?
Any ideas on where else to look to find code to generate a geometric sphere?
Any ideas on where else to look to find code to generate a geometric sphere?
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Manual Geometrik Mesh Generator
DX SDK sample code? Haven't checked but there's a lot of good code in there...
-
- Halfling
- Posts: 63
- Joined: Wed Feb 06, 2008 1:02 am
Re: Manual Geometrik Mesh Generator
okay, thanks for the feedback guys - I'll have a look through the DX SDK.