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 / Problem with Dark GDK and 3D Max Studio

Author
Message
Yero008
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location: Romania
Posted: 21st Jul 2011 11:49
Hi,

When I create my level structures if i put a bump map or if I set the opacity on some of the objects when I export them (I use the Panda plug-in) they don't have bump or they are not transparent. Can I use this features with GDK or should I try to remake the textures and incorporate in them a bit of a structure detail.

Forward thanks.
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 21st Jul 2011 16:29
Use a shader or "dbSetBumpMappingOn" command for the bumpmap and for opacity you must make sure the texture has an alpha map and it should do it automatically.

Hi
Yero008
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location: Romania
Posted: 22nd Jul 2011 12:25 Edited at: 22nd Jul 2011 13:03
How do I know if my texture has an alpha map?
Also I tried using dbSetObjectTransparency(object,30); and it also doesn't work, the object is not transparent.
I tried texturing the object with a .png that i set the opacity to 30% but it's not transparent it whitens the image.
What should I do?
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 22nd Jul 2011 17:13 Edited at: 22nd Jul 2011 22:45
30 is not a valid transparency flag. With dbSetObjectTransparency, you should use a flag between 0 and 6, the meanings of which are not documented in the Dark GDK help. Here is a quotation from Dark Basic Pro help that at least gives some guidance what they mean. Try to select the flag that works best for you.

http://forum.thegamecreators.com/?m=forum_view&t=170502&b=1&msg=2019454#m2019454

In addition to dbSetObjectTransparency, you should also use dbSetAlphaMappingOn(objectID, percentage), which tells the system that the alpha map should be used for the given object and the percentage of transparency.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 22nd Jul 2011 17:36
Whether a texture image has transparency or not, you can check and set in an image editor program that can handle transparent background and can export into PNG with transparency (Paint Shop Pro, Photoshop, etc.).

Login to post a reply

Server time is: 2024-11-19 08:26:35
Your offset time is: 2024-11-19 08:26:35