Main Menu
Menu

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.

Show posts Menu

Messages - Melssj5

#1
Support / Re: Need advice in my Project.
April 03, 2018, 08:19:09 PM
while asking a new question I answered my self...

1.- doing a different Thread than the renderThread to listen to commands via tcp and make the RenderThread and the TCP Thread independent from each other.

2.-Writting the values read from the tcp connection in static variables in order to be shared between the TCPThread and the RenderThread

3.-defining a maxium steep value in order the have a smooth movement

4.-doing the movement in intervals of that maxium steep size until reaching the current value (increasing or decreaseing) and moving just one step on each RenderThread iteration
#2
Hi friends, I am soing an app in which I must show or hide objects from my world depending on the user input..... Actually I am doing:

1: Clean (Remove all the objects3D that chould be hidden, some of them are not even in the world)
2: Adding to the world all the objects from (1:) that have to been shown
3: build the objects
4: render the world


I am constantly receving error messages that the object didnt exists on the world when trying to remove them.....

Will this way affect performance ans estability??

Which should be the best way to show or hide objects from my world. Maybe moving them to a far position out of the camera scope instead of removing them and moving them again instead of rebuilding them??? wich other aproach should I use??
#3
Support / Need advice in my Project.
April 01, 2018, 06:22:27 AM
Hi all friends, I am in a project and need advice.

Actually I am building a custom instrument cluster for my car, I am doing this:

I have a class MyRenderer implements GLSurfaceView.Renderer

that loops rendering the world and applying the changes on it, my arduino board reads the events on the original cluster conenctor and sends to the android app via tcp. Most of changes on the world are showing/hiding indicators (low beams, high beams, parking brake, low fuel, etc), they appear and dissapear when expected, but..... when moving the RPM and SPEED needles the move slow and its not continous.

I am sending the actual speed or rpm value from the arduino to the render thread. lets say 1000 rpms ans if the next read its 1200 rpms for a fast engine movementthe needle will JUMP from 1000 rpms to 1200 rpms but it wont move smootly, it will jump..... How can I achieve a more natural movement????

I have tested moving increasing 100 rpms on wach arduino loop, even with that small movements the jpct app wont show smooth movement, in fact I see delays between each loop.

ANy ideas???
#4
Projects / Re: Instrument Cluster for a Muscle Car
March 31, 2018, 12:41:19 AM
Yes I am using jpct as a 2d engine.-
#5
Projects / Re: Instrument Cluster for a Muscle Car
March 30, 2018, 03:07:08 PM
Here is a pic of the app.
#6
Projects / Instrument Cluster for a Muscle Car
March 30, 2018, 02:56:59 PM
Hi friends, I am in a project building a custom cluster for the classic car I am restoring.

The idea is to do a digital instrument cluster using an android device with a jpct app and Arduino to link the Electronic with the app. Hope I can receive help for my project as I always have had.

Geetings from Ecuador.
#7
Support / Re: My Object3D just dont want to rotate.
March 15, 2018, 02:26:26 PM
SOLVED: The problem was neither the pivot center nor the maths. The problem was that I was referencing and moving an Object3D and adding another one to the world. I fixed this and everything is working.
#8
Support / Re: My Object3D just dont want to rotate.
February 27, 2018, 03:56:18 PM
The Rotation Pivot is relative to the object?? OMG..... Thanks, I will try it
#9
Support / My Object3D just dont want to rotate.
February 23, 2018, 12:12:15 AM
Hi guys, I am building a car instrument cluster with jpct, I am trying to move the rpm and speedometer needles but they just dont rotate.

I have a small object where the needle pivot  should be. I am doing this:

speed_neddle.setRotationPivot(speed_pivot.getROtationPivot());
speed_neddle.rotateZ(any value);

but it just wont move.


Any ideas?
#10
Support / Re: 2d animations on Android
January 07, 2017, 06:14:28 PM
Egon... I have been reading about this SurfaceTexture and loading them from the media player, before using time on it, the question is: will this SurfaceTextures be able to  be loaded as animated Textures...

What I am trying to do is not streaming or show cinematics on background. I am tring to load a gif or video as a Object3D texture.
#11
 :'( :'( :'( :'( :'( :'(

Its working now....

I checked and re checked.... and re checked and everything seemed the same, finally I deleted my code copied yours and began to work fine.....

I dont know why or how but its working anyway. Thanks a lot.
#12
oh you mean I missed calling to fb.clear();  ??? That was the first thing I checked and rechecked. the problem is that the texture is not being cleared. Anyway I will load the example code you posted and will test it again.

Another question...is it imposible to load two GLVIEWs  and select on which write each render, just like like textures targets, but with the GLViews??? I am worrying about performance and memory ussage.
#13
I Will test the example at night in home and write back.... but just in case..... how do I clear the image?? the piece of code was taken from the example but maybe I deleted something...
#14
Sorry, I guess my English its a shame.... :'(

I have 2 textures, one blited on the left and one blited on the rigth.

on each one of the textures happens this:

" lets say I have a world with a cube, then I draw the framebuffer into a texture and blit it. then I move the camera and render it again into the same texture, when I blit it again I see 2 cubes, not only one.".... then I move the camera and render for third time and then each texture will show 3 cubes, on the fourth render each texture will show 4 cubes and so on.....

If I construct the texture on every loop of the render it is corrected but the memory fails after the very first renders.....
#15
Sure the code doesnt do that and I wasnt doing it either before, but when the texture is redered I got it mixed with previous states.

I have no access to the code right now but.... lets say I have a world with a cube, then I draw the framebuffer into a texture and blit it. then I move the camera and render it again into the same texture, when I blit it again I see 2 cubes, not only one.