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 - Jakes

Pages: 1 [2] 3 4 5
16
Support / Re: Transparent Object and ZBuffer
« on: October 21, 2020, 10:32:19 pm »
Yes, but how do I know if they are being delph checked? is there any option to set that per object?
or are all the objects ignoring the zbuffer when set to transparent by the Object.setTransparent()?

because I'm having the last behaviour instead of the first one, which would be expected, right?


17
Support / Transparent Object and ZBuffer
« on: October 21, 2020, 01:53:23 pm »
Hello,

I've been working with transparent objects (in this case, sprites with transparent cutout, like leaves and branches), and knowing that transparency doesnt write to zbuffer, I was expecting to experience some known cases, but instead I'm experiencing different results, as you can see below:

Expected results:

Right: Good Result.
Left:   it is known that this scenario could happen when the red circle in the back is drawn last, so the area of the blue circle will then occlude the red circle due to the zbuffer.

Experienced results:

Right: Good Result.
Left: This wasn't what I was expecting, mainly because the red circle in the back should be depth tested and therefore be drawin behind the blue circle, even when using transparency, the only artifcat I should expect would be clipping and not overlapping. Is there any ZbufferCheck not being made when using transparent objects?

Regards,
Jakes

18
Support / Re: World calMinDistance Issue
« on: August 31, 2020, 04:15:01 am »
Yes, thank you, it was missing that configuration

[Thread closed]

19
Support / Retrieve objet's mesh data
« on: August 25, 2020, 08:15:13 pm »
Hello once more,

Is there any way to retrieve an object's mesh data, like the polygon list, or vertices?

I want to do some calculations using the object's mesh structure, and need to have the vertex info at least, I've read about the mesh object, but it seems there's no way of getting this.

Regards,
Jakes

20
Support / Re: World calMinDistance Issue
« on: August 25, 2020, 08:12:27 pm »
Mostly because I want to have a way of picking objects from the world using the cursor and this seems to be the only way.

furthermore, is there any way of picking a group of objects inside a view plane? like a rectangle selection?

Regards,
Jakes

21
Support / World calMinDistance Issue
« on: August 25, 2020, 07:03:10 pm »
Hello,

I've been trying out the World.calcMinDistance method but nothing was returned (the value COLLISION_NONE), and when trying the same method from on object from that world, it yields out a distance. Shouldn't the first one work when the object returns a value?

Regards,
Jakes

22
Support / Re: How can we overcome the GC pauses?
« on: January 31, 2020, 03:25:20 pm »
By reading this thread https://stackoverflow.com/questions/16695874/why-does-the-jvm-full-gc-need-to-stop-the-world its easy to understand why it's normal to have short pauses on the threads in order to collect older data.

and this one https://plumbr.io/blog/garbage-collection/minor-gc-vs-major-gc-vs-full-gc to understand the differences.

And yes, I'm a bit of a performance geek, and want to try to give my best on any project, mosly because I'm aiming for low-end machines as well, and by low-end I mean 800s/900s Nvidia GPUs and dual cores CPUs, as well as older i5s and i7s.

23
Support / Re: Polylines transparency issue
« on: January 31, 2020, 01:49:46 pm »
Ah ok, so it uses the alpha channel of the color for the transparency. Thanks

24
Support / Polylines transparency issue
« on: January 31, 2020, 10:17:47 am »
Hello, I've been working around with Polylines and it seems that the method Polyline.setPercentage(float) is not working properly or might be something I am missing. For any value other than 1 the line turns fully invisible.

Is this an issue?

25
Support / Re: How can we overcome the GC pauses?
« on: January 31, 2020, 10:13:35 am »
Yes, I've been using a profiler to check on what's causing the pauses, and it turned out to be the major collections of the GC. Every time a major swipe occured a short pause of half second or so would happen. This is most noticable on low-end pcs.

The pause the world GC is a thing even today, but after some investigation it seems that there's some set of solutions fot this that I will post here after I had my tests done.

26
Support / How can we overcome the GC pauses?
« on: January 25, 2020, 06:15:27 am »
I know this might not be the best place to start this but, as this is something that requires a top performance execution, it could have something to do.

After some digging, tuning and playing around with the GC arguments to try to get some good configurations I ended up not having any success at solving its execution pauses.

We all know that the "Stop-the-world" issue while garbage collecting is real, but is there any way to overcome it in an elegant way? I mean, how do anyone here sets up their specs in order to have a nice experience without any lag or freezing every once in a while?

currently, this is what I'm using:

-XX:MaxGCPauseMillis=10 -XX:ParallelGCThreads=4 -Xmx1072M -Xms1072M -XX:+UseParallelGC -XX:NewRatio=4

but, even this, it will fill up the heap memory in a matter of minutes, and once its there, there will be a major sweep that will be noticeable to the simulation and the player.

Any tips or hints will be highly appreciated

