Badly drawn object

General discussion about Celestia that doesn't fit into other forums.
Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Badly drawn object

Post #1by Vincent » 06.04.2005, 12:18

I'm using a 3d model arrow to show the direction of the rotation axis inclination for an addon (+ script) about the day and night lenght...

Image

The arrow is declared as a spacecraft and I have to set the 'Emissive true' function to make it visible. But as you can see on the picture, the arrow's borders are not clean. I tried to adjust the horizontal alignment but I didn't manage to get clean borders... It depends on the distance from which you watch the object.
I also tried to declare it as an asteroid and add an atmosphere but as it is not a spherical object, the result is not good.

Does anybody have an idea about how to add 'smooth' edges to my arrow ?

@+
Vincent
Last edited by Vincent on 08.04.2005, 20:57, edited 1 time in total.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #2by selden » 06.04.2005, 14:02

Have you turned on 4x or 8x anti-aliasing in display properties? Although Celestia supposedly had automatic anti-aliasing code added to it, it seems not to work any more.

Without knowing how you designed the arrow it's hard to make other suggestions. The edges should be as straight as the edges of the model. If the arrow shape actually is done using a surface texture image, then you should be sure to apply antialiasing to the edges in the image you create.

Alternatively, you might consider designing a CMOD arrow consisting of just OpenGL line primitives (linelist).
Selden

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #3by Vincent » 06.04.2005, 20:59

selden wrote:Have you turned on 4x or 8x anti-aliasing in display properties?

Yes, I increased the value up to 8 in the celestia.cfg file, but I still have the problem.

selden wrote:Without knowing how you designed the arrow it's hard to make other suggestions. The edges should be as straight as the edges of the model.

I designed it with anim8or. The arrow is a .3ds object with a UV color (no texture)

selden wrote:If the arrow shape actually is done using a surface texture image, then you should be sure to apply antialiasing to the edges in the image you create.

I don't understand what you mean. Can I apply antialiasing directly in anim8or while creating my object ? (I'm sorry if this question sounds stupid)

selden wrote:Alternatively, you might consider designing a CMOD arrow consisting of just OpenGL line primitives (linelist).


Yes, I'm gonna have a look at anim8or to know if I can do that. Antialiasing seem to work only with line primitives (like orbits) in my system. For example, the Earth doesn't have smooth 'edges'...

Thanks a lot Selden, I'm not an expert in 3d designing and your help is very useful.

@+
Vincent
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

TERRIER
Posts: 717
Joined: 29.04.2003
With us: 21 years 7 months
Location: West Yorkshire, England

Post #4by TERRIER » 06.04.2005, 21:36

Hello Vincent,

I have a feeling that the problem with the arrow is fairly simple.

I am wondering if you have used the "straight path" function in Anim8or to build the arrow, which basically involves "drawing" the arrow freehand. It may be that you may have drifted very slightly away from being exactly parrallel to one of the main 3 axis, (x,y or z), when "drawing" it.

I have noticed if you build a straight side to an object, and do not have it exactly parallel to a main axis it will cause "jaggies" to that edge when the model is rendered.

It's just a case of trying to keep the object "level" -a bit tricky, but it can be done !

regards,
TERRIER
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

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

Post #5by selden » 06.04.2005, 22:11

Terrier,

Hand drawing straight lines that are parallel to the axes is easy in Anim8or if you turn on "snap to grid". It's in Menu "Options" item "Grid...".

Vincent,

Try Terrier's suggestion.

Also, instead of enabling Celestia's internal anti-aliasing, you might try permanently enabling the graphic card's anti-aliasing. These instructions are for the English version of Windows. I suspect the words are different on a French system.

I don't know what an ATI menu looks like. These instructions are for Nvidia cards.

Right-mouse-click on the screen's backdrop.
Select "Properties" in the popup menu.
Select "Settings" tab
Select "Advanced" button
In the new window, select the tab that has the name of your graphics card. (On my system it says "GeForce FX 5700LE" )
If you have an Nvidia card, a pop-out menu appars.
Select "Performance and Quality settings"
Select (highlight) "Antialiasing settings" in the main window.
Clear (click on) the box "Application controlled"
Move the slider to at least "4x"
Select (highlight) "Anisotropic filtering"
Clear (click on) the box "Application controlled"
Move the slider to at least "4x"
Click on OK buttons to close all the windows.

