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 / Help texturing a cube

Author
Message
Santman
14
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 22nd Oct 2011 00:41
Ok, this is probably not technically possible in DB, but is there anyway to apply a different texture to every side of a primative cube object? Thought cube mapping would do it (was reading a 3D rendering blog - apparently that's not cube mapping as we know it!) but that's no use. I don't REALLY want to build them out of plains (did that - frame rate halfed so stacks of code to manually hide offside faces would be needed - trying to avoid that avenue!!!) but can a cube be mapped so that different images, or different portions of an image, appear on every side???
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 22nd Oct 2011 01:02
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Oct 2011 11:58
The standard Cube in DBPro has the same texture mapped to all sides.

Quote: "I don't REALLY want to build them out of plains (did that - frame rate halfed so stacks of code to manually hide offside faces would be needed"


That really shouldn't happen, did you make each plain a limb?

The easiest way would be to make a simple cube in Wings or Blender or any 3D package, and an associated texture.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 22nd Oct 2011 12:44
It is possible to do in Dbpro using vertexdata. Take a look.




Cheers.

I'm not a grumpy grandpa
Santman
14
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 27th Oct 2011 00:45
Cheers for the suggestions, but I need to individually and dynamically bump map them too (textures, and thus bump maps, can change in real time), so don't think you can do that to limbs, can you? No use with shaders either, so not any good using another bump map shader. Still, can add them as planes and hide/show them manually as they are needed I guess, then I have total control.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Oct 2011 13:13
Quote: "so don't think you can do that to limbs, can you?"


Yes:





Quote: "No use with shaders either, so not any good using another bump map shader."


Why???

Quote: "Still, can add them as planes and hide/show them manually as they are needed I guess, then I have total control."


Yes!

Login to post a reply

Server time is: 2026-07-10 04:20:49
Your offset time is: 2026-07-10 04:20:49