some questions

Started by Disastorm, July 12, 2010, 01:18:45 AM

Previous topic - Next topic

Disastorm

Hey, is there a way to make bones not be visible? When I import a 3ds file I also see the bones in the java program sticking out of the model.  Or is this something I have to do in 3d studio to make it not display the bones?

Also, is there any way to outline the object in a black line like they do in cel shading?

raft

jPCT doesnt know anything about the bones. they are just 3d objects as others. try not exporting bones from your 3d editor.

Disastorm

oh ok thanks.  also, is there a way to add lighting to an animated object? When I add a light it seems still objects get affected but if I have an object that has an animation sequence it doesnt get affected by the light?

EgonOlsen

It should. Maybe the normals for your animation are not calculated correctly? How are you loading the animation?

Disastorm

#4
Quote from: EgonOlsen on July 12, 2010, 07:35:36 AM
It should. Maybe the normals for your animation are not calculated correctly? How are you loading the animation?

Oh I fixed it by calling build() on the imported objects before adding their mesh to the Animation and now the lighting works.  Thanks.  Btw is there any way to add a black outline around models like in cel shading?

EgonOlsen

Somebody once tried to do something like this...should be still somewhere in the forums. The usual way to do this is to use some shaders, which can be used on compiled objects with jPCT. However, there's no magic "cel shading" shader in the distribution...you are much more on your own if you take the shader route, because you have to rebuild a lot of the functionality of the fixed function pipeline in your shaders. Some more information about shaders and jPCT: http://www.jpct.net/wiki/index.php/Shaders

Disastorm

Hey I remember you once said the translations have to be in the same thread as the rendering, do the animations also have to be in the same thread?

EgonOlsen

I highly recommend that. Otherwise, you'll render inbetween states of the animation. It won't crash the engine, but it might look strange. If you absolutely have to use another thread, synchronize the animate call with the rendering.