Announcement

Collapse
No announcement yet.

Running physics without graphics context

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Running physics without graphics context

    Hi,

    I have a question about feasibility of some stuff in Unreal Engine.

    I would like to use the UE to play some physics simulation results, but this simulation requires an offline learning process.
    This learning process is based on a genetic algorithm restarting many times the simulation and learning parameters for it.

    So what I would like to achieve is :
    • Having the simulation context that uses UE physics engine
    • Being able to run the simulation "offline" (without rendering it)
    • Having my genetic algorithm constantly running the simulation to evolve stuff I need to evolve
    • Obviously, being able to run the simulation using UE rendering, but this one is "trivial".


    Can I do this kind of things (or similar stuff) using UE ?
    I am not sure I have been very clear on my needs, if not I'll be pleased to answer questions

    Thanks for everything !

    Zouch

    EDIT:
    Just to clarify a bit, here is how stuff may look when called during learning process (pseudo code) :

    Code:
    double fitnessFunction()
    {
        // First, get a new clean physics simulation context
        Simulation simulation = buildNewSimulation();
    
        double fitness = 0.0;
    
        int stepCount = 5 * 60; // 5 seconds of simulation at 60 fps
        for (int i = 0; i < stepCount; ++i)
        {
            simulation.step(1.0 / 60.0); // Advance one step of simulation, updates physics, etc
            fitness += rewardGivenSimulationStatus();
        }
    
        // We are done, clear simulation
        simulation.clear();
    
        return fitness;
    }
    And Simulation::step() might look like
    Code:
    void Simulation::step(double dt)
    {
        // Do some pre computations 
        preComputations(dt);
    
        // Update physics engine
        phsicsEngine.step(dt);
    
        // Do some post computations
        postComputations(dt);
    }
    EDIT 2 :
    I think it is worth mentionning that there is no problem if the engine needs to be running during learning, I just need to have the control over the physics engine, choose when to step it, with my given delta time, and prevent the game engine to update it by itself.
    Last edited by Zouch; 05-27-2015, 01:47 PM.

    #2
    Bump.

    I would also like to run simulations without rendering graphics. I have already set up everything to be run on Windows 8.1 64-bit Virtual machines, except this VM doesn't have graphics, so I need to be able to do this w/o graphics.

    Comment


      #3
      Something that comes to mind: you could program your simulation controller "as usual" but run it in your VM as a dedicated server. Make sure your skeletal meshes have the setting "Enable Physics on Dedicated Server" set to true, which fortunately is the default value.
      Journeyman's Minimap - Available on Marketplace - Forum topic - Video

      Comment


        #4
        I will check this out, thanks for the tip !

        Comment

        Working...
        X