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 (bump/detail map)

Author
Message
MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 14th Mar 2008 04:33
hey everyone, I'm hoping I can get some help on a problem I have using the Dark GDK on windows vista.

Below, I have posted the code for the function I am using to load 3d objects quickly:




(I call this function before the main DGK loop for any objects I want to load). When I choose not to apply a bump/detail map, it looks like this:






when i apply a detail map, the white triangles still appear but it looks like this:



It basically looks like the color is gone here .

Does anyone happen to know what I'm doing wrong?
MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 14th Mar 2008 04:55
Correction: when I said I am using windows Vista, i meant to say I am using windows xp. Can't tell you how I mixed it up.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Mar 2008 05:29
Next time - try to use a more descriptive Thread Subject line for people to be able to search for your issue. Now if we help YOU, its not like anyone else will likely benefit... say compared to a thread title like: Terrain Problem Detail Image Looks Whack

First Pic is the terrain goes through the Skybox. You see triabgles as within camera range.

Lines in Skybox will go away if you experiment with these two settings (DBPRO Clip - but rids the lines - its one or both of these commands - I forget:

I think the set object filter ZERO one.

Pic 2 - when you apply detail map? Are you using advanced terrain or a home brew mesh?

Are you trying to use a Shader (even one of the built in ones...please specify) or are talking about the detail map you add to Advanced terrain to get...well...detail ???

Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 14th Mar 2008 05:38
might also try objectcull it might solve some of the issue with the skybox lines.

Thanks,
Terry
MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 14th Mar 2008 08:29
@jason p sage: Thank you for being of help to me. However, I think that you think I am using terrain, when I am not. The triangle problem is not the object colliding with the skybox also, because the triangles appear everywhere on the object when you fly around. (and the skybox has been hugely scaled bigger than anything else in the scene).

You might be more informed about my situation if you looked on the code I posted, how I load my 3d objects. You can see how I apply my detail map.

And I apologize for the bad title, I stuck it in there without much thought, composed the post and forgot about giving revising the title. Not something I would usually do.


@Epipfany Game Studios: I tried dbSetObjectCull, did not make a difference. (I didn't think it would, because the skybox is composed of all inward faces)



Any help is highly appreciated
MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 14th Mar 2008 08:36
I hate to make a double post, but I realized I should have included some more info. (Where's a post edit button? )

when I load the two objects in the screen shots, I call the function these ways:



(I am not using any bump shading, because I set the bumpId argument to -1, which in the if statement means it does not call dbSetBumpMappingOn. I modified these two lines in the second screen shot so the detailMapId was not negative 1.)
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Mar 2008 13:42
Ok - I didn't see the code snip... Um... looks like those holes are whacked verts, and I never saw anything like you're second pic. You talk of white triangles.... I haven't seen any..... Hate when I can't help

MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 14th Mar 2008 18:09
The white triangles flicker, so it is hard to get a screen shot of them showing at the exact frame when they are showing. In my second screen shot, I was not able to get a good picture of the triangles in it. But, the important part is that the color is gone (if you trust me that the white triangles appear with the detail map applied).
MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 14th Mar 2008 20:25
Hahaha... Ok! I found the problem people.

When I exported my model from 3ds max, I chose the option to NOT export animation, because my models had no animation. BUT, dark GDK apparently doesn't like that you exported without any animation


So, from http://www.fpscreator.com/characterstudio.html, when it says to include animation, choose YES EVEN if you dont have any animation in your model(s).

Phew! Problem fixed with the triangles. dbSetDetailMappingOn STILL doesn't work though.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Mar 2008 20:49
I trust ya - I just wish I could help... 3ds thing - Cool - fixed - but now your getting into Shader territory and this my friend is where I know little but do know that SOME (maybe just bumpmapping) built in effects either don't work right, or people have trouble because they're human. Many switch up to an external shader and have better luck.

I personally HATE shaders... (Or my slow video card ... not sure which though LOL) ... look awesome - bring my card to a crawl... I need a NEW SYSTEM!!!

MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 14th Mar 2008 23:48
Yeah.. I'm working with an FX creator now instead of using the build-in bump-mapping function.

BTW- dbSetObjectFilter fixed the skybox problem, thanks for your tip on that one.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th Mar 2008 00:44
Quote: "BTW- dbSetObjectFilter fixed the skybox problem, thanks for your tip on that one. "
Cool

I was SO STOKED when my Skybox lines went away... then when I was playing FarCry I got all self righteous and indignant - See THOSE LINES? See EM? I can fix that! LOL

MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 17th Mar 2008 09:18
@jason p sage: Lol.

If anyone is wondering about the detail mapping problem: I figured out you gotta call the command dbSetBlendMappingOn. The third argument isn't documented really at all . I experimented a bit, and discovered if you pass it the following inputs: dbSetBlendMappingOn(objId, detailMapId, 9), it seems that the detail mapping works!

They should probably update the documentation on this function.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 17th Mar 2008 13:08
So that you blend two textures without a shader? Or did I miss something?

MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 17th Mar 2008 18:52
dbSetBlendMappingOn isn't documented well enough. BUT, I do not think it is meant to work with shaders. I just know that one of its arguments does detail mapping on an object.

Quote: "dbSetBlendMappingOn

This command will set the blending map for the specified object. Blended textures are combined with the main texture to create a multitextured object. The Blend value is the mode used to create the blend effect. "
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA

Login to post a reply

Server time is: 2024-11-17 08:09:46
Your offset time is: 2024-11-17 08:09:46