cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

How to accomplish real-time Sectioning function like this?

dsgnrClarK
16-Pearl

How to accomplish real-time Sectioning function like this?

How to accomplish real-time Sectioning function like this?

Or, just pre-made Selectable Static Sections would be fine.

I've read https://community.ptc.com/t5/Studio/Re-how-to-add-section-view-in-studio/m-p/547578

So, is there any solution other than using extra models?

example: https://a360.co/2yBY4Zhrealtime sectioning.png

 

any feedback would be appreciated. 🙂

ACCEPTED SOLUTION

Accepted Solutions

Hello @dsgnrClarK ,

addtional to the mention things in the posts - if I will  have such problem- I will try the following:

Supposing you have the files in Creo Parametric.

Create in Creo parametric an assembly cut feature which will cut the model on the same way as the cut which you want to  display in Vuforia Studio  - example for section:

 

2019-02-13_15-20-09.gif

 

So, the cut unfortunately could not be used  in vuforia studio  -> it could be displayed in Creo View / as annotation view / also in Creo Illustrate  but not in vuforia View  (or not yet - I hope may be, in future release)

So to have the same cut we have to create in Creo an assembly cut which will remove a geometry:

 

2019-02-13_15-36-27.gif

 

So we will have to correct view of the section but without any hatch display on the cut surfaces. I think, we can try to do this by setting some Model Appearances based on textures:

 

2019-02-13_15-56-17.gif

 

In this case the hatch is a texture which should display the desired hatch pattern.   So after some attempts, may be we will get successfully the desired appearance of the model with section (of course requires some additional work - for example to define a model appearance with hatch , but when we define this one time  it could be reused later)

So then we will have 2 models the one is without hatch and the section model - so we can load 2 models in Vuforia studio  and make the one visible and the other one invisible or set the source property of the model to the desired pvz file.

Another point is that we have to pay attention that the texture will be available in the Studio as mention in  the post publishing image (jpg, png, etc) into AR experience

 

View solution in original post

5 REPLIES 5

Hello,

 

One possible solution, but it is not easy to do, is to use a GLSL shader. 

 

About how to implent a shader in Vuforia Studio, please see this thread :

https://community.ptc.com/t5/Studio/Apply-realistic-aspects-to-the-model-and-the-surrounding/td-p/591466

 

About an example in Unity 3D shader, please see this git repositary :

https://github.com/Dandarawy/Unity3DCrossSectionShader

 

In your screenshot, only one plane is needed.

So, please look the C# script :

https://github.com/Dandarawy/Unity3DCrossSectionShader/blob/master/Assets/Cross%20Section%20Shader/Scripts/OnePlaneCuttingController.cs

 

And the Unity shader file :

https://github.com/Dandarawy/Unity3DCrossSectionShader/blob/master/Assets/Cross%20Section%20Shader/Shaders/OnePlaneBSP.shader

 

It will be needed to port the Unity shader file to GLSL shader file.

Some knowledge in development is needed.

It is the most difficult point but It seems possible.

No specific call to OpenGL API is needed.

I mean, no need of WorldMatric in the shader is needed, for example.

 

Same way to port C# script to javascript.

Here it is just passing parameters to shader.

The most difficult will be to manage move of 3D cutting plane in AR Experience.

I suppose by using 2D sliders it will be enough.

 

Be carreful about the license of this source code and check if it fits your project license :

https://github.com/Dandarawy/Unity3DCrossSectionShader/blob/master/LICENSE

 

Best regards,

Samuel

Hi Samuel

 

Really appreciate your response.

It got me a lot to study.

Meanwhile, I wonder is it possible to have section of an assembly? ( https://a360.co/2SvtQAr )

section_assembly.png

Thank you very much for the help.

 

Best Regards, 

ClarK

Hello Clark,

 

With the solution of the shader, it will work with all 3D geometries displayed (Parts or Assemblies).

 

Best regards,

Samuel

Hello @dsgnrClarK ,

addtional to the mention things in the posts - if I will  have such problem- I will try the following:

Supposing you have the files in Creo Parametric.

Create in Creo parametric an assembly cut feature which will cut the model on the same way as the cut which you want to  display in Vuforia Studio  - example for section:

 

2019-02-13_15-20-09.gif

 

So, the cut unfortunately could not be used  in vuforia studio  -> it could be displayed in Creo View / as annotation view / also in Creo Illustrate  but not in vuforia View  (or not yet - I hope may be, in future release)

So to have the same cut we have to create in Creo an assembly cut which will remove a geometry:

 

2019-02-13_15-36-27.gif

 

So we will have to correct view of the section but without any hatch display on the cut surfaces. I think, we can try to do this by setting some Model Appearances based on textures:

 

2019-02-13_15-56-17.gif

 

In this case the hatch is a texture which should display the desired hatch pattern.   So after some attempts, may be we will get successfully the desired appearance of the model with section (of course requires some additional work - for example to define a model appearance with hatch , but when we define this one time  it could be reused later)

So then we will have 2 models the one is without hatch and the section model - so we can load 2 models in Vuforia studio  and make the one visible and the other one invisible or set the source property of the model to the desired pvz file.

Another point is that we have to pay attention that the texture will be available in the Studio as mention in  the post publishing image (jpg, png, etc) into AR experience

 

If @sdidier's or @RolandRaytchev's response has answered your question, please mark as Accepted Solution, for the benefit of others who may have the same question. 

Announcements

Top Tags