CrossSection FAQ

From CrossSection
Jump to navigation Jump to search

1. Is it possible to get a cross section of more than one game object in the scene? There is a "model" parameter which I can set to the desired game object, am I able to add another game object which is sliced too?

If your second gameobject is supposed to share the same section plane you can create an empty gameobject and set the "model" parameter to it. Then you can parent a number of gameobjects to it.

If you like to use separate planes for each of gameobjects in the scene - you can take a look at the "single_plane_individual" example scene, enclosed inside the asset. You can use separate material sets for these gameobjects and set the plane properties on the material level.

2. Can I set a single object as target of the plane? I have duplicated the TestGameObject in the single_plane section scene, making the second TestGameObject and removed all the scripts from it. There also are no references to the second TestGameObject from any objects in the scene, but the second TestGameObject still remains affected by section plane. Why?

The duplicated TestGameObject still uses the same materials as the original. You need to create separate material set for the duplicated TestGameObject if you like to make it stay unaffected. You can duplicate all the materials from the TestGameObject and change the shaders on them. For example: if a given material uses for the the affected object CrossSectionURP/Lit or CrossSectionURP/LitAndCapPrepare shader - the not affected equivalent should use uses Universal Render Pipeline/Lit shader - and so on - exactly like in the tables here: https://virtualplayground.d2.pl/wiki/Manual_2.10_-_onward#URP_Support

3. Is is possible to use the main color instead of _SectionColor for the section - in the cross section materials? I need foliage on the trees to get rendered on both faces with the same color.

The following shaders _useSectionColor property:

  • Standard
  • Standard (Specular Setup)
  • Cross Section URP/Lit
  • Cross Section HDRP/Lit
  • Cross Section Graphs/Physical Material 3 Ds Max

This lets to use on the section either _SectionColor or the same color as on the front faces.

In case you wanted to adapt your shader graph and add the cross section to it using the instruction https://virtualplayground.d2.pl/wiki/Manual_2.10_-_onward#ShaderGraphs_-_adding_CrossSection_to_any_ShaderGraph - you could use the second option without adding _SectionColor: https://virtualplayground.d2.pl/wiki/Manual_2.10_-_onward#Setup_Custom_Function_Node. The Cross Section Graphs/Arnold Standard Surface shader graph, included in the asset, is adapted using this way, not using _SectionColor and rendering both faces in the same way.