25 pagesV  1 2 3 4 5 6 > »  
 
THEME IS CLOSED
> The first attempt with 3D is a bunch of problems. | simulator
mihail_13
Message#1
20.06.16, 21:17
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

������ ������� � 3D - ���� �������. download


Version: 1.0
Last update in the header: 06/20/2016

Brief description of the game:
simulator

Genre: not really a game
Android version: any

Full description of the game:
Immediately see the following problems with 3d:
1 The image of 3d objects is not smoothed (the edges are highly jagged).
2 Individual objects from some distances can be seen turned inside out, from other distances it is normal. Objects consisting of one polygon are not fully visible or not visible at all, even if there are no overlaps with other objects.
3 Between some polygons visible slits.
4 Some parts of objects look flat, although they actually have a convex shape.
Are these problems somehow treated?

There was also a problem with the interface turning the head. How do you usually solve it?

I have never written such applications before - they are interested in all useful tips / comments on it.


Files:
Attached filepdd.apk(21 MB)
mastersmit
Message#2
20.06.16, 21:33
Krutyak
*********
[offline]

Group: Friendssavagemessiahzine.com
Messages 5623
Check in: 27.01.10
ZTE Nubia Z17 6 GB RAM

Reputation:-  316    +

Screenshots come on} -)


--------------------
Acer Aspire E15 ([email protected], 2x4Gb DDR3-1600 Kingston, HD5500 + GF 940m 2Gb, 500Gb HDD, Win10)
Huawei U8860 Honor >Sony Xperia ZR C5503 >Nubia Z17 6/128 Stoke 6.10
Nuclear/Nuclear world
mihail_13
Message#3
21.06.16, 10:59
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

In the dynamics it is more noticeable, but what could have done in the pictures.

The border of the windshield is jagged, the markings are strongly jagged, sometimes solid is displayed dotted or not displayed at all.
Attached Image


At the traffic light, two green - the second climbed through the other side
Attached Image


Left doors "badly damaged" - through them are visible some internal parts of the car
Attached Image


The left bus in the mirrors turned inside out
Attached Image


Both buses got out of the muzzle ass
Attached Image


And in all forms, except for the outside, the dashboard (without instruments) looks flat, although it actually has a normal shape.

Post has been editedmihail_13 - 21.06.16, 14:57
mihail_13
Message#4
22.06.16, 13:56
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

Too simple problems? Tell me at least by what names to look for it - google doesn't know how to determine the problem, he needs words.
Serg ()
Message#5
22.06.16, 14:22
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 92
Check in: 07.05.15
Sony Xperia Z2

Reputation:-  5  +

With regards to traffic lights and buses, most likely you have something with normals (this happens when you convert a model from one format to another). Try loading your models into which thread editor and see if it displays correctly.
Serg ()
Message#6
22.06.16, 14:39
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 92
Check in: 07.05.15
Sony Xperia Z2

Reputation:-  5  +

I correctly understood, you wrote a program without using engines only java and OpenGL ES? If so, these effects can cause a lot from incorrect settings of OpenGL to trivial errors when working with data buffers and shaders.
romax9lahin
Message#7
22.06.16, 15:53
Old resident
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 899
Check in: 20.01.13
Samsung Galaxy S6 Edge SM-G925F

Reputation:-  75  +

Also, by the way, road signs in mirrors are buggy)
You have with the projection (?) Some garbage probably.
Looks flat - naked texture, or directional light source
mihail_13
Message#8
22.06.16, 17:50
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

Serg () @ 06/22/2016, 2:22 PM*
With regards to traffic lights and buses, most likely you have something with normals (this happens when you convert a model from one format to another). Try loading your models into which thread editor and see if it displays correctly.

I did not accidentally say that it was necessary to look at the dynamics, not to see everything in statics - whether the bus was turned out or not, one green at a traffic light or two depends on the distance to it. And in the case of buses, for some reason, turning inside out is only in the mirrors (like the camera is the camera, she does not know when the mirrors look like and when the main one, the difference is just that for the mirrors in texture and the main one on the screen)
The buses still have a problem (seen only in the mirrors) - when the bus turns the corner, it is visible through the fences (in the pictures it is not clear therefore it did not do).

Serg () @ 06/22/2016, 2:39 PM*
I correctly understood, you wrote a program without using engines only java and OpenGL ES? If so, these effects can cause a lot from incorrect settings of OpenGL to trivial errors when working with data buffers and shaders.

No, I did not manage to master OpenGL quickly (and I hoped to do a prog in a month ...), so I used libgdx.
The models (except for the car that was taken ready) were created in 3ds max and converted to d3db with the normal inversion key.
What is shaders and how to use them, I still could not understand.

