Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / SetObjectMeshFromMemblock

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 22nd Apr 2017 00:21 Edited at: 22nd Apr 2017 00:25
I was just about to start on a function to (see below) which required the manipulation and addition of points in an object.
Not having tried this before in AppGameKit, I was wondering how anyone has got on with this and more importantly, does it all work as expected?

I'm only going to attempt something simple here - a function to fold a plane around a corner, so changing a plane to a corner like the example below.

So, like I wanted to add 2 more points and set the positions of the other points thus.

Should be a doddle, right?

Attachments

Login to view attachments
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 22nd Apr 2017 00:37
Actually, looking into this a bit more, it would probably be easier to make a 6 pointed plain and manipulate the outside points?

Inserting points seems like it would be a nightmare!
programming is ace
User Banned
Posted: 22nd Apr 2017 09:35
I researching and trying to achieve something similar, so will be in interesting thread to follow.

programming is ace
User Banned
Posted: 22nd Apr 2017 10:14
What you trying to achieive,.... with the cube.

it maybe look like you wanting to create a cube as such with individual planes, so that can apply individual a Skybox textures.

Top, Right, Bottom, Left, Back

If google "Skybox images" youll see what I mean

and then apply them to the appropriate planes to look like a true sky box?

Maybe???
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 22nd Apr 2017 16:44
No, not a skybox

I'm making a decal object which can go around corners. The idea is to move the 2 middle points on either axis so as one face gets bigger, the other gets smaller.

You know that annoying decal effect where it can stick out over a convex corner or gets clipped in a concave?

My idea was to basically have a folding plane which I can use for a variety of purposes.

Resizing it won't work as the texture would be distorted.
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 22nd Apr 2017 21:37 Edited at: 22nd Apr 2017 22:41
Sure you can achieve this by manipulating the vertices but I got an Idea using 3D Textures achieved by a shader.
Like so: http://cdn.wolfire.com/blog/decalgeom/decalcheckerboard.jpg
But instead of projecting a 2D texture onto a 3D object we could calculate a 3D texture in a shader.
I did it years ago and achieved something looking like marble and wood.

I will probably look into screen space decals...but I can't promise anything.

Using AGKv2 Tier1
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 23rd Apr 2017 00:49
The shader option is definitely more elegant.

My idea has gotten more unlikely due to the need to post-scale the decal which adds more issues.

Login to post a reply

Server time is: 2024-11-24 16:23:33
Your offset time is: 2024-11-24 16:23:33