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.

Bug Reports / Transparency in .dbo files

Author
Message
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 28th Jul 2011 22:32 Edited at: 28th Jul 2011 22:41
i use tga textures with alpha chanel.I want to save this object to .dbo with transparency turned on , to avoid SET OBJECT TRANSPARENCY command afterwards so when i load this object back it should be transparent automatically. Here's how it looks when i
-make a plain
-load the tga texture
-texture the object
-and set the transparency on

good : (the red background is a cube , the backdrop color is the default blue)



But when i save this plain with transparency on and load it back it looks like this (the transparency is turned on but its wrong):




it should look like on pic1
2nd bug :


when i load an object with 2 limbs and 2 different textures and set transparency on , i got the same or similar issue like on the 2nd picture when the 1st limb is behind the transparent limb (2nd limb)

here's a screenshot :

[img]null[/img]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2011 00:33
Bug reports should include full details - and sample code in particular. In this case you haven't told us which transparency mode you are using - the mode you've chosen is quite likely to be the cause of your problem.
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 30th Jul 2011 02:50 Edited at: 30th Jul 2011 03:06
I tried all the modes from 1 to 6 .All the modes gives wrong result as on the 2nd and 3rd picture i posted , except mode 4 and 6 , but I need true transparent effect with alpha chanel like on the first picture i posted (for blood decals and stuff).Modes 4 and 6 can't do that.

EDIT : From the other hand it doesn't really matter which mode i use , because *.dbo files only store transparency flag as a bool (1-transparency on , 0- transparency off ) So the question is which mode is stored in the *.dbo file when i save it ? I think the mode isn't saved


I can post a sample code with media tomorrow if required.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Aug 2011 00:13
Quote: "Modes 4 and 6 can't do that."


Why? I've never had a problem with "true" transparency - whatever that is.

Quote: "I can post a sample code with media tomorrow if required. "


That's essential so we all know what you are talking about - and can test it for ourselves. So YES PLEASE.
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 1st Aug 2011 13:25
Hi maybe my english is bad but we're definitely talking about 2 completely different thing...

modes : 1,3,5
true transparent : (the transparent effect is based on the image alpha channel - soft edges )



modes: 4,6
draw second alpha test (only render beyond 0x000000CF alpha values)
(gives completely different result as the previous one)



source attached:

first open the project called :
01 - transparency_ok.dbpro
and run it

then run :
02 - transparency_wrong.dbpro

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Aug 2011 17:08
I see what you mean now, thanks. I don't know whether *.dbo files are supposed to store the transparency mode but it would obviously be sensible if they did. I agree it looks like a bug.

Could you supply a similar download for your second bug? I suspect that is a render order problem and there is a way of changing that in DBPro but I forget the details and I'm not sure it can be applied to limbs within an object.
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 1st Aug 2011 17:39 Edited at: 1st Aug 2011 17:48
Thanks Green Gandalf .
The strange thing is that the ghost mode is stored in the file but the transparency mode isn't.

111 Mesh FVF
112 Mesh FVF Size
113 Mesh Vertex Count
114 Mesh Index Count
115 Mesh Vertex Data
116 Mesh Index Data
117 Mesh Primitive Type
118 Mesh Draw Vertex Count
119 Mesh Draw Primitive Count
120 Mesh Vertex Declaration
121 Mesh Bone Count
122 Mesh Bones Data
125 Mesh Use Material
126 Mesh Material
127 Mesh Texture Count
128 Mesh Textures
129 Mesh Wireframe
130 Mesh Light
131 Mesh Cull
132 Mesh Fog
133 Mesh Ambient
134 Mesh Transparency
135 Mesh Ghost
136 Mesh Ghost Mode
137 Mesh Linked
138 Mesh Sub Frames
123 Mesh Use Multiple Materials
124 Mesh Multiple Material Count
139 Mesh Multiple Materials
140 Mesh Visible

Which leads to a bigger problem.Adding another DWORD for transparency mode will completely change the current .dbo file structure.

EDIT :
Well i'm not sure about limb\transparency thing , but IT WOULD BE A GREAT feature and would make the game development lot lot easier

Commands such as :
SET OBJECT TRANSPARENCY objNum , limbNum , Mode
GHOST OBJECT ON objNum , limbNum , Mode
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Aug 2011 18:41
Quote: "The strange thing is that the ghost mode is stored in the file but the transparency mode isn't."


It's the other way round for the Help files.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Aug 2011 00:06
@Hotline,
See if you can spot the transparency mode at the mesh level ... I don't think you'll find it, as the mode is stored (sort of) at the object level.

What is needed, and is much safer than adding to the mesh data (as it shouldn't invalidate existing DBO files), is some more object-level data (three boolean fields by the look of it), plus one or two extra function calls after loading to set the object state correctly.

Plus there looks like there's a bug in the load/save code too - the DBOBLOCK_FRAME_BONEMATRIXDATA define and the DBOBLOCK_OBJECT_CUSTOMDATA define have the same value, and that doesn't seem right.

Quote: "Well i'm not sure about limb\transparency thing , but IT WOULD BE A GREAT feature and would make the game development lot lot easier"

Yes, it would be useful, wouldn't it

@Green Gandalf,
Quote: "but I forget the details and I'm not sure it can be applied to limbs within an object."

Render order is determined at the object level.

Transparent/ghosted objects are always drawn in reverse-distance order. Otherwise, the draw order is controlled using the SET GLOBAL OBJECT CREATION command.

Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 3rd Aug 2011 01:29
@IanM
Quote: "Yes, it would be useful, wouldn't it "


OMG ! I never thought Matrix Utils can do these tricks ... Thanks very very much for the info .
Regards
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Aug 2011 15:27
@IanM

Quote: "Quote: "Yes, it would be useful, wouldn't it ""


How many times must I remind myself to learn those commands off by heart? Or is it just that my memory is failing?

Quote: "Otherwise, the draw order is controlled using the SET GLOBAL OBJECT CREATION command"


By some coincidence I've only just heard of that command this week. Something else to look into.

Quote: "Render order is determined at the object level."


Had a feeling that was the case. Thanks.

Login to post a reply

Server time is: 2024-04-24 16:37:18
Your offset time is: 2024-04-24 16:37:18