export texture scale

export texture scale

Anonymous
Not applicable
1,310 Views
5 Replies
Message 1 of 6

export texture scale

Anonymous
Not applicable

hi

when i export a materia's texture using IExport  ,i found a problem:

 

set two material's texture:  scale's   sample size  : 1193.8mm,1175.15mm;

s2.jpgs1.jpg

 

 

 when i export data ,i got different number for "texture_RealWorldScale":

1: masonry:

<texture_RealWorldScaleX>3.91666666666667</texture_RealWorldScaleX>
<texture_RealWorldScaleY>3.85546875</texture_RealWorldScaleY>

<texture_UScale>1</texture_UScale>
<texture_UVScale>1</texture_UVScale>
<texture_VScale>1</texture_VScale>

..

2:wood:

<texture_RealWorldScaleX>47</texture_RealWorldScaleX>
<texture_RealWorldScaleY>46.26</texture_RealWorldScaleY>

<texture_UScale>1</texture_UScale>
<texture_UVScale>1</texture_UVScale>
<texture_VScale>1</texture_VScale>

..

when i import the model in unity ,i setting the texture's tiling use RealWorldScale ,but wrong.

i think the different materia have different calculate scale?

How to calculate the different?what is the standard?

sorry for pool english!

thanks very much!

 

 

 

 

 

0 Likes
1,311 Views
5 Replies
Replies (5)
Message 2 of 6

Revitalizer
Advisor
Advisor

Hi,

 

this may be interesting for you:

https://forums.autodesk.com/t5/revit-api-forum/exporting-revit-2017-model-materials-using-a-customex...

 

If you export a DXF file, there can be found additional texture information which can be extracted.

 

As for the scaling topic, for my Material 248403, I can find:

 

[...]

<Material id="RevitMaterialDefinition248403" app="REVIT" Background="0" Backlight="1" Sample="0" Tiling="0">^J<LinearUnits unitType="foot" unitScale="1.0"/>^J<ArchitecturalMaterial name="MyTexture">^J<ArchTemplateParameters name="MyTexture" classid_A="2008828122
300
" classid_B="14503598">^J</ArchTemplateParameters>^J<ArchMatParameters>^J<ArchDiffuseColor>^J<RGBf r="0.0000" g="0.0000" b="0.0000"/>^J</ArchDiffuseColor>^J<ArchIndexOfRefraction>1.0000</ArchIndexOfRefraction>^J<ArchTransparency>0.3000</ArchTransparency>^J<ArchLu
300
minance>0.0000</ArchLuminance>^J</ArchMatParameters>^J<MapSet>^J<MapLib>^J<TextureMap name="MyTexture texture" id="RevitTextureDefinition248403">^J<BitmapMap>^J<TexMapCoords2d>^J<TextureCoords>^J<ExplicitMapChannel CoordPlane="uv">^J<MapChannel>1</MapChannel>^J<UCoor
300
ds>^J<OffsetCoord>0.0000</OffsetCoord>^J<TilingCoord>0.0000</TilingCoord>^J<TextureTiling Tiling="tile"/>^J</UCoords>^J<VCoords>^J<OffsetCoord>0.0000</OffsetCoord>^J<TilingCoord>0.0000</TilingCoord>^J<TextureTiling Tiling="tile"/>^J</VCoords>^J</ExplicitMapChannel>
300
^J</TextureCoords>^J</TexMapCoords2d>^J<BitmapParameters>^J<BitmapFile filename="D:\MyTexture.jpg"/>^J<Cropping on="0" CropType="crop">^J<UCrop>0.0</UCrop>^J<VCrop>0.0</VCrop>^J<WCrop>1.0</WCrop>^J<HCrop>1.0</HCrop>^J</Cropping>^J</BitmapParameters>^J</BitmapMap>^J</>

[...]

 

Maybe you can find your values this way, it's just an idea.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 3 of 6

Anonymous
Not applicable

thank you very much for your review!

i export data to dxf,but  no change for modify "sample size " in revit .

i try export to XML :

SC01.jpg

if i change sample size in revit  ,only "texture_realWorldScale" changed,so i think it right,but how it works?

thank you for your reply!

0 Likes
Message 4 of 6

Revitalizer
Advisor
Advisor

Hi,

 

you could browse the Assets:

 

http://thebuildingcoder.typepad.com/blog/2016/10/list-material-asset-texture-and-forge-webinar-recor...

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 5 of 6

Anonymous
Not applicable

Hello,

do you know how can I get the scale's sample size of material from the Revit SDK?

thanks.

TIM截图20180509185642.jpg

0 Likes
Message 6 of 6

983855234
Explorer
Explorer

After my enquiry is due to the unit inconsistent, may be the difference between feet and inches brackets.

 

feet.pnginches.png

0 Likes