Remember me
You are here: HomeForumCyberix3D ForumGeneral DiscussionDetecting objects in within range?
Welcome, Guest
Username: Password: Remember me

TOPIC: No collision and 2D images in APK export

No collision and 2D images in APK export 7 years 7 months ago #538

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
I'm not sure if this is a bug, my fault or if APK export is waiting to be synchronized with the new editor, but it seems that camera lost the collision-ability and 2D images are not visible on the screen.

This is the link to my APK test-project, it's a 'minimal' version of my main level prototype, and it's functioning correctly but when exported to APK the player(camera) loses the collision and there are no 2D images on the screen :(

www.gamemaker3d.com/player?pid=051530016638
The administrator has disabled public write access.

No collision and 2D images in APK export 7 years 7 months ago #540

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
We have synchronized the APK version and now the images and collisions are working.

There is still a slow loading and performance issue when using "Polygon Collision" in the android version. This is a main limitation of the 3D engine we are using and there isn't much we can do about it.
The workaround is to use invisible shapes like Cubes and Planes for the collision. It is best to use as fewer shapes as possible. For example, you can use one plane for the stairs instead of many Cubes for each stair. For best performance make sure that all the collision shapes in each room are combined with the Merge command.
We don't know if it's the best solution for the Web either regarding performance, but you can check it out.

Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #541

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
Great news, thank you so much, I just tried it, collision is functioning and images are showing :) :)

Yes I have noticed that there were some problems with polygonal collision even in web-versions.

This is very good to know, I used simplified OBJ room-shaped collision boxes because I had them already but it's not a problem to replace them with editor's box and plane models.

So, if I got it, the best solution would be to:
1. Recreate simplified room shape with editor's Box and Plane models.
2. Sett Collision and Static to 1 (should I also sett Polygon Collision to 0 or leave it empty?).
3. Place them in a Merge container.

..and just two additional questions:
1. Is there a big difference between Merge and Group container and can I place Group container inside the Merge container?
2. For main (non-collision) room geometry (that I placed in Group-containers) I checked Static in both Group container and OBJ models, should I sett 0 to Polygon Collision for all or just leave it empty?
Last Edit: 7 years 7 months ago by Ganderoleg.
The administrator has disabled public write access.

No collision and 2D images in APK export 7 years 7 months ago #542

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
So, if I got it, the best solution would be to:
1. Recreate simplified room shape with editor's Box and Plane models.
Yes, with invisible shapes (visible = 0 or alpha = 0). visible = 0 will be faster but for debugging you can use alpha=0
2. Sett Collision and Static to 1 (should I also sett Polygon Collision to 0 or leave it empty?).
Leave it empty
3. Place them in a Merge container.
Yes. A separate Merge container for each room.
..and just two additional questions:
1. Is there a big difference between Merge and Group container and can I place Group container inside the Merge container?
The Merge is combining all of the objects into one object. The Group is just grouping the objects under the same father but not merging them into one. With the Group container, you can still move the child objects in game time but with Merge you can't.
We haven't tested Group inside Merge but it might work.
2. For main (non-collision) room geometry (that I placed in Group-containers) I checked Static in both Group container and OBJ models, should I sett 0 to Polygon Collision for all or just leave it empty?
When using static under a Group container, the collision will be the bounding box of the Group and not the subgroup elements.
For the subgroup elements collision, you can check the "Sub Model Collision" inside the Group container.

Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #543

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
Thank you for your answers, they are very helpful.

I'm not sure that I understood the suggestion for the second additional question, it seemed that checking the Static property implicates the collision functionality :unsure:

My room-concept should be:
1. For collision:
Simple editor-models inside the Merge container with Static and Collision property sett to 1 and Visible or Alpha property sett to 0.
2. For visuals:
More complex OBJ geometry inside the Group container with Static property sett to 0? ..or should I leave the Static property empty?

I'm sorry for the followup questions, I thought that Static property implied the non-dynamic geometry, not collision modes :(
The administrator has disabled public write access.

No collision and 2D images in APK export 7 years 7 months ago #544

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
I'm not sure that I understood the suggestion for the second additional question, it seemed that checking the Static property implicates the collision functionality :unsure:
The static property always comes with the collision property. If the collision property is checked and the static property isn't checked, the object will fall, and if the collision property is checked and the static property is also checked the object will stay still.
2. For visuals:
More complex OBJ geometry inside the Group container with Static property sett to 0? ..or should I leave the Static property empty?
The complex objects of the scene don't need collision at all. You just need to leave the collision and static properties empty in both the scene objects and the group container.
I'm sorry for the followup questions, I thought that Static property implied the non-dynamic geometry, not collision modes :(
For the collision models (invisible Cubes and Planes), you need to check both collision and static properties.

We hope we understood your question correctly, and if not, don't hesitate to ask more questions! :)

Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #545

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
Here is an example of how it should be done:
www.gamemaker3d.com/player?pid=01616655

