Author Topic: Track tyre marks - Maya - fbx2edf  (Read 2148 times)

Warlock

  • Hero Member
  • *****
  • Posts: 1058
    • View Profile
Track tyre marks - Maya - fbx2edf
« on: June 02, 2016, 12:50:27 AM »
Hello Piboso, please, i've been struggling with this for too long now and im getting really frustrated with such a simple thing.

From track creation rules:
Code: [Select]
For tyre marks, a second texture can be defined using Opacity channel and a secondary UV mapping. Textures with alpha channel will be drawn with alpha blending, while ones without alpha channel will be drawn with multiply blending.

For rain puddles (track reflections) a third texture can be set in the Glossiness or Specular Level channel, and a secondary UV mapping. The alpha channel is used to define puddles on wet surfaces (asphalt and concrete).

Please correct me if i'm wrong with this:

- I created a texture with the tyre marks, with or without alpha channel it will blend anyway, alpha blending or multiply blending.
- Also created a secondary UV mapping for the track mesh and link the tyre marks texture to this secondary UV map. This way i overlay 2 textures in the same object (track mesh), one repeats all along the track (asphalt texture+ primary UV map) and the other one doesnt repeat along the track, only where you want to (tyre texture+ secondary UV map)

-To make it work in GPB both textures must be in the same material you assigned to the track mesh. Asphalt texture is linked to the color property of the material, and tyre texture is linked to the opacity property of the material

And here is the problem, Autodesk Maya doesn't have any Opacity , Glossiness or Specular properties in its main materials (lambert, blinn , phong)
3DSmax does, obviously, KRP track modders used them and it worked.

This are the material properties in Maya.   (it has more, but raytrace options etc, nothing relevant for this problem)


I would say Opacity in 3DSMAx is what Transparency is in Maya, i tried linking the tyre marks texture to this channel but fxb2edf doesn't seem to recognize it. Once converted the fbx file to .map file i only see the tarmac texture.

Is somehow fbx2edf searching for an opacity channel in the fbx file, but found Transparency instead and ignores it?




It would really great if fbx2edf could take all shaders, materials, maps directly from the fbx export. Nice and tidy  :)

Im going to put here and ASCII export i did from Maya with a very simple example in case it helps. It's a poly plane with 4 faces  (a micro track  :) )  with the texturing method i explained above.

