Plans for documentation and working demos

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Plans for documentation and working demos

Postby FSA » Wed Jan 13, 2021 3:20 pm

What are the plans for a complete documentation and working demos?
I like newton, but over the years (since newton 2.14/ newton 3) it has become increasingly difficult to even know, what Newton can do. It always seemed to me, that it is just expected from the user to know what the functions do or what the physics behind it are, even looking at the current documentation this is true. Most function doesn't have a documentation at all, and those that have don't explain anything. One example: "MaterialSetContactElasticity", the docs say this function changes the contact elasticity. But nothing is explained about what that is or what the results for the simulation are.
Sadly most demos are also not working (instant crash). When looking at the code, it is mostly extremely over complicated and doesn't focus on the thing it shows. Or there is so much other inactive code, that you don't even know what the demo should show.
An overview of the advanced features would also be nice (cloth, liquid, particles, body manipulation, fractures,...). Or what you can do with callbacks, how to manipulate bodies, what the player controller can do, etc.
Until now, I just needed simple dynamic body physics but I want to implemented more advanced stuff, but can't find any info about it. Also, focusing on these things would attract many more user to newton. Newton is known by many people (at least in my surroundings), but nobody wants to use it, because you would need months just to understand the engine a bit (and no, not because newton allegedly is the victim of some physics engine/personal things war).
Users expect to get an idea on how the engine is working, what it can do and how to use it.
It would be nice, if those things could get a bit more attention. It would help existing users of Newton as well as new users.

Greetings
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Plans for documentation and working demos

Postby Julio Jerez » Thu Jan 14, 2021 12:45 pm

I am aware of these complaints.

for that I am using dioxygen to add auto documentation from source. but thsi will onel be available in newton 4.xx and on.

you can download 4.0 and see the process, it is early stage, but is has the doc system hooked
technology wise is faster and more acurate than 3.13 while is and is much simpler to use.

the only difference is that it is a c++ direct interface as oppose to 3.14 that was c and c++

for you description of hwo use use it is should be a good fit for you. give it a try.

on teh doc part, some file are already documented, but even when not literal description is given that fact that doxigen generates and UML kind of description is already a big win in understanding that engine architecture.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Plans for documentation and working demos

Postby FSA » Fri Jan 15, 2021 1:40 pm

Are the demos already working in Newton 4?
When I compile and run ndSandbox it crashes at startup (Line 148 in ndDemoEntityManager.cpp).
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Plans for documentation and working demos

Postby Julio Jerez » Fri Jan 15, 2021 2:56 pm

they are suppose to be working yes.

glfwWindowHint(GLFW_SAMPLES, 4);
that like is not part of Newton, it is use to draw antialias lines in gl, maybe you gpu does not supports it, try comment the line out.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Plans for documentation and working demos

Postby FSA » Sat Jan 16, 2021 6:04 pm

Sorry, I meant one line above (Line 146 glfwInit()). I will never understand why visual studio highlights the next call, after the exception... :roll: Seems like something with openGL and not newton.

Here is an image of the debugger output: https://ibb.co/fQBFYG0
Image

My GPU is the first generation GTX Titan, it should support almost everything (except raytracing).
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Plans for documentation and working demos

Postby Dave Gravel » Sat Jan 16, 2021 9:39 pm

Hi FSA, I'm curious what is your graphics card ?

