Page 1 of 1

[1.6.1] Problem with 3D nebula textures

Posted: 04.04.2020, 21:07
by Hexareon
Hello! :toothless:

I've tried making my own nebulae add-ons in celestia (version 1.6.1), and I decided to start by modelling some well-known planetary nebulae, like the Eight-Burst Nebula. I make my models in blender, exporting them as .obj files, and then open them in anim8or in order to convert them into .3ds (cmodview doesn't seem to recognize texture coordinates on .obj files at all for some reason and I don't know how to concatenate .cmod material and mesh files if I use the cmod export script). Finally, i open the .3ds file in cmodview to alter its properties and export it as .cmod. This nebula in specific was made with displacement maps on 4 planes, 2 for the exterior and two to render the interior of the nebula (i can't seem to get celestia to render both sides of a plane so this is my go to solution to the problem for now)

It all works well, except for a few texture problems for when you look at the nebula from certain angles, a set of polygons don't seem to render correctly. I heard somewhere that Celestia has a depth-sorting problem for when it comes to nebulae, but I'm not really sure if this is the case here. I searched everywhere and couldn't find a solution, and sorry if this is a stupid question, I'm new to Celestia and to 3D modelling.

https://imgur.com/a/YMuzSjz

Here are a few screenshots of the visual issues (imgur album). The second and third screenshots are for context of how the model looks like. Is there any way to fix this? Am I doing something wrong?

Posted: 04.04.2020, 22:22
by LukeCEL
Hi Hexareon,

It looks like your model is basically what we call a "billboard", but with a "bulge" to represent the shape of the nebula. This is a common technique to add nebulae to Celestia, and several add-ons in the Motherlode do this. (Incidentally, the Eight-Burst Nebula has been done with this technique as well.) This works great when looking approximately face-on. However, when you're looking at it from the sides, the mesh surface becomes obvious; most nebulae don't have sharply defined "edges".

Unfortunately, these "edges" are intrinsic to polygon-based meshes. No matter the shape of a polygon mesh, there will always be a viewing angle at which these "edges" become apparent. As you've noticed, these "edges" tend to look a bit odd, expect in a few cases like this M2-9 add-on by jll. I think this add-on looks pretty good because if you look at a picture of M2-9 by Hubble, the edges look pretty sharply defined in real-life.

My go-to method for making nebulae is point sprites. I like using them because you can simulate soft edges with them. However, turning a photo into a realistic sprite model is quite difficult, and I'm still a total beginner at this.

(Incidentally, it looks like the Eight-Burst Nebula is shaped like a diabolo. https://iopscience.iop.org/article/10.1086/309058)

I hope that explanation was helpful and not just a rambling mess. Best,
LukeCEL

Posted: 04.04.2020, 22:45
by Hexareon
Hello LukeCEL,

Thanks a lot for the reply, I was looking into modelling some planetary nebulae this way because the ones from Celestia Motherlode use the same technique (as you mentioned) and end up looking quite decent, and are really noob-friendly to make too. They also don't seem to have this rendering issue from what I've seen.

I think this add-on looks pretty good because if you look at a picture of M2-9 by Hubble, the edges look pretty sharply defined in real-life.

It looks very good indeed, his ant nebula model looks pretty decent too.

(Incidentally, it looks like the Eight-Burst Nebula is shaped like a diabolo. https://iopscience.iop.org/article/10.1086/309058)

Wow, had no idea about that one!

I will try in the meantime to model some nebulae trough point sprites, thank you for the suggestion.

Posted: 05.04.2020, 01:30
by LukeCEL
Glad I could help!

Hexareon wrote:I was looking into modelling some planetary nebulae this way because the ones from Celestia Motherlode use the same technique (as you mentioned) and end up looking quite decent, and are really noob-friendly to make too.

Funny thing actually, I started making nebulae using point sprites because I'm really bad at modelling. I just couldn't figure out how to do proper UV mapping, transparency, etc. with Blender. However, since sprites are just points (no edges, no faces) I personally find them easier.

Posted: 05.04.2020, 06:03
by jujuapapa
@hexareon : here is my contribution. :wink:

Nebula6.jpg

Posted: 05.04.2020, 15:14
by Hexareon
LukeCEL wrote: Funny thing actually, I started making nebulae using point sprites because I'm really bad at modelling. I just couldn't figure out how to do proper UV mapping, transparency, etc. with Blender. However, since sprites are just points (no edges, no faces) I personally find them easier.

Nice! Yeah, Blender can be a real pain in the butt even if you're familiar with other 3D modelling software. Another thing about Blender is that they completely changed the interface for version 2.8, which can be really annoying when you watch a tutorial that was made in a pre-2.8 version. Other than that, Blender is one of the best in its category, and it's free.

jujuapapa wrote: @hexareon : here is my contribution. :wink:

Looks really good!