Run Celestia.

I don't understand what you mean. Can I apply antialiasing directly in anim8or while creating my object ? (I'm sorry if this question sounds stupid)
No question is stupid.

If you put a texture onto a model, then when you paint the texture, you need to be sure that the lines that you paint are anti-aliased, too. Diagonal lines shouldn't look like stair-steps. That's all I meant.

You didn't use a texture, so this suggestion doesn't apply to this problem.

For example, the Earth doesn't have smooth 'edges'...
I see this same problem. I think that the anti-alias code in Celestia is broken. It worked for a while, for a few older prerelease versions of Celestia, but it doesn't seem to work in the most recent versions of Celestia.

I'm certainly no expert in 3D designing, either. Visit http://www.scifi-meshes.com/ or http://www.cgtalk.com/ if you want to see what experts can do!
Selden

TERRIER
Posts: 717
Joined: 29.04.2003
With us: 21 years 7 months
Location: West Yorkshire, England

Post #6by TERRIER » 06.04.2005, 23:22

selden wrote:Terrier,

Hand drawing straight lines that are parallel to the axes is easy in Anim8or if you turn on "snap to grid". It's in Menu "Options" item "Grid...".

Vincent,

Try Terrier's suggestion.

Worth a try, but I'm not so sure now. I've just had a go at "drawing" some really bad arrows, I even did one with all the edges out of true, and I couldnt even get that one to look as jagged as the one in Vincents picture.

It looks like it is more of an anti-aliasing problem.

selden wrote:Also, instead of enabling Celestia's internal anti-aliasing, you might try permanently enabling the graphic card's anti-aliasing. These instructions are for the English version of Windows. I suspect the words are different on a French system.

I don't know what an ATI menu looks like. These instructions are for Nvidia cards.

Right-mouse-click on the screen's backdrop.
Select "Properties" in the popup menu.
Select "Settings" tab
Select "Advanced" button
In the new window, select the tab that has the name of your graphics card. (On my system it says "GeForce FX 5700LE" )
If you have an Nvidia card, a pop-out menu appars.
Select "Performance and Quality settings"
Select (highlight) "Antialiasing settings" in the main window.
Clear (click on) the box "Application controlled"
Move the slider to at least "4x"
Select (highlight) "Anisotropic filtering"
Clear (click on) the box "Application controlled"
Move the slider to at least "4x"
Click on OK buttons to close all the windows.

Run Celestia.

Yes, I usually run Celestia in 4x mode through my graphics card and not through the cfg file. This results in reasonably smooth lines with only minor jagginess in 4x, really smoooooth lines in 8xS with almost no jag, while with AA turned off my edges look like saw blades.
You need to make sure you've not got the anti-aliasing set on "application-controlled" if you're going to use this method for your anti-aliasing.

As Vincent said, toggling the anti-aliasing function on and off in Celestia does seem to affect the orbit lines.

cheers,
TERRIER
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #7by Vincent » 07.04.2005, 09:35

First of all, I'd like to thanks both of you Selden and Terrier because even if my diagonal lines look like stair-steps, your help make me progressively climb these steps on the way of 3D modeling... :wink:

I drew the arrow using primitive cylinders. I made sure that they were properly paralel to the axis and then did the 23.45 rotation to make them appear paralel to the ecliptic plan...

As Terrier said, it must be an anti-aliasing problem.
As Selden proposed, I will try to enable the graphic card's anti-aliasing. I have a NVidia card too, so your explanation is perfect !

@+
Vincent
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #8by Vincent » 08.04.2005, 20:51

Well after having set the graphic card's anti-aliasing to 4x or 8x, I've had display problems with the text. So I tried 2x and then I got a very good result.

I also re-modeled my arrow using polygons instead of cylinders. Once more, I had a better result especially for the different points of view I'm using...

Here's the screenshot to be compared to the first one...

Well for the last time, Thanks Selden and Terrier !

@+
Vincent

Image
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3


Return to “Celestia Users”