Jump to content

Multiple Materials/Textures


Recommended Posts

Hello,

I am having some problems exporting my parts with multiple materials. Any mesh part with the second material on it does not render at all and the first material has the wrong textures.

The FBX exported from max is a single object with 6 elements and 2 materials (one for the endcaps and one for the skin).

MsxPic_01_zpsjiiw4jv0.png

In unity, the mesh has two materials applied that are using KSP shaders

UnityPic_03_zpszcpnaskq.png

In the KSP Part Tools, the mesh only lists one material.

UnityPic_02_zpsddsyys4h.png

And finally what it looks like in-game. The endcaps dont render at all, and the skin has the wrong material and texture on it. Does anybody know how to fix this? Help is always appreciated, thanks.

GamePic_01_zpsvm6iqewq.png

Here is my part cfg

PART{
// --- general parameters ---
name = StationQuarter_375x125
module = Part
author = Michael


// --- asset parameters ---
mesh = StationQuarter_375x125.mu
scale = 1.0
rescaleFactor = 1


// --- node definitions ---
node_stack_top = 0.0, 0, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, 0, 0.0, 0.0, -1.0, 0.0,3





// --- editor parameters ---
TechRequired = metaMaterials
entryCost = 25850
cost = 7250
category = Pods
subcategory = 0
title = Testpart
manufacturer = asdf
description = asdf



// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,1,0


// --- standard part parameters ---
mass = 3.75
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 15
breakingForce = 50
breakingTorque = 50
maxTemp = 2000
fuelCrossFeed = True




}

Edited by DarkLord
Link to comment
Share on other sites

  • 1 year later...

This looks like the least stale post concerning multiple materials, so I'll ask here: how exactly is this done?

My current hierarchy is like this

GameObject

-Mesh1

--Colliders

-Mesh2

--Colliders

And I need mesh 1 and 2 to use different shaders. So they need different materials, right? However, it seems through prefab or otherwise, changing one of their materials or shaders also changes the other. Do I need to set the material as a child object of the mesh in question? Kinda lost on that part. 

Link to comment
Share on other sites

@DrunkenKerbalnaut In the Materials folder do a right-click, create, material and set the Material up as usual. In The hierarchy select the object(s) you want to apply the new Material to. While the objects are highlighted in blue, drag'n'drop the new Material below the "Add Component" button in the inspector:

XvuNl6u.png

Link to comment
Share on other sites

7 minutes ago, Eleusis La Arwall said:

@DrunkenKerbalnaut In the Materials folder do a right-click, create, material and set the Material up as usual. In The hierarchy select the object(s) you want to apply the new Material to. While the objects are highlighted in blue, drag'n'drop the new Material below the "Add Component" button in the inspector:

XvuNl6u.png

Many thanks, stranger. 

"MobileVAB"?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...