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.

Dark GDK / Texturing a model in dark gdk

Author
Message
jontepd
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: Sweden
Posted: 9th Oct 2009 23:26
I'm new to modelling and I've recently finished my 1850's style cannon model. Since I can't texture yet I have applied a few of the premade materials in 3ds max and exported them to a texture file. When I load up my cannon in dark gdk using the dbLoadObject command it appears as it should, though white. I figured I should use the dbTextureObject command to apply my texture to the cannon. However the texture seems to get very small and repeat itself a bunch of times instead of covering the whole cannon just once.

Any help would be greatly appreciated.
Posting screenshots of what the cannon looks like rendered in 3ds max, what the texture looks like, and what the cannon looks like in dark gdk when I have applied the texture.

What the cannon looks like rendered in 3ds max.


What the texture file looks like.


What the cannon looks like in Dark GDK with the texture applied to it.
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 10th Oct 2009 00:28
Try messing around with this function:
Quote: "dbSetObjectTexture
This command will set different texture modes used by the specified object. Every texture is painted onto an object using an internal set of values called UV data. This data contains a range of real numbers from zero to one. Zero specifying the top/left corner of your texture and one being the bottom/right corner of your texture. When an object uses UV data greater and less than this range, you are permitted a number of texture wrap modes to describe what should happen to paint these areas. Setting the Texture Wrap Mode to zero will use the default wrap mode which repeat the pattern of the texture over and over, a mode of one will mirror the texture to create a seamless texture pattern and a mode of two will set clamping which retains the colour of the last pixel at the textures edge and paint with that throughout the out of range area. The Mipmap Generation Flag is used to ensure the image has a mipmap texture. A mipmap is a texture that has many levels of detail, which the object can select and use based on the objects distance from the camera.

Syntax
void dbSetObjectTexture ( int iObject, int iMode, int iMipMaps ) "

(It's from the documentation

Your bedtime story is scaring everyone
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 10th Oct 2009 01:21
I think the problem is that the model has lost it's UV data entirely. Perhaps you should try exporting the model in a different format and see if it fixes the problem.

Essal
18
Years of Service
User Offline
Joined: 15th Jan 2006
Location: inside your webcam, watching YOU.
Posted: 10th Oct 2009 02:48
Try exporting your model as a .x file, and then make sure the "Copy Textures" button is checked, in the nice little popupmenu with your exporting settings (assuming you are using Pandasofts .x exporting plugin)
You don't need the textures as one single texture, since multitexturing is supported in darkgdk, as far as i know.

Don't know if this helps at all.

jontepd
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: Sweden
Posted: 10th Oct 2009 13:35 Edited at: 10th Oct 2009 13:46
Yeah, I'm using the pandasoft export plugin. I tried checking the "copy texture map" option, however that did not give me any texture files..

I also tried toying around with the dbSetObjectTexture command but the cannon looked pretty much the same no matter what i tried.
Essal
18
Years of Service
User Offline
Joined: 15th Jan 2006
Location: inside your webcam, watching YOU.
Posted: 10th Oct 2009 20:58 Edited at: 10th Oct 2009 21:01
Hm. Then I suggest finding some texture images on google image search or something like that, and using them in 3dsmax to texture the cannon instead. Then it should copy those textures to the same folder you export your .x file, and it should be textured automatically when you dbLoadObject .

Just do a search for some wood textures, and some dark metal textures.

I find alot of great textures on the texture sites out there, that are royalty free for any use, and I highly recommend it if you really can't texture.
I can texture a bit, but since the project i'm doing mostly is to get some experience with Dark GDK, I almost only use textures from various websites.

Login to post a reply

Server time is: 2024-11-20 13:35:52
Your offset time is: 2024-11-20 13:35:52