Edited: Oh I see.
Maybe you can try to set opengl options and version manually
Code: Select all
   glfwInit();

   glfwWindowHint(GLFW_SAMPLES, 4);
   glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);
   glfwWindowHint(GLFW_CONTEXT_NO_ERROR, GLFW_TRUE);
   glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
   glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
   glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);
   //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
   glfwWindowHint(GLFW_DOUBLEBUFFER, GL_TRUE);
   glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
   glfwWindowHint(GLFW_DECORATED, GL_TRUE);
   //
   glfwWindowHint(GLFW_DEPTH_BITS, 24);
   //
   glfwWindowHint(GLFW_STENCIL_BITS, 0);
   //
   glfwWindowHint(GLFW_RED_BITS, 8);
   glfwWindowHint(GLFW_GREEN_BITS, 8);
   glfwWindowHint(GLFW_BLUE_BITS, 8);
   glfwWindowHint(GLFW_ALPHA_BITS, 8);
   //
   glfwWindowHint(GLFW_ACCUM_RED_BITS, 0);
   glfwWindowHint(GLFW_ACCUM_GREEN_BITS, 0);
   glfwWindowHint(GLFW_ACCUM_BLUE_BITS, 0);
   glfwWindowHint(GLFW_ACCUM_ALPHA_BITS, 0);
   //
   glfwWindowHint(GLFW_AUX_BUFFERS, 0);
   glfwWindowHint(GLFW_REFRESH_RATE, 0);
   //
   glfwWindowHint(GLFW_SRGB_CAPABLE, GL_FALSE);

Or maybe you need a driver update.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Plans for documentation and working demos

Postby FSA » Sat Jan 16, 2021 10:51 pm

Thanks for the tip.
Unfortunately the "glfwWindowHint" functions won't be executed, because the crash happens inside "glfwInit". I also noticed, that I can just continue after the crash, and the program starts.
I updated the driver to the newest version, same problem.

After some experimenting, the crash does not happen, when I unplug the second monitor :shock:
Is an unstable version of GLFW used or how can this behaviour explained?
I do not have this problem with the demos from newton 3.
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Plans for documentation and working demos

Postby Dave Gravel » Sat Jan 16, 2021 11:04 pm

Yes I have think about monitor too when I have see the error report in the screenshot.
I use single monitor here.

Maybe you can find the solution here:
https://www.glfw.org/docs/3.3/monitor_guide.html
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Plans for documentation and working demos

Postby JernejL » Wed Jan 20, 2021 7:56 am

A LOT of these things are explained on the wiki from information i gathered on forums:

http://www.newtondynamics.com/wiki/index.php/Main_Page

Wiki is assembled from additional sources and not just from doxygen / code comments.

Contact elasticity is mentioned here:
http://www.newtondynamics.com/wiki/inde ... al_Section

NewtonMaterialSetDefaultElasticity - Sets default elasticity of collision between materials (coefficients of restitution) - https://en.wikipedia.org/wiki/Coefficie ... estitution
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Plans for documentation and working demos

Postby FSA » Fri Jan 22, 2021 11:10 pm

The wiki also states that more than 70% of the functions are undocumented. But the bigger problem in my opinion is, that users don't know what newton can do and how to properly use it. You cannot know these things just by list of available functions.
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Plans for documentation and working demos

Postby FSA » Sun Jan 24, 2021 1:44 am

Are cloth and deformable meshes / soft bodies planned for newton 4? As far as I know it was implemented in newton 3.x but never in a stable state. The cloth demo in newton 3 is broken, so I think this feature wasn't that important.
Also what are the plans for NewtonMesh? I never used it, and I think in case of fluid/soft bodies it would be simpler to get a list of vertex coordinates back from the simulation, instead of using NewtonMesh.
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Plans for documentation and working demos

Postby FSA » Wed Jan 27, 2021 9:36 pm

Will there be a full documentation in newton 4 with doxygen, or just a list of classes/methods like now?
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Plans for documentation and working demos

Postby Julio Jerez » Thu Jan 28, 2021 12:20 pm

Yes the cloth and deformable body are planned.
The cloth solver was thrr and it is quite good, the collision not so much, but now I have a way to make efficient and accurate collision for cloth.
Also the visual mesh was not very good either, but I think we can fix that as well.

As for doc, I will try to add as I go, but having the uml generated by doxigen, I think is a big help.
Some of the classes are documented but those are the very low level core.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Plans for documentation and working demos

Postby FSA » Thu Jan 28, 2021 9:08 pm

It would be nice if we could get a documentation for high level things too. It's would be a great help for implementing Newton's more advanced stuff like cloth/fluid that is planned now.
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Plans for documentation and working demos

Postby Julio Jerez » Thu Jan 28, 2021 9:40 pm

yes, I agree, I will try adding it as I write them.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 27 guests

cron