2D Poly to 3D Poly


Tweet rated
(Posted 4 months ago) hardcoal

Finally I made it work.
well its an old code that was never perfect, but it seems to be now that ive fixed it.

You draw a 2D polygon, and than it builds a 2D Mesh from it.

I still dont know how to apply textures over it. and I got more ideas about it. but for now it does what it does..
I want to also make a version with Volume, and not Flat Mesh only.

I didnt post the code because its too big..

This maybe looks like a simple process, but it aint :)

https://drive.google.com/file/d/1VV5D1RQ-x9vkAkzQqUYMhvVBht-3hkCn/view?usp=sharing

(Posted 4 months ago) markcwm commented:

Hi Hardcoal,

cool, it looks like the bottom right is the drawn shape and left is the constructed mesh, but why are they different shapes, also what is the shape in the top right?

(Posted 4 months ago) hardcoal commented:

This are 3 polygons with no relation.
Before they are turned into mesh.
Only if you press T than it turns to a 2d mesh,
Which does not appear on the snapshot.
You can download the file and test this.

The ability to do what I've opens news doors to cool things that i might add later.
Youll see very soon what doors it opens.. and youll be surprised.

(Posted 4 months ago) hardcoal commented:

Now, Ive used this function i did.. To Scan Any PNG Image and Build a Mesh for it.
Than I turn it into a physical Body.. so Its good for physical Games.. or 2D mesh collision Detection..

The only problem I have is how to apply texture to this mesh..
the UV thing is not clear to me so much..

(Posted 4 months ago) RonTek commented:

The only problem I have is how to apply texture to this mesh.. the UV thing is not clear to me so much..

I am also not that familiar on how Blitz3D works with manual UV mapping so I will be looking some old archives specific to this area.

looking good btw so keep it up

(Posted 4 months ago) hardcoal commented:

Thanks Friend :)
Well its not about B3D UV mapping.. Its General Concept of UV Mapping..
Anyway.. I just Spent hours trying to create a Random Poly Creatore Function which its line Does not Intersect each other..

You know sometimes you sink into the wrong path and waste hours on it, and than you decide to completly change you approach, and you build a whole new Function in Minuts?
Well, that what just happened to me.

I spent hours trying to do something in an awkward way, when the simple way was infront of my eyes and took me minutes to make..

This poly Engine I have was created years ago.. Now Im adding more Functions to it and Giving a Collision Detection System to it.
This can be converted to Blitz3D easily if desired ..

Im doing this, for general purposes that I have and may use, Im using it on my Main editor as well

(Posted 4 months ago) RonTek commented:

Well its not about B3D UV mapping.. Its General Concept of UV Mapping..

Did you forget that this is a Blitz Forum? Subconsciously you are asking how to do it in Xors, right? which still uses Blitz..

Anyway, besides the point, that would be a vague question if you are asking it in general not too mention there's also UV mapping using shaders.

still need those snippets though since it's a good topic that is seldom discussed and demonstrated.

(Posted 4 months ago) hardcoal commented:

Xors and Blitz3D has same commands.. regarding Textures as far as I know
Yea.. ill be glad to have a Topic about UV..
I didnt know UV and Shaders are related BTW

(Posted 4 months ago) RonTek commented:

great and yes since shaders manipulate vertex and fragment (pixel) it can have the final say on rendering.

The best example of uv texturing is using shaders to make shadows.

Reply To Topic (minimum 10 characters)

Please log in to reply