Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: internal error setting the array #6

Open
PavelBlend opened this issue Apr 25, 2020 · 1 comment
Open

RuntimeError: internal error setting the array #6

PavelBlend opened this issue Apr 25, 2020 · 1 comment

Comments

@PavelBlend
Copy link
Contributor

PavelBlend commented Apr 25, 2020

I am using the addon from this commit:
bdc3b99
Blender Version: 2.82 (OS Windows 10)
I created a simulation using SPlisHSPlasH.
Here is the json file:

{
    "Configuration":
    {
        "pause": true,
        "timeStepSize": 0.005,
        "numberOfStepsPerRenderUpdate": 2,
        "particleRadius": 0.025, 
        "density0": 1000, 
        "simulationMethod": 4,		
        "gravitation": [0.0, -9.81, 0.0], 
        "cflMethod": 0, 
        "cflFactor": 0.5,
        "cflMaxTimeStepSize": 0.05,
        "maxIterations": 100,
        "maxError": 0.05,
        "maxIterationsV": 1000,
        "maxErrorV": 0.5,		
        "stiffness": 50000,
        "exponent": 7,
        "velocityUpdateMethod": 0,
        "enableDivergenceSolver": true,
        "boundaryHandlingMethod": 2,
        "enablePartioExport": true,
        "dataExportFPS": 30
    },

    "Fluid":
    {
        "density0": 1000, 
        "colorField": "velocity",
        "colorMapType": 1,
        "renderMinValue": 0.0,
        "renderMaxValue": 5.0,
        "surfaceTension": 1.0,
        "surfaceTensionMethod": 0,		
        "viscosity": 2000.0,
        "viscosityMethod": 7, 
        "viscosityBoundary": 1000.0,
        "vorticityMethod": 0,
        "vorticity": 0.0,
        "viscosityOmega": 0.05,
        "inertiaInverse": 0.5,
        "maxEmitterParticles": 150000,
        "emitterReuseParticles": false,
        "emitterBoxMin": [-4.0,-1.0,-4.0],
        "emitterBoxMax": [0.0,4,4.0]
    },

    "Emitters": [
        {
            "width": 8,
            "height": 8,
            "translation": [0.0, 0.0, 0.0],
            "rotationAxis": [0, 0, 1],
            "rotationAngle": -1.57,
            "velocity": 3,
            "emitStartTime": 0,
            "type": 1
        }
    ],

    "RigidBodies": [
        {
            "geometryFile": "collision.obj",
            "color": [0.1, 0.4, 0.6, 1.0], 
            "isDynamic": false,
            "isWall": true,
            "mapInvert": false, 
            "mapThickness": 0.0,
            "mapResolution": [20,20,20],
            "samplingMode": 1
        }
    ]
}

collision.obj

v -2.000000 -1.261899 2.000000
v 2.000000 -1.261899 2.000000
v -2.000000 -1.261899 -2.000000
v 2.000000 -1.261899 -2.000000
v -2.000000 1.229817 2.000000
v 2.000000 1.229817 2.000000
v -2.000000 1.229817 -2.000000
v 2.000000 1.229817 -2.000000
v -2.833201 1.229817 2.833201
v 2.833201 1.229817 2.833201
v -2.833201 1.229817 -2.833201
v 2.833201 1.229817 -2.833201
v -2.833201 -2.448940 2.833201
v 2.833201 -2.448940 2.833201
v -2.833201 -2.448940 -2.833201
v 2.833201 -2.448940 -2.833201
vn 0.0000 1.0000 0.0000
vn -1.0000 0.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
s off
f 2//1 3//1 1//1
f 6//1 12//1 8//1
f 6//2 4//2 2//2
f 7//3 1//3 3//3
f 8//4 3//4 4//4
f 5//5 2//5 1//5
f 16//5 11//5 12//5
f 7//1 9//1 5//1
f 8//1 11//1 7//1
f 5//1 10//1 6//1
f 15//6 14//6 13//6
f 13//4 10//4 9//4
f 14//3 12//3 10//3
f 15//2 9//2 11//2
f 2//1 4//1 3//1
f 6//1 10//1 12//1
f 6//2 8//2 4//2
f 7//3 5//3 1//3
f 8//4 7//4 3//4
f 5//5 6//5 2//5
f 16//5 15//5 11//5
f 7//1 11//1 9//1
f 8//1 12//1 11//1
f 5//1 9//1 10//1
f 15//6 16//6 14//6
f 13//4 14//4 10//4
f 14//3 16//3 12//3
f 15//2 13//2 9//2

When I import bgeo files, blender writes to the console. Particles are not imported:

Traceback (most recent call last):
  File "C:\Users\Pavel_Blend\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\BlenderPartioTools.py", line 89, in __call__
    particles.foreach_set("location", pos)
RuntimeError: internal error setting the array

Particles are imported in this commit:
24ee41d

@janbender
Copy link
Member

I use Blender 2.80. I did not test it yet with 2.82.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants