General 3D mesh question

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.

General 3D mesh question

Postby primem0ver » Sat Mar 12, 2016 4:37 am

I have theorized on a new approach to creating truly spherical 3d worlds made of tiles that could be used for a turn-based strategy game that would allow much more realism, flexibility, and mod-ability than traditional tile based strategy games like Civilization. The problem is that I don't know if it is possible to use a mesh like a "texture" when it comes to laying them out.

The idea is to create sets of triangular and/or diamond shaped tile meshes and textures that are used to make more traditional tiles. Here is the question that would determine if this idea is sound or not. Can a mesh be stretched by a 3d graphics engine? The bounds for stretching would not be extreme. Simply enough to make both hexagons and pentagons (or even squares) of slightly different measurements (determined by a specific grid pattern algorithm) out of the triangles/diamonds in question.
primem0ver
 
Posts: 53
Joined: Sat Oct 11, 2014 11:07 pm

Re: General 3D mesh question

Postby mongoose7 » Sat Mar 12, 2016 5:14 am

Do you mean like node->setScale()? If you use parallax mapping, you have to change the parameter when you scale.
mongoose7
 
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: General 3D mesh question

Postby hendu » Sat Mar 12, 2016 9:41 am

You will need some sort of batching or instancing, thousands of tiles and each tile made of several meshes.
hendu
 
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: General 3D mesh question

Postby primem0ver » Sun Mar 13, 2016 3:05 pm

mongoose7 wrote:Do you mean like node->setScale()? If you use parallax mapping, you have to change the parameter when you scale.

Not exactly. Think of it like a texture. A trangle texture can be stretched slightly without a huge difference in appearance if the shape is not too different. There would a bit of distortion but not enough to really make things look wrong. Say for example i made a texture that was supposed to go on an equilateral triangle. However, the triangle I fixed it too was not quite equilateral. Each side has a slightly different length. Now apply the same basic concept to a whole mesh rather than just a texture. Each of the points in the mesh would need to be adjusted slightly to adjust for the length of each individual side.

hendu wrote:You will need some sort of batching or instancing, thousands of tiles and each tile made of several meshes.

You mean create a generic shape and then mathematically create a new mesh for each instance? How would that affect performance of the final product? Using hundreds of thousands of mesh instances versus one?
primem0ver
 
Posts: 53
Joined: Sat Oct 11, 2014 11:07 pm

Re: General 3D mesh question

Postby Mel » Tue Mar 15, 2016 2:30 am

Hmm... a matrix transformation sounds enough for me. If you can model the proper transformation, it is posible to perform any modification to those triangle tiles. What transformation? i can't think of any suitable at the moment...

Then, of course, you have the problem of building the levels in which you would have to batch the content so there isn't thousands of drawcalls instead of a few
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 2273
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain


Return to Everything 2d/3d Graphics

Who is online

Users browsing this forum: No registered users and 1 guest