How to do smooth shading on ASE loaded model.

Hi there.

I am new to the world of xith3d. I have downloaded almost everything I could get my hands on and tried experimenting with the ase loader example (the one with the tank).
I made a simple torus in 3d max and tried loading it and it works. But is is flat-shaded and completely white. The material in 3ds is phong-shaded and blue (without texture).
How do I change the shading of a loaded ASE model?

I also tried the 3ds loader found in the xith toolkit. But the testclass TDSTest just says:


TDSLoader Debug Output
file: character.3ds


Skipping Chunk: 4d4d
No key frames found!


Am I doing something wrong or are the 3ds loader not yet functional?

Best regards

Jub

PS: Sorry for the many questions I might have here at the start… I hope to be able to give something back soon… :slight_smile:

The 3ds loader should be working, the message you’re seeing simple indicates that there was no animation in the model. The model itself should still be present.

If you’re still having problem could you mail your model and I’ll try and figure it out…

Cheers,

Kev

I am just using the example models contained in the download (character.3ds). All I get is a black screen, but the program appears to be running. :’(

I didn’t change anything in source of TDSTest. I am a newbie to the xith3d engine and right know I am just playing around with the various examples to get feel of what the engine can do.

I downloaded the xith3d version:
2003-11-02_Xith3D.tar.gz

And version 1 of the 3ds loader from the xith3d toolkit site.

Jub

Could you let me know what platform/hardware you’re running on…

I’ve just given the test a quick run and seems to work fine here. It might be something to do with the packaging or the class path access.

Kev.

Further to this, I’ve just uploaded a new version of the loader (to the same location) that might fix the problem. I recieved a report about an oddity on linux with loading resources from the classpath,

I would normal use:

MyClass.class.getClassLoader().getResource();

but apparantly on linux only this works:

this.getClass().getClassLoader().getResource();

Odd, but true… anyway, new version up, hopefully it will help.

Kev

Oh, also, the “models” needs to be in your class path so it can find the character.3ds model.

Kev

[quote]Further to this, I’ve just uploaded a new version of the loader (to the same location) that might fix the problem. I recieved a report about an oddity on linux with loading resources from the classpath,

I would normal use:

MyClass.class.getClassLoader().getResource();

but apparantly on linux only this works:

this.getClass().getClassLoader().getResource();

Odd, but true… anyway, new version up, hopefully it will help.

Kev
[/quote]
I had some very strange behaviour on linux (or just java in general) as well. I couldn’t understand it because I had worked with jar files many times before, but all of a sudden it wasn’t working.

I found that making the paths absolute (in relation to the jar that is ::slight_smile: ) by prepending a ‘/’ to the front of all paths worked.

This was when I was adding jar support to TextureLoader.

Will.