Itoo Software Forum

Author Topic: using "evenly" turning straight lines into curves?  (Read 5190 times)

ChrisV

  • Newbie
  • *
  • Posts: 25
using "evenly" turning straight lines into curves?
« on: May 02, 2014, 11:07:49 AM »
Hi guys,

I`m stuck with a rather simple setup problem. I want to use a conditional argument to detect curves in order to place bendable elements there and keep straight areas clean (especially important since this is for realtime usage in a game engine where polycount matters a lot). However when using evenly elements it starts breaking the conditional rule for seemingly no reason.

Thanks in advance for any hint on how to get rid of this problem!

PS: I would alternatively use conditional mat ids to identify curved areas which is not as intuitive but workable. But I don't have that option available as I want to every segment with a new mat id to have it's own start and end segment and the only way I found that does this is by setting the L1S generator limit to mat id which seems to initialize the segment with a unique start and end even if the points are welded. On the contrary when setting mat id as a rule via a conditional, I can't have a segment start and end with defined elements but rather can only define the default.
« Last Edit: May 02, 2014, 11:32:00 AM by MB1103 »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: using "evenly" turning straight lines into curves?
« Reply #1 on: May 02, 2014, 11:41:58 AM »
Hi there,

There is a known issue when using fillet with conditional curves/straight segment but if this is not the case you may find some of the solutions mentioned in this post resolve other possible causes : http://forum.itoosoft.com/index.php?topic=2091.0

If this doesn't help it'd be great if you are able to send us the RailClone style in a simple scene it'll help me to resolve the problem.


Many thanks,

Paul
Paul Roberts
iToo Software

ChrisV

  • Newbie
  • *
  • Posts: 25
Re: using "evenly" turning straight lines into curves?
« Reply #2 on: May 02, 2014, 12:09:58 PM »
Hi Paul,

yeah, I did not forget about that problem with fillet turning everything into curves . I think this is related but different. back then I tried to use fillet AND conditional curve detection. Now I do not use fillet to be able to use the conditional curve argument but it breaks when using evenly segments which almost renders the conditional curve argument unusable for me (or at least I can't seem to wrap my head around how to make it work)

I`ve attached a simple recreation of the problem. needs to be looked at in wireframe to see the issue more clearly. green is what it should look like and red is the screwed up version when introducing evenly components

As I said I think its kinda related to the fillet problem because the error reacts to changing the corner type in the rules properties of the generator. but it doesn't do so in any predictable manner and (for my limited brain capacity :)) and it doesn't seem to solve it by switching to a different type.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: using "evenly" turning straight lines into curves?
« Reply #3 on: May 02, 2014, 04:17:21 PM »
Hi Chris,

Apologies for not recognizing that we'd spoken before on this issue. I can confirm that the evenly rule converts the base spline to curves, I'll report this issue and see if anything can be done to change this behavior in future releases. In the meantime I think your other instinct is correct and material IDs are likely to be the best way to resolve this.

I realize there are some problems with start and end segments however you may be able to resolve this by breaking the spline where you'd like the Start/End segments to appear.  You can also use conditional operators to change the start and end segments based on material ID if necessary.

In the attached example I've used an ID of 10 for the curves, and an ID of 1 and 2 to show the idea of two variations of fence. The spline has been broken between these 2 IDs to force start and end segments.

Hopefully this will help with your situation, let me know if you need any more help.

Thanks,

Paul





Paul Roberts
iToo Software

ChrisV

  • Newbie
  • *
  • Posts: 25
Re: using "evenly" turning straight lines into curves?
« Reply #4 on: May 05, 2014, 09:52:07 AM »
Hi Paul,

thanks for taking the time! Your solution does solve the problem adequately for the time being. Would be great tho if splines could be handled differently in future releases (converting segments to curve only where needed) to get more value out of curve detection and fillet. Although I realize this might be harder than it looks, bearing in mind the nature of the beast that is the legacy 3dsmax codebase ;)

cheers,
Chris

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: using "evenly" turning straight lines into curves?
« Reply #5 on: May 05, 2014, 10:45:09 AM »
Hi Chris,

Glad it's usable for you. We are looking into this issue and hoping to resolve it in future releases. Out of interest which games engines are you using?

Thanks,

Paul
Paul Roberts
iToo Software

ChrisV

  • Newbie
  • *
  • Posts: 25
Re: using "evenly" turning straight lines into curves?
« Reply #6 on: May 05, 2014, 12:46:36 PM »
We are using Cryengine. Which is heavily relying on 3dsmax - which in turn, makes railclone and forest  great pipeline extension tools since it allows us to build and decorate fully textured environments much faster and in a more flexible way. It enables us to do a lot of things that were not possible previously by no longer being restricted to static prefab blocks with 90/45 degree corner stones and fixed length prefabs and slope angles. Also, working with splines as a definition basis makes it possible to retain a lot of flexibility in level design even at a later point, way past preproduction. (at least that's the plan. we are currently still in pre-production)

cheers,
Chris

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: using "evenly" turning straight lines into curves?
« Reply #7 on: May 05, 2014, 01:12:54 PM »
Hi Chris,

Thanks for the info - I'm currently looking at workflows for using RailClone and ForestPack with popular game engines so that's very helpful. Nice that Cryengine natively supports importing instances - makes life much easier  :).

Thanks!

Paul.
Paul Roberts
iToo Software

ChrisV

  • Newbie
  • *
  • Posts: 25
Re: using "evenly" turning straight lines into curves?
« Reply #8 on: May 05, 2014, 04:47:01 PM »
another problem that turned up using "evenly" elements, that breaks on a very fundamental level. it starts deforming the segments on corners in a weird way. I can jiggle around with the position of the corner by moving the spline vert a bit which results in the error going away sometimes - but in complex scenes, thats no good. (It's not welding. I have that disabled). Would be great if it was possible to get a more stable result with this.

PS.: very puzzling... I just tried to setup a scene isolating the error but can't for the life of me reproduce it although it came up all the time previously today. will keep an eye out and update with an example scene if I can catch it again
« Last Edit: May 05, 2014, 04:59:09 PM by ChrisV »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: using "evenly" turning straight lines into curves?
« Reply #9 on: May 05, 2014, 05:17:11 PM »
Hi,
If you are able to reproduce it would you be able to send me the scene so I can take a deeper look at it? I'm not able to reproduce the issue here.

Thanks,

Paul
Paul Roberts
iToo Software

ChrisV

  • Newbie
  • *
  • Posts: 25
Re: using "evenly" turning straight lines into curves?
« Reply #10 on: May 05, 2014, 05:18:38 PM »
I marked the areas where it breaks. toggling  the evenly off fixes the problem and so does moving around the corner vertex

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: using "evenly" turning straight lines into curves?
« Reply #11 on: May 05, 2014, 05:58:01 PM »
Thanks for the file. This problem only seems to occur when the bevel mode type is set to Extend. Using either symmetrical or reset fixes the problem. If it isn't important to your style to use Extend this might be a solution. Either way we'll look into it.

Thanks,

Paul
Paul Roberts
iToo Software