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.

DarkBASIC Discussion / Extrude function

Author
Message
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 11th Sep 2008 04:28
Has anyone written a function to extrude a face/flat plain into a 3D "solid"? After a quick search, I saw that it may be possible to do it using memblocks. However, I am not too familiar with memblocks, so I was wondering if there was an alternate method.

Thanks!

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Math89
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 11th Sep 2008 13:22
I think memblocks are the only way to extrude a face. The problem is that is a really difficult task (especially if you have never used memblocks).

You first need to find the 6 vertices of a face (because a face is made of 2 triangles). Then, you move the face according its normal, and create the 4 new faces using the old and new positions of the extruded face.

The mesh memblock format is explained in the help file, you should try something simple before trying an extrusion (e.g. scrolling the texture, scaling the object...).

Login to post a reply

Server time is: 2025-06-07 06:56:18
Your offset time is: 2025-06-07 06:56:18