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 5 ... 805
31
Support / Re: Low performance when using uncompiled objects
« on: November 08, 2019, 01:06:41 pm »
It might be possible to do the VBO transfer beforehand as well. I'll try to look into it this weekend. The reason why this doesn't happen, is because all GL related operations have to take place in the GL thread (which owns the context). Depending on the renderer, this can either be applications main thread or the awt event dispatch thread of Java or a normal Java thread. To ensure that it always happens in the correct thread, some operations are postponed until jPCT can be sure to be in the right place. I never saw these little hickups as a problem myself (didn't notice them at all), so I kept it that way.
Have you tried to disable VBO support in Config (http://www.jpct.net/doc/com/threed/jpct/Config.html#glUseVBO)? In that case, the transfer doesn't happen and these hickups should go away in case they are really caused by this.

32
Support / Re: Animation Interpolation Between Sequences
« on: November 08, 2019, 01:01:25 pm »
You could do that and yes, it should update even when compiled, but it might not the very fast. It might be better to create different animations out of the individual frames and do the blending. You can reuse the frames, so it's not a memory issue.

33
Support / Re: Cpct?
« on: November 07, 2019, 10:33:48 am »
No, it's fine. It's some fixed point magix. You should be able to port that just at it is. Apart from that, your assumptions about the colors is correct. It's plain ARGB format.

34
Support / Re: Cpct?
« on: November 07, 2019, 06:30:04 am »
In the SoftGLRenderer.

35
Support / Re: Low performance when using uncompiled objects
« on: November 06, 2019, 10:32:59 pm »
I did something. It's called compileAllObjects(<FrameBuffer>) and can be found in World. It doesn't seem to cause a crash, so that's a good start. I'm not sure how much it helps though. There might still be the uploading of the actual data to GPU left at rendertime, but everything else should be done if you call this method. The GL renderer had be enabled when doing so or otherwise, the method will do nothing. Please give it a try: https://jpct.de/download/net/jpctapi_132b1.zip

36
Support / Re: Cpct?
« on: November 06, 2019, 08:45:20 pm »
I see. In that case, just move the call to col.ToArgb() out of the loop and assign the result, so that you don't have to do it thousands of times for frame.

37
Support / Re: Animation Interpolation Between Sequences
« on: November 06, 2019, 08:43:16 pm »
Yes, you could ignore the sub-sequences and just interpolate across the whole animation by using http://www.jpct.net/doc/com/threed/jpct/Object3D.html#animate(float). You could interpolate the needed index from the animation's total number of frames and the number of frames in each sub-sequence. However, this works only for adjacent sub-sequences and in most cases, it might look very strange anyway.

38
Support / Re: Cpct?
« on: November 06, 2019, 12:59:23 pm »
It's certainly slower. I'm not sure from where exactly this code snippet comes!? Is it inside the rendering loop or some loader/setup code. In case of the former, it might be critical.

39
Support / Re: Low performance when using uncompiled objects
« on: November 04, 2019, 02:56:11 pm »
Ok, I'll go and see if I can port the compileAll method from jPCT-AE or if there was a reason not to other than my false assumption that it isn't needed... ;)

40
Support / Re: Low performance when using uncompiled objects
« on: October 31, 2019, 10:16:15 pm »
If it happens only when an object comes into view for the first time that uses a mesh that has never been used on any other object before, then it might be the buffer filling for the compiled data that gets transfered to the GPU. jPCT-AE has a method to do this beforehand (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/World.html#compileAllObjects()), but desktop jPCT hasn't. I guess I didn't see it as an issue on the desktop. I think that I could add it to the desktop version at least when not using the AWTGLRenderer (you aren't using that, are you?) but I want to be sure that it's actually the issue. If it is, there should be a log message like

Quote
Subobject of object 12/blah compiled to...

each time the pause happens. Is there?

41
Support / Re: Acessing vertex color throught GLSL
« on: October 31, 2019, 09:53:20 pm »
Try

Code: [Select]
gl_FrontMaterial.emission
instead. I think I read my own code wrong. gl_FrontMaterial.ambient actually contains the world's global ambient color, not the object's additional color.

42
Support / Re: Acessing vertex color throught GLSL
« on: October 28, 2019, 01:18:22 pm »
It will affect gl_FrontMaterial.ambient

43
Support / Re: Low performance when using uncompiled objects
« on: October 21, 2019, 08:53:31 am »
From an engine perspective, there's nothing going on for uncompiled objects that could cause this IMHO. There's no caching or any other kind of one-time processing involved when rendering an uncompiled object for the first time.

44
Support / Re: Low performance when using uncompiled objects
« on: October 20, 2019, 03:20:01 pm »
I would be hard pressed to say that I really see the mentioned effect in these tests...Here are the graphs as they look when running the tests on my machine from Eclipse with -Xmx and -Xms both set to 1024m in the test's runtime configuration:

Compiled:


(I guess it's too fast so the graph is out of scale, but as we don't have a problem with compiled objects, I don't mind it)

an uncompiled:



What am I looking for here? The lower framerate at the beginning? That would be caused by the JIT compiler warming up, because it gets smaller when you start the test with -server -Xcompile. Anyway, when looking at the rendered output, I can't even notice this phase, so I'm not sure if that's what we are talking about?

How do these graphs look on your machine? Oh, and another idea, just in case it's somehow caused by the graphics driver: Try Config.glVertexArrays=false before setting up your actual scene. Maybe that changes something....

45
Support / Re: Low performance when using uncompiled objects
« on: October 16, 2019, 01:35:20 pm »
Yes, just some simple example that compiles and shows the issue.

Pages: 1 2 [3] 4 5 ... 805