Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BuildVolumeMesh issue
#11
(11-01-2022, 09:41 AM)_Aka_ Wrote: About the missing tutorial, it is scene 25_CGExtrusionAdvanced, and it is included in the package I downloaded from the store as a test. Can you confirm it is missing for you even with a freshly downloaded package?

Thanks

You are right... I must of opened over 10 examples looking for it. Don't know why I skipped that one. Sorry to bother you with this.
Reply
#12
(10-31-2022, 11:08 PM)tairoark Wrote: I am not sure I understand how to reconfigure this from your textual description. Can you give me a 'generator' that show a how to connect up a graph that has a shape extrusion ('guard rail') aligned to the edge of another shape extrusion ('track')?

Here it is.


Attached Files
.unity   Corrected.unity (Size: 95.18 KB / Downloads: 1)
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#13
(11-01-2022, 03:48 PM)tairoark Wrote:
(11-01-2022, 09:41 AM)_Aka_ Wrote: About the missing tutorial, it is scene 25_CGExtrusionAdvanced, and it is included in the package I downloaded from the store as a test. Can you confirm it is missing for you even with a freshly downloaded package?

Thanks

You are right... I must of opened over 10 examples looking for it. Don't know why I skipped that one. Sorry to bother you with this.

No worries, happens to all of us
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#14
I believe I have answered all your questions. Please let me know if I missed one.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#15
(11-01-2022, 03:50 PM)_Aka_ Wrote:
(10-31-2022, 11:08 PM)tairoark Wrote: I am not sure I understand how to reconfigure this from your textual description. Can you give me a 'generator' that show a how to connect up a graph that has a shape extrusion ('guard rail') aligned to the edge of another shape extrusion ('track')?

Here it is.


While your graph does connect up the shape extrusion, I think I didn't explain myself correctly.

The goal was to get a single extruded mesh (a continuous 'guard rail') to align to the edge of another shape extrusion ('track'). If I change the control point on the spline for the 'track', the 'guard rail' will follow on the new edge of the road accordingly. Volume Spots do this for descrete 'pole' that will hold up the 'guard rail' but Volume Spots can't be used for the 'guard rail' as it would break apart on many changes to the 'track''s spline. 

I use the "Scake:X Multiplier" of the 'track's Shape Extrusion to control the 'track's width as per an earlier suggestion from you. What I am attempting to do is use the new 8.0.3 Deform Mesh feature's Scale to have the single 'guard rail' extrusion follow the edge of the 'track'. Of course I am passing in the same 'graph' to both 'X Multiplier' setting.

Can this work? If so, can you show me a graph? If not, is there a better way?
Reply
#16
Hi
(11-03-2022, 02:59 AM)tairoark Wrote: Can this work?
No, this is what I explained here:
(10-31-2022, 10:35 PM)_Aka_ Wrote: [*]The Deform Mesh module deform a mesh along a path, and not on top of a volume. The module can take volumes as inputs, but use only their path, not their surface.
What I meant by that post is that your solution based on Deform Mesh can not generate guard rails on a volume's surface. Besides that fundamental issue, there were some other technical issues, such as not linking the Deform Mesh properly. I spoke about those issues, and send you a scene that avoids those issues, just as bonus information, not as a validation of the use of the Deform Mesh to generate the guard rails.


(11-03-2022, 02:59 AM)tairoark Wrote: If not, is there a better way?
Yes:
(11-01-2022, 03:39 PM)_Aka_ Wrote: Please give this solution a try, and let me know if it worked or not.

If it doesn't work let me know and we will figure out something else.

I hope this helped. Let me know if you have any question.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#17
(11-03-2022, 09:39 AM)_Aka_ Wrote: Hi
(11-03-2022, 02:59 AM)tairoark Wrote: Can this work?
No, this is what I explained here:
(10-31-2022, 10:35 PM)_Aka_ Wrote: [*]The Deform Mesh module deform a mesh along a path, and not on top of a volume. The module can take volumes as inputs, but use only their path, not their surface.
What I meant by that post is that your solution based on Deform Mesh can not generate guard rails on a volume's surface. Besides that fundamental issue, there were some other technical issues, such as not linking the Deform Mesh properly. I spoke about those issues, and send you a scene that avoids those issues, just as bonus information, not as a validation of the use of the Deform Mesh to generate the guard rails.


(11-03-2022, 02:59 AM)tairoark Wrote: If not, is there a better way?
Yes:
(11-01-2022, 03:39 PM)_Aka_ Wrote: Please give this solution a try, and let me know if it worked or not.

If it doesn't work let me know and we will figure out something else.