Code: [Select]
//Maya ASCII 2015 scene
//Name: ASCII_export.ma
//Last modified: Wed, Jun 01, 2016 11:26:17 PM
//Codeset: 1252
requires maya "2015";
currentUnit -linear centimeter -angle degree -time film;
fileInfo "application" "maya";
fileInfo "product" "Maya 2015";
fileInfo "version" "2015";
fileInfo "cutIdentifier" "201503261530-955654";
fileInfo "osv" "Microsoft Windows 7 Home Premium Edition, 64-bit Windows 7 Service Pack 1 (Build 7601)\n";
createNode transform -name "TRKASPH";
createNode mesh -name "TRKASPHShape" -parent "TRKASPH";
setAttr -keyable off ".visibility";
setAttr ".visibleInReflections" yes;
setAttr ".visibleInRefractions" yes;
setAttr ".uvPivot" -type "double2" 0.49999992013908923 0.499999979743734 ;
setAttr -size 2 ".uvSet";
setAttr ".uvSet[0].uvSetName" -type "string" "TARMAC_UV_MAP";
setAttr -size 9 ".uvSet[0].uvSetPoints[0:8]" -type "float2" 0 0 0.5
0 1 0 0 0.5 0.5 0.5 1 0.5 0 1 0.5 1 1 1;
setAttr ".uvSet[1].uvSetName" -type "string" "SKIDS_UV_MAP";
setAttr -size 4 ".uvSet[1].uvSetPoints[0:3]" -type "float2" 0.0019920063
0.0019920063 0.99800783 0.0019920063 0.99800783 0.99800795 0.0019920063 0.99800795;
setAttr ".currentUVSet" -type "string" "SKIDS_UV_MAP";
setAttr ".displayColorChannel" -type "string" "Ambient+Diffuse";
setAttr ".collisionOffsetVelocityMultiplier[0]"  0 1 1;
setAttr ".collisionDepthVelocityMultiplier[0]"  0 1 1;
setAttr -size 9 ".vrts[0:8]"  -2.5 -5.5511151e-016 2.5 0 -5.5511151e-016 2.5
2.5 -5.5511151e-016 2.5 -2.5 0 0 0 0 0 2.5 0 0 -2.5 5.5511151e-016 -2.5 0 5.5511151e-016 -2.5
2.5 5.5511151e-016 -2.5;
setAttr -size 12 ".edge[0:11]"  0 1 0 0 3 0 1 2 0 1 4 1 2 5 0 3 4 1
3 6 0 4 5 1 4 7 1 5 8 0 6 7 0 7 8 0;
setAttr -size 4 -capacityHint 16 ".face[0:3]" -type "polyFaces"
f 4 0 3 -6 -2
mu 0 4 0 1 4 3
f 4 2 4 -8 -4
mu 0 4 1 2 5 4
f 4 5 8 -11 -7
mu 0 4 3 4 7 6
mu 1 4 0 1 2 3
f 4 7 9 -12 -9
mu 0 4 4 5 8 7;
setAttr ".creaseData" -type "dataPolyComponent" Index_Data Edge 0 ;
setAttr ".creaseVertexData" -type "dataPolyComponent" Index_Data Vertex 0 ;
setAttr ".holeFaceData" -type "dataPolyComponent" Index_Data Face 0 ;
createNode materialInfo -name "materialInfo3";
createNode shadingEngine -name "lambert3SG";
setAttr ".isHistoricallyInteresting" 0;
setAttr ".renderableOnlySet" yes;
createNode lambert -name "LAMBERT_MATERIAL";
createNode file -name "TARMAC_TEXTURE_FILE";
setAttr ".fileTextureName" -type "string" "C:/Users/Warlock/Documents/maya/projects/GPB_Tracks/Surface_test//sourceimages/asphalt_black_yellowLine.tga";
createNode place2dTexture -name "place2dTexture3";
createNode file -name "SKIDS_TEXTURE_FILE";
setAttr ".fileTextureName" -type "string" "C:/Users/Warlock/Documents/maya/projects/GPB_Tracks/Surface_test//sourceimages/skids1_inverted.tga";
createNode place2dTexture -name "place2dTexture4";
createNode uvChooser -name "uvChooser1";
createNode lightLinker -shared -name "lightLinker1";
setAttr -size 5 ".link";
setAttr -size 5 ".shadowLink";
select -noExpand :time1;
setAttr ".outTime" 1;
setAttr ".unwarpedTime" 1;
select -noExpand :renderPartition;
setAttr -size 5 ".sets";
select -noExpand :renderGlobalsList1;
select -noExpand :defaultShaderList1;
setAttr -size 4 ".shaders";
select -noExpand :postProcessList1;
setAttr -size 2 ".postProcesses";
select -noExpand :defaultRenderUtilityList1;
setAttr -size 4 ".utilities";
select -noExpand :defaultRenderingList1;
select -noExpand :defaultTextureList1;
setAttr -size 4 ".textures";
select -noExpand :initialShadingGroup;
setAttr ".renderableOnlySet" yes;
select -noExpand :initialParticleSE;
setAttr ".renderableOnlySet" yes;
select -noExpand :defaultResolution;
setAttr ".pixelAspect" 1;
select -noExpand :hardwareRenderGlobals;
setAttr ".colorTextureResolution" 256;
setAttr ".bumpTextureResolution" 512;
select -noExpand :hardwareRenderingGlobals;
setAttr ".objectTypeFilterNameArray" -type "stringArray" 22 "NURBS Curves" "NURBS Surfaces" "Polygons" "Subdiv Surface" "Particles" "Particle Instance" "Fluids" "Strokes" "Image Planes" "UI" "Lights" "Cameras" "Locators" "Joints" "IK Handles" "Deformers" "Motion Trails" "Components" "Hair Systems" "Follicles" "Misc. UI" "Ornaments"  ;
setAttr ".objectTypeFilterValueArray" -type "Int32Array" 22 0 1 1
1 1 1 1 1 1 0 0 0 0 0 0
0 0 0 0 0 0 0 ;
select -noExpand :defaultHardwareRenderGlobals;
setAttr ".resolution" -type "string" "ntsc_4d 646 485 1.333";
select -noExpand :ikSystem;
setAttr -size 4 ".ikSolver";
connectAttr "lambert3SG.message" "materialInfo3.shadingGroup";
connectAttr "LAMBERT_MATERIAL.message" "materialInfo3.material";
connectAttr "TARMAC_TEXTURE_FILE.message" "materialInfo3.texture" -nextAvailable
;
connectAttr "LAMBERT_MATERIAL.outColor" "lambert3SG.surfaceShader";
connectAttr "TRKASPHShape.instObjGroups" "lambert3SG.dagSetMembers" -nextAvailable
;
connectAttr "TARMAC_TEXTURE_FILE.outColor" "LAMBERT_MATERIAL.color";
connectAttr "SKIDS_TEXTURE_FILE.outTransparency" "LAMBERT_MATERIAL.transparency"
;
connectAttr "place2dTexture3.coverage" "TARMAC_TEXTURE_FILE.coverage";
connectAttr "place2dTexture3.translateFrame" "TARMAC_TEXTURE_FILE.translateFrame"
;
connectAttr "place2dTexture3.rotateFrame" "TARMAC_TEXTURE_FILE.rotateFrame";
connectAttr "place2dTexture3.mirrorU" "TARMAC_TEXTURE_FILE.mirrorU";
connectAttr "place2dTexture3.mirrorV" "TARMAC_TEXTURE_FILE.mirrorV";
connectAttr "place2dTexture3.stagger" "TARMAC_TEXTURE_FILE.stagger";
connectAttr "place2dTexture3.wrapU" "TARMAC_TEXTURE_FILE.wrapU";
connectAttr "place2dTexture3.wrapV" "TARMAC_TEXTURE_FILE.wrapV";
connectAttr "place2dTexture3.repeatUV" "TARMAC_TEXTURE_FILE.repeatUV";
connectAttr "place2dTexture3.offset" "TARMAC_TEXTURE_FILE.offset";
connectAttr "place2dTexture3.rotateUV" "TARMAC_TEXTURE_FILE.rotateUV";
connectAttr "place2dTexture3.noiseUV" "TARMAC_TEXTURE_FILE.noiseUV";
connectAttr "place2dTexture3.vertexUvOne" "TARMAC_TEXTURE_FILE.vertexUvOne";
connectAttr "place2dTexture3.vertexUvTwo" "TARMAC_TEXTURE_FILE.vertexUvTwo";
connectAttr "place2dTexture3.vertexUvThree" "TARMAC_TEXTURE_FILE.vertexUvThree";
connectAttr "place2dTexture3.vertexCameraOne" "TARMAC_TEXTURE_FILE.vertexCameraOne"
;
connectAttr "place2dTexture3.outUV" "TARMAC_TEXTURE_FILE.uvCoord";
connectAttr "place2dTexture3.outUvFilterSize" "TARMAC_TEXTURE_FILE.uvFilterSize"
;
connectAttr "place2dTexture4.coverage" "SKIDS_TEXTURE_FILE.coverage";
connectAttr "place2dTexture4.translateFrame" "SKIDS_TEXTURE_FILE.translateFrame"
;
connectAttr "place2dTexture4.rotateFrame" "SKIDS_TEXTURE_FILE.rotateFrame";
connectAttr "place2dTexture4.mirrorU" "SKIDS_TEXTURE_FILE.mirrorU";
connectAttr "place2dTexture4.mirrorV" "SKIDS_TEXTURE_FILE.mirrorV";
connectAttr "place2dTexture4.stagger" "SKIDS_TEXTURE_FILE.stagger";
connectAttr "place2dTexture4.wrapU" "SKIDS_TEXTURE_FILE.wrapU";
connectAttr "place2dTexture4.wrapV" "SKIDS_TEXTURE_FILE.wrapV";
connectAttr "place2dTexture4.repeatUV" "SKIDS_TEXTURE_FILE.repeatUV";
connectAttr "place2dTexture4.offset" "SKIDS_TEXTURE_FILE.offset";
connectAttr "place2dTexture4.rotateUV" "SKIDS_TEXTURE_FILE.rotateUV";
connectAttr "place2dTexture4.noiseUV" "SKIDS_TEXTURE_FILE.noiseUV";
connectAttr "place2dTexture4.vertexUvOne" "SKIDS_TEXTURE_FILE.vertexUvOne";
connectAttr "place2dTexture4.vertexUvTwo" "SKIDS_TEXTURE_FILE.vertexUvTwo";
connectAttr "place2dTexture4.vertexUvThree" "SKIDS_TEXTURE_FILE.vertexUvThree";
connectAttr "place2dTexture4.vertexCameraOne" "SKIDS_TEXTURE_FILE.vertexCameraOne"
;
connectAttr "place2dTexture4.outUV" "SKIDS_TEXTURE_FILE.uvCoord";
connectAttr "place2dTexture4.outUvFilterSize" "SKIDS_TEXTURE_FILE.uvFilterSize";
connectAttr "uvChooser1.outVertexUvOne" "place2dTexture4.vertexUvOne";
connectAttr "uvChooser1.outVertexUvTwo" "place2dTexture4.vertexUvTwo";
connectAttr "uvChooser1.outVertexUvThree" "place2dTexture4.vertexUvThree";
connectAttr "uvChooser1.outVertexCameraOne" "place2dTexture4.vertexCameraOne";
connectAttr "uvChooser1.outUv" "place2dTexture4.uvCoord";
connectAttr "TRKASPHShape.uvSet[1].uvSetName" "uvChooser1.uvSets[0]";
relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message";
relationship "link" ":lightLinker1" "lambert3SG.message" ":defaultLightSet.message";
relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
relationship "shadowLink" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message";
relationship "shadowLink" ":lightLinker1" "lambert3SG.message" ":defaultLightSet.message";
connectAttr "lambert3SG.partition" ":renderPartition.sets" -nextAvailable;
connectAttr "LAMBERT_MATERIAL.message" ":defaultShaderList1.shaders" -nextAvailable
;
connectAttr "place2dTexture3.message" ":defaultRenderUtilityList1.utilities" -nextAvailable
;
connectAttr "place2dTexture4.message" ":defaultRenderUtilityList1.utilities" -nextAvailable
;
connectAttr "TARMAC_TEXTURE_FILE.message" ":defaultTextureList1.textures" -nextAvailable
;
connectAttr "SKIDS_TEXTURE_FILE.message" ":defaultTextureList1.textures" -nextAvailable
;
dataStructure -fmt "raw" -as "name=externalContentTable:string=node:string=key:string=upath:uint32=upathcrc:string=rpath:string=roles";
applyMetadata -fmt "raw" -v "channel\nname externalContentTable\nstream\nname v1.0\nindexType numeric\nstructure externalContentTable\n0\n\"TARMAC_TEXTURE_FILE\" \"fileTextureName\" \"C:/Users/Warlock/Documents/maya/projects/GPB_Tracks/Surface_test/sourceimages/asphalt_black_yellowLine.tga\" 2147407300 \"C:/Users/Warlock/Documents/maya/projects/GPB_Tracks/Surface_test/sourceimages/asphalt_black_yellowLine.tga\" \"sourceImages\"\n1\n\"SKIDS_TEXTURE_FILE\" \"fileTextureName\" \"C:/Users/Warlock/Documents/maya/projects/GPB_Tracks/Surface_test/sourceimages/skids1_inverted.tga\" 2204639217 \"C:/Users/Warlock/Documents/maya/projects/GPB_Tracks/Surface_test/sourceimages/skids1_inverted.tga\" \"sourceImages\"\nendStream\nendChannel\nendAssociations\n"
-scn;
// End of ASCII_export.ma

Thank you



EDIT:

Piboso i uploaded an FBX ASCII export of the scene, hope it helps. The one i posted above is not FBX its just ASCII

DOWNLOAD
« Last Edit: June 03, 2016, 03:58:23 AM by Warlock »

janaucarre

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #1 on: June 02, 2016, 09:24:02 AM »
Hi,  i remember i worked so many days in 3dsmax to do tyre marks,  sometimes it was showing black tyre marks as another texture(full opacity)  and sometimes it was nothing to see(full ttransparency),  I've tried many ways like using alpha channel in photoshop and opacity,  but nothing worked as i would. Now i have more time to do test and more skills,  i will try to understand exactly how it does and when a solution will appears i will come here to post.

Warlock

  • Hero Member
  • *****
  • Posts: 1058
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #2 on: June 02, 2016, 06:50:55 PM »
Thank you Jan, is definitely possible with 3DSmax

Check piboso's posted screenshot:
http://forum.piboso.com/index.php?topic=3446.0

Tyre marks should work the same as puddles but in a different channel of the material and its own UVmap.

Tyre maks doesn't even need an alpha channel, without it would use multiply blending.
« Last Edit: June 02, 2016, 06:53:53 PM by Warlock »

Warlock

  • Hero Member
  • *****
  • Posts: 1058
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #3 on: June 03, 2016, 03:50:14 AM »
Piboso i uploaded an FBX ASCII export of the scene, hope it helps. The one i posted above is not FBX its just ASCII

