Create Rounded Roofs with undistorted continous UVs in CGA

896
5
Jump to solution
05-22-2018 07:33 AM
AbeleGiandoso
Occasional Contributor

My goalHi all!

I am creating a medieval city.

I am trying to break a bit the perfect structure of the CGA basic roofs and curve a bit the surfaces (think of a Chinese traditional building for instance). Right now my workflow consists in a recursive CGA rule that splits the roof on the vertical axes and scales  the upper portion of a given factor, and then repeats the whole thing a couple of times.

I like the result a lot but the problem comes when is time to texture the thing.

If i project the UVs before the recursive rule (blue example), the UV get progressively distorted vertically. If instead, after the rule, I comp split the different roof sections in faces (purple example) each face gets undistorted UVs but overall the UVs become discontinous. I'd like to find a way for the curved planes of the roofs to have a single UV "flow" (like in the green example).

Can anybody suggest me a way to obtain this result? of if there is a more efficient workflow even better!

I'm trying to obtain it using CGA without importing a premodeled geometry from a 3rd party software, so that the rule can be applied easily to any base shape.

Thanks 

A

0 Kudos
1 Solution

Accepted Solutions
CherylLau
Esri Regular Contributor

No, one of the limitations of cga is that shapes do not know information about other shapes (except in the case of occlusion).  You would have to figure out all the numbers before you split up the shapes and then pass the appropriate numbers in to each part.

View solution in original post

5 Replies
CherylLau
Esri Regular Contributor

I don't think there's an easy way to do this because the roof operations do not automatically create UVs, so this means UVs will have to be added using setupProjection().  I would say that the appropriate UVs need to be calculated and specified for each face.

However, maybe there's something I'm overlooking since I'm not sure how you managed to get the continuous UVs on the roofs in the blue case.  So, maybe there's another way.  (In the red case, I'm guessing that setupProjection() is used.)

0 Kudos
AbeleGiandoso
Occasional Contributor

Hi Cheryl

I'm not in front of my station right now but I remember 

I managed to get the continous UVS in the blue case by applying the project UV before the recursive split and scale rule. At least in the Gable roof case. I will find the rule and past it here asap.

For the green case I was hoping there was some way to  precisely translate each uvs on the v axis of the height of the precedent lower roof section UV height so that they all get placed exactly one after the other on the v axis and centered on the u axis in a continuous way. I don't know if it makes much sense but that's what I would do in Maya with a seam uvs operation.

Thanks 

A

0 Kudos
CherylLau
Esri Regular Contributor

Sorry, there's isn't an operation that will do that nicely for you in one call.  You'll have project the uv's onto each face and then calculate how much you want to translate the uv's and use translateUV().

AbeleGiandoso
Occasional Contributor

I understand

Would you know if there is a way for a face to know the uv "height" of the one immediately below? 

Than I could write a rule translating each face of that amount. 

Cheers

A

0 Kudos
CherylLau
Esri Regular Contributor

No, one of the limitations of cga is that shapes do not know information about other shapes (except in the case of occlusion).  You would have to figure out all the numbers before you split up the shapes and then pass the appropriate numbers in to each part.