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.


Topics - AleNovi

Pages: [1]
1
Support / Voxel engine
« on: September 11, 2017, 10:16:27 am »
Hi all!
I need to make something like a voxel renderer but don't know how to do it properly with jPCT. (max around 13.000.000 blocks)
When i'm trying to make many cubes (Object3D with 12 Triangles) it makes low fps after ~50 objects.
Next, if i use one object by "mergeAll" - fps is stable ~60 but it takes many time to load (around 3sec for 12.000 blocks)
Load 13.000.000 in libGDX takes around 3sec.
I'm new in jPCT and do not found the same question So, any idea how to optimize this?

2
Support / Transparency issue
« on: June 25, 2017, 11:59:58 am »
Hi there!
I have some issue with transparency:http://radikal.ru/video/evjcydyhsoc
How it works now: Each not transparent cube is created as a separate object, then they are combined using Object3D.mergeObjects(not_transparent_object, current_cube);
In addition, transparent objects are combined into a second object Object3D.mergeObjects(transparent_object, current_cube);
So one layer = two Objects - one not transparent and one transparent (o3d_t.setTransparency(255))
This method provides good performance but transparent objects conflict with each other (in video yellow block and bars are transparent).
Is there any way to fix this? I'm new to the engine, so I could not notice any method that can fix it.
Thanks.

3
Support / Camera rotation
« on: May 27, 2017, 12:41:49 am »
Hi All!
I'm starting to develop an application that should display a 3D model, but i can't understand how correctly rotate camera around object.
I tried to use this guide http://www.jpct.net/wiki/index.php?title=MultiTouch_camera_controls but it not exactly what i need.
I want to rotate camera like in this app https://play.google.com/store/apps/details?id=com.tdcp.threedc or this https://play.google.com/store/apps/details?id=jquinn.qubism.android
Now i have this code to move camera, based on guide which i wrote above.
    private void moveCamera() {
        Movement movement = _movementhandler.getMovement();
        SimpleVector cam_pos = new SimpleVector();
        Object3D MyObject = one_layer.get(one_layer.size()/2);

        if (movement.hasMovement()) {
            Camera camera = world.getCamera();
            camera.getPosition(cam_pos);
           
            SimpleVector backVect = MyObject.getTransformedCenter();
            backVect.scalarMul(-1.0f);
            Matrix rotationmatrix = new Matrix();
            rotationmatrix.translate(backVect);
            rotationmatrix.rotateY(movement.cameraRotationY);
            rotationmatrix.translate(MyObject.getTransformedCenter());

            cam_pos.matMul(rotationmatrix);
            camera.setPosition(cam_pos);
            camera.lookAt(one_layer.get(one_layer.size()/2).getTransformedCenter());

            camera.moveCamera(Camera.CAMERA_MOVEUP, movement.worldRotationX*10);
            camera.moveCamera(Camera.CAMERA_MOVEIN, movement.cameraMovementZ);
        }
    }


The camera twitches during the rotation so I probably need to change the code.
Maybe someone knows good examples with the source code. I will be grateful for any help.

Pages: [1]