How should i modify the roof code?

2871
7
11-23-2013 10:38 PM
xinlongliu
New Contributor II
i want to achieve the roof like the picture A.The code i wrote is below:
roof-->
   roofGable(30, 0, 0, false)
setupProjection(0,scope.xy,getTextureSizeU,getTextureSizeV) projectUV(0)
set(material.dirtmap,getRoofTexture) setupProjection(2,scope.xy,1,1) projectUV(2)
when i applied the code to the shape,i get the result as the picture B.The lower part picture was misty.I did some experiments.I drew two shapes which the differences between them were the length and width.The picture C represents the result.
    how should i modify the code?
A:[ATTACH=CONFIG]29304[/ATTACH]
B:[ATTACH=CONFIG]29302[/ATTACH]
C:[ATTACH=CONFIG]29303[/ATTACH]
Tags (2)
0 Kudos
7 Replies
by Anonymous User
Not applicable
Original User: BTLeslie

Hi, I'm sure Matthias will respond if there is a better way of doing this but I have found that if you put and extra point in a building edge it will trick CE into drawing that edge as a hip end instead of a gable end so you can create odd-ended roofs like in the picture I attach.
[ATTACH=CONFIG]29309[/ATTACH]
0 Kudos
xinlongliu
New Contributor II
Hi, I'm sure Matthias will respond if there is a better way of doing this but I have found that if you put and extra point in a building edge it will trick CE into drawing that edge as a hip end instead of a gable end so you can create odd-ended roofs like in the picture I attach.
[ATTACH=CONFIG]29309[/ATTACH]


thanks for reply.The problem i come across is mainly about the misty of the picture when i project.If i divide the model into two parts,the upper part's map is projected correctly.But the lower part's map is misty as the picture B i supplied.I wonder if there is a solution to this problem.
0 Kudos
by Anonymous User
Not applicable
Original User: BTLeslie

Ah haa - that'll teach me to look at the pictures and not read properly (actually I'll probably never learn) - I'd try changing the projection to scope.xz
0 Kudos
xinlongliu
New Contributor II
Ah haa - that'll teach me to look at the pictures and not read properly (actually I'll probably never learn) - I'd try changing the projection to scope.xz


yeah.I have also tried the "scope.xz" which caused another problem.The lower part's map is projected correctly,nevertheless the upper part's picture is misty.Is there a solution which could project the picture correctly on the lower and upper part at the same time.The picture A is screen shot from the esri scene.
0 Kudos
by Anonymous User
Not applicable
Original User: BTLeslie

you need to apply different projections to different elements of the model - the comp(f){......} function may help you split the model into the various parts.
0 Kudos
xinlongliu
New Contributor II
you need to apply different projections to different elements of the model - the comp(f){......} function may help you split the model into the various parts.


How should i write the code if i split the roof such as the picture B's
0 Kudos
by Anonymous User
Not applicable
Original User: BTLeslie

You'll want to split the roof into its component parts using comp(f){} then apply the materials to those separate parts:

roof-->
roofGable(30, 0, 0, false)
comp(f){top:roofTop|side:roofSide}

roofTop-->
...material definition....

roofSide-->
...material definition....

if splitting it into top and side doesn't create enough separate parts you can split it into top,bottom,left,right,front,back if you like.  It's all in the help docs and tutorials.
0 Kudos