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 / Locking an object's texture coordinates

Author
Message
anwserman
15
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 22nd Jul 2011 01:01 Edited at: 22nd Jul 2011 01:58
I'm using APEX Now's CSM Importer in my application, and I'm running into an issue with texturing objects created through the plug-in.

I attached an image to explain the problem. The first image shows the graffiti tag on the wall; the graffiti art contains just the one picture in it, and is spread across the entire mesh.

When I try to apply a new texture to it, it shows up blank. I'm thinking that when I apply a new texture, the UV/UT coordinates get reset, changed, or screwed with somehow.

Can I apply a new texture to this object but keep everything else intact? Or is how DB currently works, and the CSM importer is doing something else to apply the image to the mesh?

EDIT: I checked the visibility of the mesh. According to DB, it's still visible. Also, all I want is for the texture to cover the entire mesh, e.g. (0 - 1 UV, 0 - 1 UT).

EDIT2: Changing the texture of the limb causes only the limb to disappear. However, I change the texture scale on the original texture of the limb. E.g.,
causes the entire texture to appear on the limb twice.

EDIT3: I went through the vertexdata, and compared the UV/UT values before I applied the new texture, and also after applying the new texture. They're the same. Could the fact that the new texture has an alpha channel (PNG) be contributing to this?
anwserman
15
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 22nd Jul 2011 02:17 Edited at: 22nd Jul 2011 12:26
EDIT 4: Did some more testing. Noticed that the textures that I was trying to use ended up not loading somehow, but I did find ones that were.

Anyway, it seems like when a texture that is loaded - and applied - it only appears when there is no transparency set to the object. I created a new post to upload a new image.

The top part of the new image contains the tag with the new texture applied to limb 3, with no transparency enabled. The transparent parts appear as white on the original texture, black in the newly applied one.

The bottom part of the new image contains the tag with the new texture applied to limb 3, with it also being drawn to screen so I can actually see if it is being loaded or not (it is). The texture appears on limb 3 with transparency turned off, but not on.

Narrowing it down some more
A) Something is causing DB to not correctly load all the textures I supplied, be wrong path or there is something wrong with the image and DB doesn't like it.
B) The object only will render run-time applied textures only with transparency turned off.

Out of both problems, B is the one I really need to solve. Any ideas?

EDIT: The object can be set a new texture with "SET BLEND MAPPING ON". Unfortunately, this may or may not cause more problems down the road.... but at least now it works.

Login to post a reply

Server time is: 2026-07-10 17:19:03
Your offset time is: 2026-07-10 17:19:03