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 / saving transparent objects .(possible bug ?)

Author
Message
Hotline
17
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 27th Jul 2011 22:45
I use a tga texture with alpha chanel
works fine when :



but if i save this object and load it back there are few problems with the model :
- the texture is mirrored.
- the transparency looks pretty bad !

screenshots :
i use the default blue backdrop. the red background is a red cube behind the transparent plain.

good :



saved and loaded back :



any help appreciated.Thanks
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 27th Jul 2011 22:57
use
after loading your object.

Hotline
17
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 27th Jul 2011 23:40 Edited at: 28th Jul 2011 00:06
well apparently that will work but it's pointless to save an object with transparency on if i need to set it again after loading

It should be transparent automatically after loading.
And still this won't solve the second problem (texture is mirrored)
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 28th Jul 2011 10:24 Edited at: 28th Jul 2011 10:26
having to re-set the transparency is a side-effect of the 'feature' that is the ability to turn it off and on (if you follow the thought process there).

not ideal in your case and not necessarily a robust save object implementation, no doubt (ie, there could/should be a number of parameters within the command that should do what you expect and much more).

on your second issue... i have a hunch that the texture isn't mirrored but that your plane is y-rotated 180 degs. i haven't played with the (relatively new) "orientation" parameter but add the flag when you create the plane and see if that's the culprit. ie:

make object plain 1,100,200,1

orientation info from the help file, for convenience:


Virtual Nomad @ California, USA . DBPro V7.5
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Hotline
17
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 28th Jul 2011 17:49
Yes that solved the orientation issue Thanks !. When i set GHOST OBJECT ON and save the object it works perfectly (dbpro saves ghost effect)
I can't see the point of saving transparency flag to a dbo file if won't work properly ?.
The list from DBO Format.doc
All these flags /datas and are stored in the dbo file:

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
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 28th Jul 2011 19:28
Quote: "134 Mesh Transparency"

ah, then it seems it should work as you expect and might be a bug. if noone more knowledgable and experienced with save object and .dbo files doesn't weigh in here, it would be worthy of submission under bug reports. to assist in tracking it down, you could try, for example, converting the image(s) to .png to to help rule out out a potential "issue with .tga files under .dbo" scenario.

btw, nice work , hotline

Virtual Nomad @ California, USA . DBPro V7.5
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Hotline
17
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 28th Jul 2011 22:51
Quote: "btw, nice work , hotline "


Thanks !

Login to post a reply

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