Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - EgonOlsen

Pages: 1 [2] 3 4 ... 801
16
Support / Re: about the strength of specular light
« on: February 13, 2019, 03:16:34 pm »
Yes, it can.

17
Support / Re: about maxLights in Config
« on: February 13, 2019, 03:14:59 pm »
Just set it to a large number. It doesn't really use much memory.

18
Support / Re: Box sides action
« on: February 12, 2019, 08:54:28 am »
That actually doesn't matter. The picking works in exactly the same way (see private void relocate() in the example).

19
Support / Re: NPOTexture from bitmap
« on: February 12, 2019, 08:52:42 am »
NPOTTexture was added to render videos into them stuff like that. They weren't meant to be used for general purpose applications, because they have quite a few drawbacks. Whenever possible, use square textures instead. That said, there are two ways to feed pixels into them. One is by using http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#overrideTexelData(java.nio.ByteBuffer), but that will leave dealing with context changes all by yourself. The other way is to implement an ITextureEffect (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/ITextureEffect.html) and let it set the new pixels. Just make sure that you give your NPOTTexture a color and not null or otherwise, it won't create any pixel data buffer at all.

20
Support / Re: Box sides action
« on: February 07, 2019, 06:04:21 pm »
Yes, I got that. And picking is the way to do just that. Actually, the wiki page contains everything that you have to know to get at least the picking itself working. What exactly does "it doesn't pick" mean in this context? Have you checked that your picking coordinates correct?

21
No, not out of the box.

22
Support / Re: Box sides action
« on: February 05, 2019, 07:59:45 am »
You can implement picking like so: http://www.jpct.net/wiki/index.php?title=Picking

In addition (to get the polygon that's affected by picking), you have to add a CollisionListener implementation of your own to the picked object, that returns true on requiresPolygonIDs. You can then ask the collision event for the polygon's id and armed with that, you can "guess" which side has been picked. The mapping between ID and your side has to be done by youself, but it in case of a cube, it shouldn't be too hard to figure it out.

23
The 3ds format does that, not the importer.

24
Support / Re: Scale X and Y axis
« on: February 01, 2019, 08:30:14 am »
Apart from that: We are talking about Android/jPCT-AE here? In that case, you can't do it this way unless some more setup work which might not be worth it. There's another way, though. You can tweak the rotation matrix directly. This has some drawbacks as well, in particular it might increase a light source's brightness on the scaled object when it shouldn't and it doesn't work well together with the build-in scale methods. Anyway, this is how it works:

Code: [Select]
Matrix scale=new Matrix();
scale.set(0, 0, 2); // 0,0 for x-axis scaling, 1,1 for y, 2,2 for z
obj.getRotationMatrix().matMul(scale);

If you otherwise don't change the rotation matrix, you only have to apply this once. If you set it to a new anyway in each frame (or even sometimes), you have to apply this afterwards. Also keep in mind that scaling is cumulative. That means that doing this by 2 and then by 3 will result in a scaling of 6.

25
Support / Re: Scale X and Y axis
« on: February 01, 2019, 08:17:52 am »
That's not a proper exception...there has to be something more than that in your log output!?

26
Support / Re: Scale X and Y axis
« on: January 30, 2019, 06:02:15 pm »
I'm not sure why the solution you've posted doesn't work in your case. Or in other words: I think that I haven't understand your problem properly!?

27
Support / Re: Screenshots
« on: January 23, 2019, 02:00:17 pm »
I'm not sure If I understand the question correctly. If you don't the button to be there when taking a screen shot, then can't you just not blit it?

28
Projects / MOVED: Screenshots
« on: January 23, 2019, 01:57:26 pm »

29
Support / Re: gpu bug ?
« on: January 19, 2019, 04:07:14 pm »
I'm not sure how you setting up your rendering, but as fas as jPCT-AE is concerned, it doesn't do depth buffer writes for transparent objects anyway, because that would actually render them wrongly.

30
Bones / Re: Android JPCT with animated FBX support
« on: January 18, 2019, 08:31:16 am »

Pages: 1 [2] 3 4 ... 801