You just need to use a Merge container with sub-models under it and set the collision and static for each sub-model.
The Group container will not work because it is not supporting sub model collision well.
We will add an option to change the Merge position (x,y,z). That way you could duplicate collision shapes from room to room.
You can start a prove of concept only for the first room and we will add the Merge position to make it easier for the rest of the rooms.
Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #546

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
Thank you for the answers and for the example file, it's now very clear :)

The mobility of the Merge container is a good idea, it will be much easier to move around merged geometry.

So far I used per-room based collision boxes (in obj format) because I already made them when I was making the initial room's geometry. Since I will be creating a new collision boxes in Editor with Editor's models there is no need to make them per-room based. I will just make a level-based collision geometry inside a Merge container. This way I won't have double walls or floors and I will save-up on some geometry-count :)
The administrator has disabled public write access.

No collision and 2D images in APK export 7 years 7 months ago #547

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
A level-based collision sounds great.
Please post an update when it's ready and tell us if it solves the slow android loading and if it improves the performance.
Good luck
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #561

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
We have good news for you!

The APK full export is ready and you can now test it via the beta channel:
www.gamemaker3d.com/editor/beta.html

The APK you will export from now on will be available offline, and the loading speed will be much faster.

Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #562

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
This is epic news, thank you so much :woohoo:

I tested the old APK export last night and just wanted to say that it worked incredibly good B) The AWD geometry (instead of OBJ models) and collision with editor-cubes really made a big, BIG difference :) Loading time of the entire 'Golden Palace' level (with enemies and lights) was about 30 seconds and every geometry-part was present in the level. Movement / Camera Speed was also 10 times better.

Can't wait to try the new full APK exporter, I will post how the process went as soon as I test it :)
The administrator has disabled public write access.

No collision and 2D images in APK export 7 years 7 months ago #563

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
New full APK export is working INCREDIBLY good :woohoo: :woohoo: Only 20 seconds for entire level, everything is loaded on the level-start, camera movement is smooth, animated models are functioning exactly as they should, no problems what so ever B) :)

Thank you for all the hard work on this engine, it's really turning out to be an amazing choice when it comes to multi-platform 3D engines :) I am really, really glad I have found it and started working with it :)

....................................

EDIT: My tablet specs:

Gigaset QV 830
Android version 4.2.2
Kernel version 3.4.5
Last Edit: 7 years 7 months ago by Ganderoleg.
The administrator has disabled public write access.

No collision and 2D images in APK export 7 years 7 months ago #564

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
We are happy to hear things are getting better :)

If you need more help with adjusting your game to higher quality don't hesitate to ask.

There is an important thing we need to tell you about your collision shapes: In order to gain performance, you must set the visible variable to 0. You don't need to do it for each object separately, You can just set the visible=0 inside the "Merge" container.
Another solution for keeping the shapes visible in editor mode only is to add a "Set visible=0" inside the Merge container. The Set command will run only in runtime mode.

Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #565

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
And another important thing about the android version: The First Person Camera Controller is still an issue. You can see the effect it has on performance by pressing the back button in your tablet while there is a lag in performance. Pressing the back button disables the FPS Camera Controller collision while the exit dialog is shown and it is a good way to see how much the FPS Camera controller is affecting the performances.
We are planning to develop a new FPS Camera Controller that will have the performance of the fake camera controller that we already showed you.
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #566

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
Thank you, I just finished placing the collision-cubes in my level, they are all in one Merge container, I will check Visible property to 0 as you suggested :)

...I must admit I took a shortcut with stairs-platform objects, simplified it, converted it to AWD and gave it a Polygon Collision :blush: Everything else (walls, floors and pillars) is done with editor-cubes but this was a bit tricky and I left it for later :)

You are right, It's actually noticeable when player is in contact with Polygon Collision geometry (it's on the stairs-platform object), the camera is a bit less smooth, but when player is off the object everything is working optimal, even in APK export.

...........................
I just tested the back button on tablet, the camera panning is faster while the exit-dialog is active :blink:

When you showed me the Fake CC I was amazed with how much it was faster then the Regular CC but I was unable to replicate gun appearance and gun movement with it and also there was a problem with enemy AI ...if I remembered it correctly :unsure: I will try to implement it again when I finalize the level and see if it goes better for the second time :)
The administrator has disabled public write access.

No collision and 2D images in APK export 7 years 7 months ago #567

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
You don't need to implement the fake CC. We are planning to implement it as part of the engine. That way you could just use it as you are using the regular FPS CC and you won't have trouble with the collision, jump, and gun. It will work the same way as the current FPS CC but with better performance on Android even if you use Polygon Collision.
We will let you know when it is ready.
Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

No collision and 2D images in APK export 7 years 7 months ago #568

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
That's going to be great, I was really amazed with how good the Fake CC worked in your terrain level and in my own level, both in web and apk export versions :)
The administrator has disabled public write access.
Time to create page: 0.105 seconds