Author Topic: some questions  (Read 3390 times)

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
some questions
« on: July 12, 2010, 01:18:45 am »
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?

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: some questions
« Reply #1 on: July 12, 2010, 01:36:14 am »
jPCT doesnt know anything about the bones. they are just 3d objects as others. try not exporting bones from your 3d editor.

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: some questions
« Reply #2 on: July 12, 2010, 02:25:25 am »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: some questions
« Reply #3 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?

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: some questions
« Reply #4 on: July 12, 2010, 08:34:54 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?
« Last Edit: July 12, 2010, 10:38:46 am by Disastorm »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: some questions
« Reply #5 on: July 12, 2010, 10:16:37 pm »
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

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: some questions
« Reply #6 on: July 15, 2010, 09:49:44 am »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: some questions
« Reply #7 on: July 15, 2010, 05:54:03 pm »
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.