Giter Club home page Giter Club logo

Comments (11)

SimonDanisch avatar SimonDanisch commented on June 12, 2024 1

I believe shader version 410 should handle Float64, so I am not sure why you are seeing the problem.

Yeah but my shader don't support them ^^

from meshing.jl.

Tokazama avatar Tokazama commented on June 12, 2024 1

Adding GLTriangleFace worked for this. I foolishly assumed that if I specified Float32 on all the other arguments it would be sufficient.
image

I'm one step closer to beautiful brain parcellations!!!

from meshing.jl.

SimonDanisch avatar SimonDanisch commented on June 12, 2024

Hm, seems like I'm missing some conversions for Float64 + Triangle{Int} meshes.
Try:

m = GeometryBasics.mesh(A,MarchingTetrahedra(1f0),origin=Point3f0(0) ,widths=Point3f0(1), pointtype=Point3f0, facetype=GLTriangle)

But this still doesn't work since the boundingbox is not finite:

julia> FRect3D(m)
GeometryBasics.HyperRectangle{3,Float32}(Float32[Inf, Inf, Inf], Float32[-Inf, -Inf, -Inf])

This must be a problem with Meshing.jl! Not sure if it's a regression from the GeometryBasic switch...

from meshing.jl.

Tokazama avatar Tokazama commented on June 12, 2024

I'll try to dig a little more but I'm not sure I'm familiar enough with these packages to figure it out in addition to the changing API.

from meshing.jl.

SimonDanisch avatar SimonDanisch commented on June 12, 2024

You could just try to switch back to the latest tag without GeometryBasics and see if the bounding box is also Inf

from meshing.jl.

Tokazama avatar Tokazama commented on June 12, 2024

This is what I get on the latest tagged release.

julia> A = rand(20,20,20);

julia> m = GLNormalMesh(A,MarchingTetrahedra(1.0),origin=Point(Float32(0),Float32(0),Float32(0)),widths=Point(Float32(1),Float32(1),Float32(1)))
HomogenousMesh(
)

julia> GeometryTypes.FRect3D(m)
HyperRectangle{3,Float32}(Float32[Inf, Inf, Inf], Float32[-Inf, -Inf, -Inf])

from meshing.jl.

SimonDanisch avatar SimonDanisch commented on June 12, 2024

Ok, so at that points its a meshing problem ;) Maybe try not random data? :D

from meshing.jl.

Tokazama avatar Tokazama commented on June 12, 2024

I get this on the latest tagged release with real data

julia> m = GLNormalMesh(A,MarchingTetrahedra(1.0),origin=Point(Float32(0),Float32(0),Float32(0)),widths=Point(Float32(1),Float32(1),Float32(1)))
HomogenousMesh(
    faces: 613576xFace{3,OffsetInteger{-1,UInt32}},     vertices: 306342xPoint{3,Float32},     normals: 306342xNormal{3,Float32}, )


julia> GeometryTypes.FRect3D(m)
HyperRectangle{3,Float32}(Float32[0.2266541, 0.23978494, 0.0888582], Float32[0.5302575, 0.5390215, 0.55203134])

I'll see what it does on master now...

from meshing.jl.

Tokazama avatar Tokazama commented on June 12, 2024

Okay, it works on master but Makie.mesh(m) still throws that big error containing

┌ Warning: shader /Users/zchristensen/.julia/packages/GLMakie/S9Zib/src/GLVisualize/assets/shader/standard.vert didn'
t compile.
│ ERROR: 0:33: No matching function for call to to_3d(dvec3)
│ ERROR: 0:34: Use of undeclared identifier 'v'
└ @ GLMakie.GLAbstraction ~/.julia/packages/GLMakie/S9Zib/src/GLAbstraction/GLShader.jl:139
Error showing value of type Scene:
ERROR: program 34 not linked. Error in:
/Users/zchristensen/.julia/packages/GLMakie/S9Zib/src/GLVisualize/assets/shader/fragment_output.frag or /Users/zchris
tensen/.julia/packages/GLMakie/S9Zib/src/GLVisualize/assets/shader/util.vert or /Users/zchristensen/.julia/packages/G
LMakie/S9Zib/src/GLVisualize/assets/shader/standard.vert or /Users/zchristensen/.julia/packages/GLMakie/S9Zib/src/GLV
isualize/assets/shader/standard.frag
ERROR: One or more attached shaders not successfully compiled

I am able to run some examples from the Makie docs using meshes, so I don't think it's an installation problem.

from meshing.jl.

SimonDanisch avatar SimonDanisch commented on June 12, 2024

That's still including Float64! You need to make sure that the mesh is using Point3f0 + GLTriangleFace

from meshing.jl.

sjkelly avatar sjkelly commented on June 12, 2024

Thanks for the report. I am actually seeing the same error, and got some fixes last night. The error I see is slightly different and my shaders are version 330. I believe shader version 410 should handle Float64, so I am not sure why you are seeing the problem.

Regardless, the conversion machinery needs to be here in a lot of cases. Caution that the API on master might change in order to fix.

from meshing.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.