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 Professional Discussion / Sprites in 3D/Difference between a limb and a mesh?

Author
Message
Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 8th Feb 2012 01:06
Hi all,

This thread has two questions, hopefully someone can answer. I'll start off with the easier of the two questions first:

1.) I want to work with vertexdata in the near future here, and I was wondering... what's the difference between a limb and a mesh? Also, how are the vertexdata commands supposed to be used?

Part of the reason I'm asking for #1 is because I want to make an OBJ file loader in DBPro.

2.) Is there a way to use sprites in 3D where it's not just for a HUD, but apart of the 3D scene with full collision detection application?

I want to make a game with a 3D world being loaded using OBJ files, and the characters be 2D sprites, per se. I might have to create a 2-triangle quad and use the vertexdata to modify the U,V texture position for the triangle to show each frame correctly.

Thanks!
Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 8th Feb 2012 03:03
Oh, one more question on that: If I have to go with the two-triangle method, is there any way I can alpha-map the sprite so that only "non-tranpsarent" colors will show up?
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Feb 2012 03:18 Edited at: 8th Feb 2012 03:22
A limb can be one of two things in DBPro:
1) An instance of a mesh on an object.
2) A single bone in an animated mesh on an object.

The first type is easy to make procedurally from DBPro, the second is not. IanM's matrix1utils plugin collection has commands to make new objects more easily (see his "make object new" command), otherwise you have to use a rather hacky (and slower) method of calling "add mesh to vertexdata" and "delete mesh from vertexdata".

For 3d sprites, you can just use planes ("make object plane") and either alter the texture coords or change the texture appropriately. You can use "set image colorkey" before loading an image to make a particular colour in the image transparent, or even better, use an image format such as .png which has support for alpha built in. You will need to enable the transparency option on the object in any case (set object transparency).

[b]
Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 8th Feb 2012 03:42
Thanks! I think I'll use matrix1utils. I had it at one point, but I ended up having to reformat a few times and lost it. xD
Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 9th Feb 2012 04:28
Hey, I am looking at IanM's Matrix1Utils help file, and I'm wondering... which vertex format uses UV Texturing as well as XYZ coordinates for CREATE MESH NEW? Also, How would I edit the mesh? Using Vetexdata commands?

Login to post a reply

Server time is: 2026-07-10 06:07:02
Your offset time is: 2026-07-10 06:07:02