Comments (8)
repmat('blue',size(V,1),1)
should be
repmat(blue,size(V,1),1)
from gptoolbox.
I did so, as following:
clf;
hold on;
t = tsurf(F,V,'EdgeColor','none',fsoft, 'FaceVertexCData',repmat(blue,size(V,1),1),'FaceAlpha',1+(iso<0)(0.35-1),fphong);
ts = tsurf(SF,SV,'EdgeAlpha',0.2+(iso<0)(0-0.2),fsoft,'FaceVertexCData',repmat(orange,size(SV,1),1),fphong,'FaceAlpha',1+(iso>0)(0.2-1));
apply_ambient_occlusion(ts);
hold off;
axis equal;
view(-20,20)
camlight;
t.SpecularStrength = 0.04;
l = light('Position',[5 -5 10],'Style','local');
add_shadow(t,l,'Color',0.8[1 1 1],'Fade','local','Ground',[0 0 -1 min([V(:,3);SV(:,3)])]);
set(gca,'pos',[0 0 1 1])
set(gca,'Visible','off');
set(gcf,'Color','w');
drawnow;
And now i got this error !
Attempt to execute SCRIPT ambient_occlusion as a function:
C:\Users\faa23\Desktop\3D_DiskTop\MatlabCodes\iges (original)\ambient_occlusion.m
Error in apply_ambient_occlusion/apply_ambient_occlusion_helper (line 79)
AO = ambient_occlusion(V,F,O,N,samples);
Error in apply_ambient_occlusion (line 150)
[AOii,Cii] = apply_ambient_occlusion_helper(tii,AOii,Cii,factor,unoriented);
Error in STLoffset (line 31)
apply_ambient_occlusion(ts);
Do you have an idea what would be the problem ?
from gptoolbox.
SORRY, I posted the wrong error in the previous comment. I just updated that.
from gptoolbox.
have you changed ambient_occlusion.m
? Do you have another file called ambient_occlusion.m
in your path?
from gptoolbox.
No i didn't. And I don't have another file.
Does it need to be compiled too?
because I tried to compile it as oqilipo advised me to do for the function signed_distance as follow:
clearvars
path_to_eigen='C:\Users\faa23\Desktop\3D_DiskTop\MatlabCodes\iges (original)\eigen-eigen-';
% Check if the eigen path is correct
assert(exist([path_to_eigen '\Eigen\Core'],'file')==2)
path_to_libigl='C:\Users\faa23\Desktop\3D_DiskTop\MatlabCodes\iges (original)\libigl';
%%
MEXOPTS={'-v','-largeArrayDims','-DMEX'};
EIGEN_INC= ['-I' path_to_eigen];
LIBIGL_INC=['-I' path_to_libigl '\include'];
LIBIGL_FLAGS='-DIGL_SKIP';
LIBIGL_LIB={'-DIGL_SKIP'};
LIBIGL_LIBMATLAB='-DIGL_SKIP';
LIBIGL_LIBCGAL='-DIGL_SKIP';
LIBIGL_LIBCORK='-DIGL_NO_CORK';
LIBIGL_BASE={LIBIGL_INC, LIBIGL_FLAGS,LIBIGL_LIB{:}, LIBIGL_LIBMATLAB};
mex( ...
MEXOPTS{:}, ...
LIBIGL_BASE{:},EIGEN_INC, ...
'ambient_occlusion.cpp');
But there was a an error as follow:
Error using mex
ambient_occlusion.cpp
c:\users\faa23\desktop\3d_disktop\matlabcodes\iges (original)\libigl\include\igl\EPS.h(16): warning C4305: 'initializing': truncation from 'double' to 'float'
c:\users\faa23\desktop\3d_disktop\matlabcodes\iges (original)\libigl\include\igl\EPS.h(17): warning C4305: 'initializing': truncation from 'double' to 'float'
c:\users\faa23\desktop\3d_disktop\matlabcodes\iges (original)\libigl\include\igl\embree\EmbreeIntersector.h(24): fatal error C1083: Cannot open include file: 'embree2/rtcore.h': No such file or directory
Error in STLoffset (line 25)
mex( ...
The thing is that I did find any folder called embree2 in libigl !!!
from gptoolbox.
from gptoolbox.
Thank you so much Alec.
I hope someone can step up here :)
from gptoolbox.
Do you think think I should close this and open a new issue?
from gptoolbox.
Related Issues (20)
- how to mex on mesh_boolean HOT 3
- Install this toolbox on win10 HOT 2
- Compiling mex on M1 Mac HOT 13
- Could NOT find Matlab HOT 8
- kharmonic on high-poly meshes HOT 1
- Qslim.exe file
- Unexpected Standard exception What() is:vector when calling mex principal_curvature HOT 2
- dependend .dlls wont be copied to `./mex` after successfull compilation.
- Looking for sgemm_ - not found HOT 5
- No find: meshgrid, Parameterization QuadCover, HOT 6
- error when building CXX object CMakeFiles/upper_envelope.dir/upper_envelope.cpp.o HOT 1
- ld.exe: cannot find /export:mexFunction: No such file or directory
- Invalid MEX-file 'C:\......\selfintersect.mexw64': The specified module could not be found. HOT 3
- Cannot find /export:mexFunction: No such file or directory HOT 7
- run GPtoolbox HOT 1
- Compile Mex for Octave
- Compile failed. Cannot find split_nonmanifold.cpp
- The function DUAL_LAPLACIAN can not be used
- Interpolationin Tetra mesh. HOT 1
- Improve Documentation by Providing Function List
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gptoolbox.