Depth sorting problems

Report bugs, bug fixes and workarounds here.
Topic author
buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Depth sorting problems

Post #1by buggs_moran » 12.12.2007, 04:25

I am getting depth sorting problems on my system again. I realize it probably has to do with the cmod shell around the star and probably due to the fact that I have an ATI. However, this is a pretty new problem. I cannot pinpoint the exact build that it started happening in. The two shots below show the problem not occuring in a 1.4 build and occurring in a 1.5 (Dec 11 build). As you can see in the second shot the white dwarf is in front of the orange star but it's accretion disk is behind the orange star, which is not the case in the previous builds. The disk should be in front of the "shell". If I remove the shell, the disk DOES show in front of the star, so it is definitely a result of a current change in the star code.

For a while there I was experiencing bleed through of the larger star through the "shell" cmod, but the depth sorting was fine. I need the shell to show the Roche lobe fill...

These shots were taken from roughly the same vantage point in both builds.

Image

Image
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #2by selden » 12.12.2007, 04:37

I suspect that if you can find a way to avoid using a translucent model, they'll be drawn correctly.

Celestia does still have problems with translucent textures. They're somewhat improved if you specify the material in the model to be translucent with an opacity of 0.99 instead of applying a translucent surface texture image to a model with a material opacity of 1.0.

There also are circumstances when models consisting of translucent materials (with no surface textures at all) are drawn behind opaque meshes they actually are in front of. :(
I'm seeing this effect in my model of the Hale telescope: its light paths are shown by using materials that are both translucent and emissive.
Selden

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #3by rthorvald » 13.12.2007, 20:23

It also helps to experiment with the order the objects are loaded into Celestia memory. For example, it draws the first loaded object first and the last one last.

So, if the accretion disk is defined later in the ssc / stc order than the star, it will always be drawn behind it.

- rthorvald

PS: 98% translucent material works, 99% seems to be too little, at least in Pre3, which is the last i have tested with.
Image

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #4by chris » 13.12.2007, 21:16

rthorvald wrote:It also helps to experiment with the order the objects are loaded into Celestia memory. For example, it draws the first loaded object first and the last one last.

Not true--the drawing order is determined in a back-to-front sort by objects most distant point (in z) from the viewer.

So, if the accretion disk is defined later in the ssc / stc order than the star, it will always be drawn behind it.

- rthorvald

PS: 98% translucent material works, 99% seems to be too little, at least in Pre3, which is the last i have tested with.


I remember this from before, but it still seems very odd to me. I think it has something to do with how your modeling software exports materials, because Celestia should be treating any value less than 100% as translucent (well, actually any value less than 254/255).

--Chris

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #5by chris » 13.12.2007, 21:21

selden wrote:Celestia does still have problems with translucent textures. They're somewhat improved if you specify the material in the model to be translucent with an opacity of 0.99 instead of applying a translucent surface texture image to a model with a material opacity of 1.0.

I think that Selden is right and setting the opacity to a value lower than 1.0 will fix the problem.

There also are circumstances when models consisting of translucent materials (with no surface textures at all) are drawn behind opaque meshes they actually are in front of. :(
I'm seeing this effect in my model of the Hale telescope: its light paths are shown by using materials that are both translucent and emissive.


Hmm . . . I thought I'd fixed model rendering so that all the translucent parts were rendered after opaque parts.

--Chris

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #6by selden » 13.12.2007, 21:31

Chris,

If you carefully watch the last few seconds of the video I made of the Hale telescope model (The Addon isn't finished yet, sorry), you'll see some portions of the light path appearing and disappearing -- especially the part that's directly in front of the primary mirror. It seems to change color between yellowish when the translucent, emissive light is correctly drawn in front of the mirror and silver when it is not.

Of course, it's a complex system with many models involved.

The video can be seen at http://www.youtube.com/watch?v=1d68rm53q8o
Selden

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #7by Cham » 13.12.2007, 22:16

I'm also experiencing some odd behavior of transparent parts, but ONLY after I converted the model to CMOD, using the CMOD tool. The 3ds model doesn't have any depth sorting problem in Celestia, with its semi-transparent parts. The CMOD version do have depth sorting problems.

... and there are those smoothing problems with the CMOD tool, which ElChristou can describe in details...
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #8by chris » 13.12.2007, 22:23

Cham wrote:I'm also experiencing some odd behavior of transparent parts, but ONLY after I converted the model to CMOD, using the CMOD tool. The 3ds problem doesn't have any depth sorting problem in Celestia, with its semi-transparent parts. The CMOD version do have depth sorting problems.

... and there are those smoothing problems with the CMOD tool, which ElChristou can describe in details...


I'd love to look at these bugs, but I need help. Please, go to the SourceForge bug tracker to file bug reports about issues that annoy. Sign up for a SourceForge user ID if you don't have one. Have a quick look through the list of open issues to see if something has already been reported. Include links to files and whatever steps are necessary to reproduce the problems. Bugs that are reported on the tracker get fixed; bugs reported in forum threads tend to get forgotten.

--Chris

Topic author
buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Post #9by buggs_moran » 13.12.2007, 22:31

Cham wrote:I'm also experiencing some odd behavior of transparent parts, but ONLY after I converted the model to CMOD, using the CMOD tool. The 3ds model doesn't have any depth sorting problem in Celestia, with its semi-transparent parts. The CMOD version do have depth sorting problems.

... and there are those smoothing problems with the CMOD tool, which ElChristou can describe in details...


That is interesting. If I have a chance I'll try my models as 3ds instead of cmod tonight.
Homebrew:

WinXP Pro SP2

Asus A7N8X-E Deluxe

AMD Athlon XP 3000/333 2.16 GHz

1 GB Crucial RAM

80 GB WD SATA drive

ATI AIW 9600XT 128M

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #10by rthorvald » 13.12.2007, 23:30

chris wrote:
rthorvald wrote:It also helps to experiment with the order the objects are loaded into Celestia memory. For example, it draws the first loaded object first and the last one last.

Not true--the drawing order is determined in a back-to-front sort by objects most distant point (in z) from the viewer.

Hm. Where did i get that from... An older version, perhaps.

Well, nice to have that one cleared up.

- rthorvald
Image

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #11by selden » 14.12.2007, 13:32

The "first to last" drawing is what happens with DSC Nebula Mesh objects. It would be nice if someday they were depth sorted.
Selden

Topic author
buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Post #12by buggs_moran » 14.12.2007, 17:22

My problem is definitely directly related to the (stc) stars under the cmods. I changed the size of the star inside the Roche lobe to 1 km and the depth sorting problem disappeared. I noticed that the white dwarf inside the disk is exhibiting the same issues. I guess I will have to create this model without actual star sizes for now... I can make them both 1 km and just have shells "imitating" their true radii for now, but I would like to see the problem eventually go away...

I didn't have a chance to try the 3ds' instead of cmods....
Homebrew:

WinXP Pro SP2

Asus A7N8X-E Deluxe

AMD Athlon XP 3000/333 2.16 GHz

1 GB Crucial RAM

80 GB WD SATA drive

ATI AIW 9600XT 128M

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Post #13by Fenerit » 14.12.2007, 19:01

buggs_moran wrote:
...

I noticed that the white dwarf inside the disk is exhibiting the same issues.

...



Sorry if I'm in wrong comprehension, this is mean that the white dwarf is translucent? If so, look at the texture and made it 24 bit instead of 32 bit.
Never at rest.
Massimo

Topic author
buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Post #14by buggs_moran » 14.12.2007, 20:42

Fenerit wrote:
buggs_moran wrote:
...

I noticed that the white dwarf inside the disk is exhibiting the same issues.

...


Sorry if I'm in wrong comprehension, this is mean that the white dwarf is translucent? If so, look at the texture and made it 24 bit instead of 32 bit.


No. The star's disk shows through the gas that surrounds it. It looks like the star is actually in front of things that it is behind...
Homebrew:

WinXP Pro SP2

Asus A7N8X-E Deluxe

AMD Athlon XP 3000/333 2.16 GHz

1 GB Crucial RAM

80 GB WD SATA drive

ATI AIW 9600XT 128M

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Post #15by Fenerit » 14.12.2007, 22:32

Understood. You could make 24 bit the ring, but will lost the translucent's gaps within. :cry:
Never at rest.
Massimo

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #16by chris » 14.12.2007, 22:49

selden wrote:The "first to last" drawing is what happens with DSC Nebula Mesh objects. It would be nice if someday they were depth sorted.


Yes, this would be nice--it's worth iadding it to the feature tracker on SourceForge.

--Chris

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #17by selden » 15.12.2007, 00:34

done.
Selden


Return to “Bugs”