DOWNLOAD

Hawk

  • Hero Member
  • *****
  • Posts: 5647
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #4 on: June 03, 2016, 04:50:26 PM »
Piboso? Please.....  :)

Hawk.

Hawk

  • Hero Member
  • *****
  • Posts: 5647
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #5 on: June 05, 2016, 12:52:10 PM »
Piboso? Please.....  :)

Hawk.

Warlock

  • Hero Member
  • *****
  • Posts: 1058
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #6 on: June 07, 2016, 08:56:58 PM »
<a href="https://www.youtube.com/v/fNLhxKpfCnA" target="_blank" class="new_win">https://www.youtube.com/v/fNLhxKpfCnA</a>

HornetMaX

  • Hero Member
  • *****
  • Posts: 5404
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #7 on: June 08, 2016, 06:59:51 AM »
Interesting approach Warlock :) I like your creativity !

Warlock

  • Hero Member
  • *****
  • Posts: 1058
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #8 on: June 08, 2016, 08:37:04 PM »
 ;D

PiBoSo

  • Administrator
  • Hero Member
  • *****
  • Posts: 2007
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #9 on: June 08, 2016, 10:37:27 PM »

Unfortunately at the moment the secondary textures are not supported in FBX2EDF.

Warlock

  • Hero Member
  • *****
  • Posts: 1058
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #10 on: June 09, 2016, 01:45:58 AM »
Thanks Piboso, but please put what you just have said in the track creation rules page. I think i've aged five years in a month trying to make this work.  :-\

