Main Menu

help please

Started by freyes, June 20, 2004, 04:12:20 AM

Previous topic - Next topic

freyes

How can I load a 3ds file that have no textures, only materials

I want to show the model with the original materials

freyes

I need to make an applet to load 3ds models, i can load them but the render is too ugly

can you help me to configure for a good rendering?

freyes

if you can show an example, I'd be very happy

EgonOlsen

jPCT is (per definition) a texture-only engine. For 3DS, there is the option to let jPCT create uni-colored textures for materials but that's basically all that is supported. I'm not sure what you mean by "too ugly"...what are you missing or what looks wrong? Maybe adding some colors or something would help...?

freyes

excuse my english I speak just a bit

I want to say that te render isn't good, the color are not correct for the materials.

Then you say that jpct it isn't appropriated for my project??

EgonOlsen

jPCT uses the diffuse color of a material to color the polygons using this material. If this works fine for you but is still not what you want, then jPCT may not be suitable for you. If that is what you want but it's not working properly, i would be very interested in such a model to see for myself.


EgonOlsen

This is how it looks now:



What i did is this: I opened and resaved the model in DeepExploration (a very powerfull 3D converter tool) and the colors were correct from there on (they were as wrong as your render shows before). I don't know why this has happened. It's either a flaw in jPCT's 3DS-loader (but one that doesn't occur on any other model i know of) or a flaw in the software you used to make this model (i doubt that, but you never know).
Anyway, i modified some parts of your code that suffered from a copy-and-paste disease... :wink:
You applied a rotation to every part of "vroom" right after loading. That's not a good idea, because it means that you rotate every part around its own rotation pivot...and that will screw up the model finally. I replaced this by rotating the mainObj only.
Second, you don't have to add mainObj to the world, because it's a dummy object.
Third, i removed the light sources and set ambient to max to show you, that the colors are really fine now.
Fourth...some other stuff i can't remember...
The sources can be found here: http://www.jpct.net/stuff/vroom

Anyway, please tell me which program you used to create the model, so i can track down this problem better...

freyes

Thank you very much!

I'll evaluate the posibility of implement my project with this engine