27
Support / Re: Loading performance - Cotninuation
« on: January 23, 2020, 11:44:30 pm »
I'm not sure why it freezes though. It looks like a dead lock, because there are some sync operations between the threads going on, but if there's no "Waiting..."-message, I don't see why this should happen ATM.

There is no such message like that at all

I need a test case to reproduce and debug this, I'm afraid. Can you provide me with something?

I could try to setup a stand alone project, and I will sent you afterwards

28
Support / Re: Loading performance - Cotninuation
« on: January 23, 2020, 01:38:40 am »
Bu regarding this issue, isn't it possible to add a method to the engine that coudl be called staticly, such as TextureManager.preWarm(FrameBuffer), like this:

Code: [Select]
FrameBuffer.prewarmCompiledObjects(FrameBuffer)

or

Code: [Select]
Object3D.prewarmCompiledObjects(FrameBuffer)

(I would assume that for this I would need to pass an array of objects, or something similar?)

The reason I'm asking this is, does this method really needs to be a part of the world, beucause I could have the need to precompile every object into the buffer and I could not be using any world at this stage. for example, these objects could be in an asset container so that they could be sent out to the world afterwards. Furthermore, the only thing needed here is the FrameBuffer right?

29
Support / Re: Loading performance - Cotninuation
« on: January 23, 2020, 01:24:08 am »
No, it just freezes at that stage.

Compiling object object5811/com.threed.jpct.Object3D@63dbf1b0!
Compiling object object5813/com.threed.jpct.Object3D@7cd88d07!
Compiling object object5815/com.threed.jpct.Object3D@6d130699!
Compiling object object5816/com.threed.jpct.Object3D@7c165ec0!
Compiling object object5818/com.threed.jpct.Object3D@20a6cee5!
Compiling object object5822/com.threed.jpct.Object3D@27592d22!
Compiling object object5824/com.threed.jpct.Object3D@4fa2275c!
Compiling object object5829/com.threed.jpct.Object3D@1ec631dc!
Compiling object object5831/com.threed.jpct.Object3D@65f3724c!
Compiling object object5833/com.threed.jpct.Object3D@51d50fde!
Compiling object object5834/com.threed.jpct.Object3D@7b04e1ca!
Compiling object object5835/com.threed.jpct.Object3D@7d83d3de!
Compiling object object5836/com.threed.jpct.Object3D@59cad432!
Compiling object object5839/com.threed.jpct.Object3D@13314cac!
[ Thu Jan 23 00:18:27 GMT 2020 ] - WARNING: Object object5839 hasn't been build yet. Forcing build()!
[...Freezes Here...]


but this only happens when the loading process takes more time and this line appears:

Delayed pre-warming done!

so, what it looks like is, when this line shows up beforehand the precompilation of the objects, the whole program freezes.

I think it has something to do with that, other than that I cant really say.

30
Support / Re: Loading performance - Cotninuation
« on: January 20, 2020, 12:05:29 am »
You can configure the logger in the Logger class. Just set the log level to something higher (like http://www.jpct.net/doc/com/threed/jpct/Logger.html#LL_ERRORS_AND_WARNINGS) and the messages should disappear.

Thanks, I'll give it a go.

The compileAllObjects-method is still there, I've just renamed it so that it reflects better what it actually does. It's now called prewarmAllObject(<FrameBuffer>)

Regarding this, issue, I've tried a lot of scenarios so far:

1. Creating all of the objects hidden, starting the scene with only 1 or 2 simple objects, wait like 5 or 10 seconds, and show all of the 4000 hidden objects: and this way no hiccuping happens at all, it works as if all of them were already loaded.

2. Creating all of the objects visible, starting the scene with 4000+ objects: The scene freezes and has huge frame drops for like 3 or 4 seconds.

3. Used the World.prewarmAllObjects(FrameBuffer) combined with TextureManager.preWarm(FrameBuffer) and here is where the weird behaviour starts as I'm describing below:

- If everything is processed quick enough, then nothing different happens, it loads, and there will be a slowing down of the simulation for 2 or 3 seconds before everything starts running smoothly, so nothing seems to differ when using the World.prewarmAllObjects(FrameBuffer).

But

- if I take longer, after the TextureManager.preWarm(FrameBuffer) which outputs the message "Delayed pre-warming done!" then this shows up on the log afterwards: "Compiling object object6278/com.threed.jpct.Object3D@2d12a01f!
[ Sun Jan 19 22:54:28 GMT 2020 ] - WARNING: Object object6278 hasn't been build yet. Forcing build()!" and nothing happens, as if the application just stops its cycle. and it freezes here forever:


is there anything that I could be missing? As I said previously, If I hide all the objects for a while and then show them up, everything seems to flow normally, but if they start out visible from the start, there will always be some slowness and freezing.

Pages: 1 [2] 3 4 5