Any chance to update FBX2EDF to support it?   That would let us free to work with the software we feel more comfortable .

So, secondary textures will only work with 3dsMax 2010 with 2010 export plugin.
......mmm 3dsMax is now in version 2017 , just saying   :P

Thanks anyway , at least now i know what i have to do.  :)



doubledragoncc

  • Hero Member
  • *****
  • Posts: 4166
  • If it dont fit HIT it!!!!!!!!!
    • View Profile
    • GPBOC Live Streams
Re: Track tyre marks - Maya - fbx2edf
« Reply #11 on: June 09, 2016, 06:32:41 AM »
Phillips Island is exactly the same graphically as it was when I first got GPB nearly 7 years ago Warlock so..................

I think and hope TTB will be a LOT newer under the hood

DD
GPBOC Live Streams: https://www.youtube.com/c/IASystemsComputerControls

Teamspeak: Server IP: 82.43.148.211  user password "yougetin"

i5 7600 5.0GHz z270 ASUS Maximus Code Mobo 16GB 3866MHz DDR4 RAM ASUS Strix GTX1050Ti OC 4GB DDR5 Kraken X62 AIO Cooler

Warlock

  • Hero Member
  • *****
  • Posts: 1058
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #12 on: June 09, 2016, 01:31:57 PM »
That doesn't mean we have to work with 7 years old tools DD
Real Philip Island track im sure uses new machines to resurface the track, and is the same lyout as always.  ;D

TTB won't substitute GPB as far as i know ,  even if it have newer tools and graphics,  GPB shouldn't be abandoned

Hawk

  • Hero Member
  • *****
  • Posts: 5647
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #13 on: June 09, 2016, 02:21:40 PM »
I think the point is that if the FBX2EDF converter was sorted then there wouldn't be a need for the 3dsmax exporter at all..... I think this was probably the original idea behind the FBX converter so that one tool could service many apps.  :)

Hawk.

h106frp

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Track tyre marks - Maya - fbx2edf
« Reply #14 on: April 06, 2017, 12:56:30 PM »
Another post raised from the dead!

Is the secondary texture in fbx2edf problem on the 'to do' list ?