I hope this helped. Let me know if you have any question.
Have a nice day
I appreciate your feedback. Unfortunately the solution you send does not work for the continuous 'guard rail' Changes to the 'track' spline cause the 'guard rail' to go all over the place.

I've attached an example where  I just move CP0.y. I think using spots is not the solution as they will always separate from each other.

I have another solution I will try in a couple of weeks. It will be a big architectural change so I can't do it now. I'll let you know if it works. 
Your feedback has been great. I'd left a review before... I'll add another positive one


Attached Files Thumbnail(s)
   
Reply
#18
Hi
I believe we have a big misunderstanding here, either because you missed one of my posts, or I explain things very badly Smile
Whatever the reason is, I will explain my answer here, with no need to read older posts:

You initially tried to implement a solution using a Variable Mix Shape module. That solution had an issue you explained in your initial post.
While waiting for me to investigate that issue, I suggested to avoid the issue by using the Scale tab of the Shape Extrusion instead of the Variable Mix Shape. It was not a good solution, because of your need for guard rails.
You explored a solution with Deform Mesh. That solution was not good neither.
After investigating the issue with Variable Mix Shape, I explained that the issue might not appear when you will use the real shape of the road with its rail guards, and setting a high Resolution in the Cross tab of the Shape Extrusion module. This is the solution I am asking you to try, and to tell me if it worked or not.

So, if you try this solution and it works, great, problem solved.
If it doesn't then I will suggest another solution that involves modifying the code of a module. I personally prefer for my customers to use solutions that don't involve modified code as long as possible (to avoid you issues when updating Curvy Splines). That is why I am not pushing this solution forward, and am waiting for you to test the solution with Variable Mix Shape first before explaining it.

Did this help?
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#19
Using the X Multiplier under Scale of the Shape Extrusion module is a great solution for me. Much better than using the Variable Mixed Shape module with more control.

Turning off Optimization helps get ride of the darkened bands but only if I set Cross Resolution to 100. Anything less starts to show the darkened bands just like turning on Optimization. This is a solution not great as I will be running my App on Mobile and having the maximum number of triangles created is not preferable.

Is the issue not in the triangle count, but how the the texture is spread among the triangle. Is there another way to handle this to lower my triangle count but still have proper texture mapping that doesn't cause this darkened bands?

Is this a problem with how I specify my CG Meta data on the profile?

In the end, my profiles will not all be simple rectangles but will likely have this flat top surface that I need to have nicely textured without the darkened bands.

I've attached a simple project where you can adjust the Shape Extrusion parameters to see what I mean.


Attached Files Thumbnail(s)
       

.unity   ProfileTest.unity (Size: 142.83 KB / Downloads: 1)
Reply
#20
(11-01-2022, 10:38 AM)_Aka_ Wrote: About the UV calculation: the value to set to UVOffset.Y is the following:

yourBuildVolumeMesh.groupsByMatID[theRightIndex].AspectCorrectionV

Knowing that groupsByMatIDis defined as follow:
private List<SamplePointsMaterialGroupCollection> groupsByMatID;

Two things to solve to be able to use the code above:

1- theRightIndex: either 0 if you use only one material, or you find the index that indexes the SamplePointsMaterialGroupCollection instance with the right material ID.

2- groupsByMatID: it is a private field, you can make it public or add a getter to access it for example.

I believe this answers your UV related question

I only have one material.

What exactly IS AspectCorrectionV.   I need the value of the ending V of a previously generated segment ? 

If I understand what you are saying, here is my attempt at it:
Code:
var bvmA = genOfSegmentA.GetModule<BuildVolumeMesh>( "Track Vol Mesh", true );
var bvmAplus1 = genOfSegmentAplus1.GetModule<BuildVolumeMesh>( "Track Vol Mesh", true );
bvmAplus1.MaterialSetttings[ 0 ].UVOffset.y = bvmA.GroupByMatID[0].AspectCorrectionV;

The problem is that in the debugger, BuildVolumeMesh.groupsByMatID is always null !!
No array is set  :-(
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation DuplicateEditorMesh performance issue Guillaume 5 12 01-18-2022, 01:44 PM
Last Post: _Aka_
  Lightmap/Shadow issue Sacryn 4 1,523 11-24-2020, 08:33 AM
Last Post: Sacryn
  UV issue with variable mix shape modifier MarioBag 4 3,312 12-07-2019, 01:43 PM
Last Post: _Aka_
  Follow Up Spline Issue JHulse95 8 8,099 07-25-2019, 02:36 PM
Last Post: _Aka_

Forum Jump: