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 / Texturing Meshes/Limbs

Author
Message
TheSquid
21
Years of Service
User Offline
Joined: 29th Sep 2003
Location: Ohio
Posted: 26th Jan 2004 17:37
I am having what could be considered a pretty basic problem, but I haven't been able to figure out how to fix it. I am attempting to create a forest using a tree object found in the Dark Basic media samples. Just a simple, lollipop style tree, nothing fancy. Loading about 100 instances of the tree obviously doesn't perform well. Loading the tree once and making about 100 static versions of it also doesn't perform well. From there, I made a mesh from the tree and created a new object and added 175 or so limbs to it and the performance is perfect.

Long story short, the performance code isn't my problem. Creating the mesh loses the texturing. I created a simple bitmap (64 X 64, half green half brown) and tried to apply this image to the limbs. The entire tree always comes out green. I can't seem to get the tree half green, half brown.

I'm at work right now, so I can't post code. Does anyone have any idea where I'm going wrong? Is there is a "rule of thumb" that I'm not aware of?
Stephen
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location: Appalachians
Posted: 31st Jan 2004 23:51
Make sure that when you "get image" from the bitmap that you get the full width and height of the bitmap. The easy way to do that would be to type this (x=bitmap number):

"get image x,0,0,bitmap width(x),bitmap height(x)"

Login to post a reply

Server time is: 2025-05-22 11:06:11
Your offset time is: 2025-05-22 11:06:11