Romax9lahin @ 06/22/2016, 15:53*
Also, by the way, road signs in mirrors are buggy)
You have with the projection (?) Some garbage probably.
Looks flat - naked texture, or directional light source

Road signs are buggy? How?
They have made an image through. Does it get in the way?

With the projection of complete garbage. But as I understand it in OpenGL there is no proper projection at all. and in orthographic it is still worse than in perspective, although the perspective is miscalculated there.

I tried to “stick” the texture, but it seems that in 3ds max you can only impose a texture on a rectangular polygon, otherwise it disfigures it beyond recognition.

I will try to make a directional light source (I haven't figured it out yet, I took that by default)
mastersmit
Message#9
22.06.16, 18:03
Krutyak
*********
[offline]

Group: Friendssavagemessiahzine.com
Messages 5623
Check in: 27.01.10
ZTE Nubia Z17 6 GB RAM

Reputation:-  316  +

Mihail_13 @ 06/23/2016 00:50*
I tried to “stick” the texture, but it seems that in 3ds max you can only impose a texture on a rectangular polygon, otherwise it disfigures it beyond recognition.

Yes sho you say so ..


--------------------
Acer Aspire E15 ([email protected], 2x4Gb DDR3-1600 Kingston, HD5500 + GF 940m 2Gb, 500Gb HDD, Win10)
Huawei U8860 Honor >Sony Xperia ZR C5503 >Nubia Z17 6/128 Stoke 6.10
Nuclear/Nuclear world
mihail_13
Message#10
22.06.16, 18:14
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

Mastersmit @ 06/22/2016, 18:03*
Yes sho you say so ..

It's easy to laugh when you know everything.

I am faced with this road signs. Since the transparency in the textures could not be reflected by the transparency, I decided to move the vertices to give the square polygon the shape I needed - it did not work out with a triangle. The circle took ready (from the cylinder) - to guess where my sign did not succeed, I had to go another way.
I didn’t do the dashboard of the car (I won’t do this), and no one guesses how everything is crippled (and it’s not flat).
Serg ()
Message#11
22.06.16, 19:59
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 92
Check in: 07.05.15
Sony Xperia Z2

Reputation:-  5  +

I'm certainly not a big spec in libgdx, but I would venture to suggest that you also need to enable-clear the depth buffer. Are there any lines?

GLES20.glClear (GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
GLES20.glEnable (GLES20.GL_DEPTH_TEST);
mihail_13
Message#12
22.06.16, 20:54
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

Serg () @ 06/22/2016, 19:59*
I'm certainly not a big spec in libgdx, but I would venture to suggest that you also need to enable-clear the depth buffer. Are there any lines?

GLES20.glClear (GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
GLES20.glEnable (GLES20.GL_DEPTH_TEST);

Yes, the first is (without it, nothing at all is displayed). No changes from adding a second could be made out (possibly allowed by default).
ProgramZistor
Message#13
07.07.16, 20:25
Experienced
******
[offline]

Group: Friendssavagemessiahzine.com
Messages 622
Check in: 25.02.16

Reputation:-  233  +

Mihail_13 @ 06/20/2016, 21:17*
The image of 3d objects is not smoothed (the edges are highly jagged).
No anti-aliasing. This is not a problem if the pixels on the screen are small.
Mihail_13 @ 06/20/2016, 21:17*
Separate objects from some distances are visible turned inside out
Maybe not from some distances, but from some angles?
Mihail_13 @ 06/20/2016, 21:17*
Visible slots between some polygons.
This should be corrected in the 3D editor.
Mihail_13 @ 06/20/2016, 21:17*
Some parts of the objects look flat, although they actually have a convex shape.
We need lighting, but let's solve the previous problems first.

First guess: Turned out buses and missing doors -notbecause of the normals, and because of the reverse order of the vertices. Although in the editor, these concepts may be related.
More precisely, the doors in the car - apparently, an error in the simulation, the doors turned inside out.
And the buses in the mirrors - here, it seems to me, the problem in setting up the camera for mirrors?
But what I do not understand is why it manifests itselfnot at allbuses, and yes even depending on the distance?

The second guess: if the problem manifests itself not in distance, but in perspective, then the reason is not in the curve of the model. It looks like the depth test is not enabled or not configured.

About the prospects. Do you use OpenGL ES 1.x and glFrustum? Or some other function?
Mihail_13 @ 06/22/2016, 5:50 PM*
directional light source try to do
No, you must first deal with libgdx.

Mihail_13 @ 06/22/2016, 18:14*
Since transparency in textures is not transparent
If the version of OpenGL ES 1.x, then you probably need to enable the alpha test (I'm not sure if it is on ES 1.x, it should be like).

In general, I was interested in this libgdx, and, it seemed to me, it does not really give anything - no “leveling up” of programming.

Added by:I can not see the graphics in the dynamics, because nifiga can not control this machine! (However, like the present one) And is it possible in the debug version to make control more primitive, even if not real?

Post has been editedProgramZistor - 07.07.16, 21:06
Reason for editing: I thought


--------------------
They say time is money. They lie! Time is more valuable than money, because time cannot be bought!
A bad tool multiplies your efforts by zero, a good one by one. Excellent - by the number more than one!
Do not confuse concepts: appreciate things, love people.
mihail_13
Message#14
07.07.16, 21:15
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

As it is now known, everything is much worse.
Some of the problems were solved, but the problem with buses expanded and also proved to be iron dependent.
Objects not only turn inside out, but objects that are far away can be seen through those that block them (even through several layers), and somehow translucent. (the blender is prohibited, the last objects are visible)
In principle, it’s possible to organize it yourself, but it will not be a pain, and turning it inside out will not help.

The fact that the problem with the model (normals, the order of vertices, etc.) or with the camera for mirrors does not believe.
Tested on the phone - and everything is just fine in the mirrors (and anti-aliasing works)
On my computer - a problem only in mirrors (except for traffic lights - they are buggy without mirrors)
A friend turned out not only buses and not only in mirrors
I look
Attached Image

Autopsy car
Attached Image


OpenGL ES 2.0 version

I didn’t think up how to do better management (and I’m already used to it - I’ve been tested before the real exam I passed before I wrote it in the application). He asked in a parallel topic, but apparently everyone who saw the latest version died immediately, since there was not a single answer. Dvizhek strongly tied to a realistic manual transmission, so I do not know how to simplify it for the test version - it can not survive.

What a "" level of "programming." Should be from libgdx I do not know. I wanted something simple (it turned out to be not quite simple) to quickly write, but when I started to understand openGL I realized that even with loading a model from a file, I would torment myself a lot of time.
From the ready libraries I found libgdx and unity (I didn’t like the second one more).

Post has been editedmihail_13 - 07.07.16, 21:35
ProgramZistor
Message#15
07.07.16, 21:21
Experienced
******
[offline]

Group: Friendssavagemessiahzine.com
Messages 622
Check in: 25.02.16

Reputation:-  233  +

I thought and updated the answer.
the objects that are displayed last are visible
Yes, exactly, this is a non-working depth test. Do you request a depth test when starting libgdx?
(I don’t know how to do it, since I don’t use libgdx. I somehow looked at a page somewhere, I didn’t really remember anything ... But you can search the Internet).

It seems to me that some devices by default create a context with a depth buffer, and some without. If there is no depth buffer, then the depth test will not work.
You must explicitly require a depth buffer.

Here is a topic about libgdx. Maybe it is written there?LibGDX Tutorials

Post has been editedProgramZistor - 07.07.16, 21:35


--------------------
They say time is money. They lie! Time is more valuable than money, because time cannot be bought!
A bad tool multiplies your efforts by zero, a good one by one. Excellent - by the number more than one!
Do not confuse concepts: appreciate things, love people.
mihail_13
Message#16
07.07.16, 21:50
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

As far as I understand its inclusion (in libgdx) is done by two commands
Gdx.gl.glClear (GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
//Gdx.gl.glEnable (GG20.GL_DEPTH_TEST);
The second is not needed, since it is enabled by default (but tried it and with it - nothing changes)
(and without the first, nothing will be output at all, regardless of the state of the second)

But how does the depth test explain that everything is normal on the phone, on one computer the problem is only in the mirrors, and on the other just horror?
(the strangest thing is when it is only in mirrors - does it get a buffer, that is, no?)

The libgdx thread has been silent for over a month now ...
ProgramZistor
Message#17
07.07.16, 22:48
Experienced
******
[offline]

Group: Friendssavagemessiahzine.com
Messages 622
Check in: 25.02.16

Reputation:-  233  +

Gdx.gl.glClear (GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
This is not enough. This is the cleaning of the depth buffer, and you must first create it.
(the strangest thing is when it is only in mirrors - does it get a buffer, that is, no?)
I answered:
Probably, some devices by default create a context with a depth buffer, and some - without. And how libgdx includes a render in texture - I don’t know at all.

By raising the level, I meant the transition to higher-level programming. I already doubt: was it libgdx or something else that I read briefly? There, for example, the romp with the vertex buffer was not wrapped up at all, that is, the loading of models with the help of its code.

And in general, with the "acquaintance" with the next engine, I’m scared to make my own, right engine!
So this is where all these engines come from: everyone wants to finally do everything right!
Only now I don’t want to program anything, it's too late.


--------------------
They say time is money. They lie! Time is more valuable than money, because time cannot be bought!
A bad tool multiplies your efforts by zero, a good one by one. Excellent - by the number more than one!
Do not confuse concepts: appreciate things, love people.
mihail_13
Message#18
07.07.16, 23:07
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

This is not enough. This is the cleaning of the depth buffer, and you must first create it.

Pokaku, maybe really in this case.

By raising the level, I meant the transition to higher-level programming. I already doubt: was it libgdx or something else that I read briefly? There, for example, the romp with the vertex buffer was not wrapped up at all, that is, the loading of models with the help of its code.

Java will remain java that with libgdx, that without. And the fact that you have to work with the scene and not with each vertex - if it were not for this, I would have to write it myself, and this would take a lot of time - I decided not to reinvent the wheel. (You probably studied something else, not libgdx)
And the fact that together with the pluses you get a bunch of limitations and inconvenience - well, nothing can be done, and I would like to rewrite openGL as well ...
mihail_13
Message#19
08.07.16, 09:31
Guru
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2155
Check in: 21.03.14

Reputation:-  45  +

Positive results could not be achieved.
But it became clear that not one problem, but two.
Visibility of objects through other objects and turning inside out have different reasons (although it is very likely that libgdx is to blame in both cases)
If there is a string
DefaultShader.defaultCullFace = any integer;

then a two-sided display of polygons is turned on and buses in mirrors seem to lose some of the polygons (according to the documentation, on / off should depend on the value but does not depend)
But it is declared deprecated and told to use
DefaultShader.Config.defaultCullFace =

but not defaultCullFace is not declared static and so does not work a
DefaultShader.Config DefaultShaderConfig = new DefaultShader.Config ();
DefaultShaderConfig.defaultCullFace = -1;

generally does not affect anything.
If there is no line
DefaultShader.defaultCullFace = any integer;

- polygons remain one-sided (the car blows the roof, and some more problems), but buses in the mirrors are displayed normally.

This does not affect the visibility of some objects through others.

Line
DefaultShader.defaultDepthFunc =

If you specify 0, it mixes up the distances to objects in the main view and does not affect the mirrors in any way, if not 0, it doesn’t affect the main view, and everything in the mirrors disappears.
Serg ()
Message#20
08.07.16, 13:03
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 92
Check in: 07.05.15
Sony Xperia Z2

Reputation:-  5  +

Try inserting glDisable (GL_CULL_FACE); somewhere just before drawing a car. "Visibility of objects through other objects" is likely, as I said, problems with the depth buffer. try to insert as close as possible to the glEnable bus exit code (GL20.GL_DEPTH_TEST); (maybe libgdx turns it off somewhere later). It seems to me that you have trouble in the code that is responsible for drawing the view in the mirrors (most likely the settings of the OpenGL pipeline remain), try turning it off. Auto models if in a common format try to load them into a 3D editor, he draws it correctly. Look in the internet for libgdx can (this is "rendering to texture", I think mirrors are implemented through this) try updating the version of libgdx.
P / S. On Unity3D, I would have done everything for a long time and there will be more specialists on it.
ProgramZistor
Message#21
08.07.16, 14:51
Experienced
******
[offline]

Group: Friendssavagemessiahzine.com
Messages 622
Check in: 25.02.16

Reputation:-  233  +

I found the reason in the source code of LibGDX. It is "default"does not createdepth buffer. Some systems "arbitrarily" provide a depth buffer, but in an amicable way, you need to require it.
Do you have similar lines in your code?
config.useAccelerometer = false;
config.useCompass = false;
config.useWakelock = true;
config.useGL20 = true;
initialize (new MyGame (), config);
Try adding this line:
config.depth = true;
before this:
initialize (new MyGame (), config);


Regarding the management: can I even add a free-flying camera?

Post has been editedProgramZistor - 08.07.16, 14:59


--------------------
They say time is money. They lie! Time is more valuable than money, because time cannot be bought!
A bad tool multiplies your efforts by zero, a good one by one. Excellent - by the number more than one!
Do not confuse concepts: appreciate things, love people.

25 pagesV  1 2 3 4 5 6 > » 


 mobile version    Now: 20.05.19, 08:35