Timing Question

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Timing Question

Postby MeltingPlastic » Mon Jun 18, 2018 1:17 pm

that's to complicated, can just just make a binary executable that link to the newton DLL, I can debug for that, no need to install engine which is always a rabbithole for me and I do not have time for that.


Sure thing - I will spend some time today getting the project to link via dll and send you a build. (right now it actually links with embedded objects)

I've been tinkering a bit with Urho as well. Which event is your HandleUpdate-function subscribed to?
E_PHYSICSPRESTEP?
Just making sure HandleUpdate is actually called at even 16ms intervals and not at a variable rate which it would be if subscribed to E_SCENEUPDATE or E_SCENESUBSYSTEMUPDATE.


Hi Sweenie!

The HandleUpdate method is Subscribed to E_Update.
On my branch of Urho I have separated the renderer from the main update rate. So now the engine prioritizes the E_UPDATE event to be called at 60Hz and renders in the free time. So I am certain I am getting a constant 60hz call to the HandleUpdate Method. The concept of global frame no longer exists. It is now "Updates get issued independently from Rendering". With also the hope that in the future rendering will be truly live on a separate thread from the main one.

Perhaps we could work together for a good Urho-Newton Integration?
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Timing Question

Postby Julio Jerez » Mon Jun 18, 2018 2:28 pm

MeltingPlastic wrote:Perhaps we could work together for a good Urho-Newton Integration?

here is my question, is Urho a C++ engine?

if so I am in, but not fully committed, I can do some integration setting up some not so clear newton features Until you get up to speed and the you only need assistance in some new stuff.

I will try to get the engine tonight.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Timing Question

Postby MeltingPlastic » Mon Jun 18, 2018 2:38 pm

Code: Select all
here is my question, is Urho a C++ engine?

if so I am in, but not fully committed, I can do some integration setting up some not so clear newton features Until you get up to speed and the you only need assistance in some new stuff.

I will try to get the engine tonight.

https://urho3d.github.io/
Yeah it is full C++ and very cross-platform. Its been around for a while but recently there has been some good rework of the cmake build system by https://github.com/rokups My branch is a derivative of his branch. with namely changes to the update rate and some other things.

MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Timing Question

Postby Julio Jerez » Mon Jun 18, 2018 3:15 pm

oh darn, what a cool demo for a starter. :D :D
I guess you were not expecting this level of performance from Newton if you followed the opinions of the experts. If you get pass the advice of the expects, you will find that in fact some engine seem to be better than others. :shock:
I will try download the game engine an build it tonight first.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Timing Question

Postby MeltingPlastic » Mon Jun 18, 2018 3:48 pm

Ok let me know if you run into any issues getting it setup. Newton is a great engine and I'm looking forward to pushing it to its limits! (especially with the new multi threaded stuff your working on)
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Timing Question

Postby Julio Jerez » Mon Jun 18, 2018 4:58 pm

here we go,
I downloaded the engine and I try to run the cmake on it. MY cmake is 3.10.0-rc3 and as usual I get these errors.

CMake Deprecation Warning at CMakeLists.txt:31 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.15063.
CMake Error at CMakeLists.txt:39 (project):
Failed to run MSBuild command:

MSBuild.exe

to get the value of VCTargetsPath:

The system cannot find the file specified



Configuring incomplete, errors occurred!


It seem to come form the cmake scri file
# Set CMake minimum version and CMake policy required by UrhoCommon module
cmake_minimum_required (VERSION 3.2.3)
if (COMMAND cmake_policy)


but I do not see where to get cmake 3.2.3 on the website there is no download for that
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Timing Question

Postby Julio Jerez » Mon Jun 18, 2018 5:08 pm

never mind I wenr to the older release and got 3.2.3 now I can build the project but I am still getting some working and errors like this:
CMake Error at CMakeLists.txt:35 (cmake_policy):
Policy "CMP0063" is not known to this version of CMake.


CMake Warning at CMake/Modules/CheckHost.cmake:48 (message):
Could not use MKLINK to setup symbolic links as this Windows user account
does not have the privilege to do so. When MKLINK is not available then
the build system will fallback to use file/directory copy of the library
headers from source tree to build tree. In order to prevent stale headers
being used in the build, this file/directory copy will be redone also as a
post-build step for each library targets. This may slow down the build
unnecessarily or even cause other unforseen issues due to incomplete or
stale headers in the build tree. Request your Windows Administrator to
grant your user account to have privilege to create symlink via MKLINK
command. You are NOT advised to use the Administrator account directly to
generate build tree in all cases.
Call Stack (most recent call first):
CMake/Modules/UrhoCommon.cmake:113 (include)
CMakeLists.txt:45 (include)

then it finish with
"Error in configuration file, project file may be invalid"

is that normal?

if I ignore it and click generate project, is still give the same error but goes to build the project anyway.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Timing Question

Postby Julio Jerez » Mon Jun 18, 2018 5:12 pm

well something is not right because it finish but does no create any solution of projects.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Timing Question

Postby MeltingPlastic » Mon Jun 18, 2018 8:15 pm

I am using cmake 3.11 but that should not be the problem.

I just did a fresh clone of the repo to test. Make sure to checkout the ThirdParty/NewtonDynamics Branch.

Then
Code: Select all
git submodule init
git submodule update


Then run the cmake_win64.sh script. (make sure to open it and change the -G option accordingly)

It should make a new build dir and make an Urho3D.sln in the build dir.

Also the errors with MSBuild could be related to having the latest windows 10 kit. I am using VS2017 Community but I think I had to install the windows 10 kit as well.

Here is the output I get from the cmake script:
Code: Select all
$ ./cmake_win64.sh
-- The C compiler identification is MSVC 19.14.26430.0
-- The CXX compiler identification is MSVC 19.14.26430.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for windows.h
-- Looking for windows.h - found
--
-- SDL2 was configured with the following options:
--
-- Platform: Windows-10.0.17134
-- 64-bit:   TRUE
-- Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe
--
-- Subsystems:
--   Atomic:     ON
--   Audio:      ON
--   Video:      ON
--   Render:     OFF
--   Events:     ON
--   Joystick:   ON
--   Haptic:     ON
--   Power:      ON
--   Threads:    ON
--   Timers:     ON
--   File:       ON
--   Loadso:     ON
--   CPUinfo:    ON
--   Filesystem: ON
--   Dlopen:     OFF
--
-- Options:
--   ALSA                   (Wanted: OFF): OFF
--   ALSA_SHARED            (Wanted: OFF): OFF
--   ARTS                   (Wanted: OFF): OFF
--   ARTS_SHARED            (Wanted: OFF): OFF
--   ASSEMBLY               (Wanted: ON): OFF
--   ASSERTIONS             (Wanted: auto): auto
--   CLOCK_GETTIME          (Wanted: OFF): OFF
--   DIRECTFB_SHARED        (Wanted: OFF): OFF
--   DIRECTX                (Wanted: ON): OFF
--   DISKAUDIO              (Wanted: ON): ON
--   DUMMYAUDIO             (Wanted: ON): ON
--   ESD                    (Wanted: OFF): OFF
--   ESD_SHARED             (Wanted: OFF): OFF
--   FUSIONSOUND            (Wanted: OFF): OFF
--   FUSIONSOUND_SHARED     (Wanted: OFF): OFF
--   GCC_ATOMICS            (Wanted: OFF): OFF
--   INPUT_TSLIB            (Wanted: OFF): OFF
--   JACK                   (Wanted: OFF): OFF
--   JACK_SHARED            (Wanted: OFF): OFF
--   KMSDRM_SHARED          (Wanted: OFF): OFF
--   LIBC                   (Wanted: OFF): OFF
--   LIBSAMPLERATE          (Wanted: OFF): OFF
--   LIBSAMPLERATE_SHARED   (Wanted: OFF): OFF
--   MIR_SHARED             (Wanted: OFF): OFF
--   NAS                    (Wanted: OFF): OFF
--   NAS_SHARED             (Wanted: OFF): OFF
--   OSS                    (Wanted: OFF): OFF
--   PTHREADS               (Wanted: OFF): OFF
--   PTHREADS_SEM           (Wanted: OFF): OFF
--   PULSEAUDIO             (Wanted: OFF): OFF
--   PULSEAUDIO_SHARED      (Wanted: OFF): OFF
--   SDL_DLOPEN             (Wanted: OFF): OFF
--   SDL_HAPTIC             (Wanted: ON): ON
--   SDL_STATIC_PIC         (Wanted: OFF): OFF
--   SNDIO                  (Wanted: OFF): OFF
--   VIDEO_COCOA            (Wanted: OFF): OFF
--   VIDEO_DIRECTFB         (Wanted: OFF): OFF
--   VIDEO_DUMMY            (Wanted: ON): ON
--   VIDEO_KMSDRM           (Wanted: OFF): OFF
--   VIDEO_MIR              (Wanted: OFF): OFF
--   VIDEO_OPENGL           (Wanted: ON): ON
--   VIDEO_OPENGLES         (Wanted: ON): ON
--   VIDEO_RPI              (Wanted: OFF): OFF
--   VIDEO_VIVANTE          (Wanted: OFF): OFF
--   VIDEO_VULKAN           (Wanted: ON): OFF
--   VIDEO_WAYLAND          (Wanted: OFF): OFF
--   VIDEO_WAYLAND_QT_TOUCH (Wanted: OFF): OFF
--   VIDEO_X11              (Wanted: OFF): OFF
--   VIDEO_X11_XCURSOR      (Wanted: OFF): OFF
--   VIDEO_X11_XINERAMA     (Wanted: OFF): OFF
--   VIDEO_X11_XINPUT       (Wanted: OFF): OFF
--   VIDEO_X11_XRANDR       (Wanted: OFF): OFF
--   VIDEO_X11_XSCRNSAVER   (Wanted: OFF): OFF
--   VIDEO_X11_XSHAPE       (Wanted: OFF): OFF
--   VIDEO_X11_XVM          (Wanted: OFF): OFF
--   WAYLAND_SHARED         (Wanted: OFF): OFF
--   X11_SHARED             (Wanted: OFF): OFF
--
--  CFLAGS:        /DWIN32 /D_WINDOWS /W3 /MP
--  EXTRA_CFLAGS:
--  EXTRA_LDFLAGS:
--  EXTRA_LIBS:    user32;gdi32;winmm;imm32;ole32;oleaut32;version;uuid
--
-- Performing Test HAVE_STRUCT_TIMESPEC_TV_SEC
-- Performing Test HAVE_STRUCT_TIMESPEC_TV_SEC - Success
-- Looking for _TIMESPEC_DEFINED
-- Looking for _TIMESPEC_DEFINED - not found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Performing Test IK_RESTRICT_restrict
-- Performing Test IK_RESTRICT_restrict - Failed
-- Performing Test IK_RESTRICT___restrict
-- Performing Test IK_RESTRICT___restrict - Success
-- The ASM_MASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/ml64.exe
-- Looking for open
-- Looking for open - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Urho3D Configuration:
--   Runtime         SHARED
--   Library         SHARED
--   SSE             ON
--   2D              ON
--   IK              ON
--   Threading       ON
--   Navigation      ON
--   Network         ON
--   Physics         ON
--   Samples         ON
--   WebP            ON
--   CSharp          OFF
--   MiniDumps       ON
-- Developer options:
--   Packaging       ON
--   SystemUI        ON
--   Logging         ON
--   Profiling       ON
--   Extras          ON
--   Tools           ON
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/casht/Repos/Urho3D/build

MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Timing Question

Postby Sweenie » Wed Jun 20, 2018 5:02 am

Urho3D is very easy to use compared to Ogre3D that has become a nightmare to both compile and use(at least the 2.1 version).

But I'm a bit reluctant to dive into Urho3D since it's future seems a bit uncertain. Their main developer(Cadaver) left a while ago and it's seems no one has really stepped up to fill his role.
So right now I'm only trying things out and so far I love it. It feels a bit like a combination of Unity and Ogre3D.
But until I'm certain Urho3D has a future I will hold back a bit.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Timing Question

Postby MeltingPlastic » Thu Jun 21, 2018 12:08 pm

So I am working on integrating compound collisions. generally it seems to be working - but I am getting some "jumping behaviour" probably something I am doing wrong with setting up the compound:
https://youtu.be/HHxdXJ_TIu8
(sorry I cant seem to figure out how to make the youtube embedded.)

Urho works on the concept of nodes and components. Nodes are transforms in space with parent child relationships. And components are "behaviors" that can be attached to nodes. currently there are 2 components that can be attached to a node - NewtonRigidBody and NewtonCollisionShape.

My goal is to get seamless compounding/uncompounding based on the actions that are applied to the Urho scene graph and component system.

For example if I create a parent node with a rigid body component that has child nodes with collision shape components - the parent node would combine all children collision shapes into it's rigid body to create a compound collision. On runtime however the child nodes may be separate from the parent - In that case the compound collision of the parent would have one collision removed and re-evaluated. while the child node would exist on its own (being a rigid body if it has a NewtonRigidBody component.

I tried saving a serialize newton file but was unable to import it into the sandbox.
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Timing Question

Postby Sweenie » Thu Jun 21, 2018 1:53 pm

Are you calling NewtonBodySetMassMatrix so that a proper inertia is calculated?
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Timing Question

Postby Sweenie » Thu Jun 21, 2018 2:02 pm

Regarding the child node setup you described it's the same thing we do with the Unity plugin. Works really well. We havent implemented the possibility to separate child nodes but it's a good idea. Also thinking about implementing an option to remove child nodes(only containing colliders) after the compound collider is created to reduce the size of the scene graph.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Timing Question

Postby MeltingPlastic » Thu Jun 21, 2018 4:21 pm

Sweenie wrote:Are you calling NewtonBodySetMassMatrix so that a proper inertia is calculated?


Yes - Once I added this the rotation behavior improved. The Center of mass seems right as well. I am rendering that in the debug info.


Sweenie wrote:Regarding the child node setup you described it's the same thing we do with the Unity plugin. Works really well. We havent implemented the possibility to separate child nodes but it's a good idea. Also thinking about implementing an option to remove child nodes(only containing colliders) after the compound collider is created to reduce the size of the scene graph.


Yeah - Also I think it would be cool to see conservation of momentum seen as you separate the child nodes from the compound.
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 7 guests

cron