Jump to content


Photo

Unity shader question (non CF related)


  • Please log in to reply
5 replies to this topic

#1 M Rose

M Rose

    Advanced Member

  • Members
  • PipPipPip
  • 1,918 posts
  • LocationMelbourne, Australia

Posted 16 October 2016 - 10:56 PM

I've been using AC3D to make tee markers and export them as collada files. I'd export different colored versions of the same model, and Unity would give each one its own individual shader.

 

My free trial ran out, so I had to obtain another version of the program. I've been doing everything the same way I was before, but now in Unity, it only creates one shader and every single one is the same (default) color, even if I export six different models.

 

I'm trying to find way to make multiple color shaders but there doesn't seem to be any way to assign the objects to the ones I want to use.


VG2 • PG • 2k21 • 2019 • Links • GBC • JN5


#2 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 16 October 2016 - 11:09 PM

I don't use AC3D but my guess is you need to change the import naming of the models material. Change it to model name or model name and material. Base texture name is probably coming in as default so it thinks you want to use the same material for each. I can post an alternative a bit later. I model one marker but same material for all of them. Save and import model with unique names. Each model references different section of UV map. It's how they did it for the base markers and hazard stakes. I believe it saves some draw calls to do it that way. Thinking about it mathematically, 5 marker textures could be like 25mb depending on quality where 5 meshes is like 150kb, I believe. So, 5 meshes and 1 texture is better plan.

#3 Mike Jones

Mike Jones

    Advanced Member

  • Administrators
  • 6,159 posts

Posted 17 October 2016 - 12:14 AM

Basically what you want to do is change the colour settings of the material and not the shaders. Every object in unity uses a material and the shader simply tells that material what to do. You need to use a different materials on the objects if you them to appear in different shades. What DP says also works but is a bit more advanced and really depends on your mapping skills in your 3d program.



#4 M Rose

M Rose

    Advanced Member

  • Members
  • PipPipPip
  • 1,918 posts
  • LocationMelbourne, Australia

Posted 17 October 2016 - 07:19 AM

My mapping skills are in a word, basic.

 

I'll try different names actually..... I noticed there was a space for the renaming which I left blank; this may have been part of the issue.


VG2 • PG • 2k21 • 2019 • Links • GBC • JN5


#5 NoPutt

NoPutt

    Advanced Member

  • Members
  • PipPipPip
  • 2,902 posts
  • LocationSouth Carolina

Posted 17 October 2016 - 08:45 AM

Export as wavefront to desktop

Add the .mtl and .obj files to a new folder with your texture/textures.

Import  folder into Unity

If one texture is in folder you'll get one shader In Unity, if multiple textures

are in the folder you will get multiple shaders in Unity.

Best to have all your textures on one image and map in AC3D before exporting to desktop.

Of course for a one color Object you'll only need the one texture.

In Unity under Material Naming try selecting Models name+Models Material and apply.

If you want to do each marker a different color without mapping, you'll have to create a folder

for each color in AC3D . You will still need to select the UV mapping

in AC3D and apply and save before exporting.


Dry Gulch...................Released                     Smithfield Golf Club...........Released

Millstone Golf Club....Released                      The Walker Course............Released

Kingsmill Woods Course...Released               Pine Lake Golf Club..........Released

Woodhaven Golf Club (9) Released                The Reserve at Keowee...Released

Cliffs at Keowee Vineyards..Released              The Ace Club...................Released

Dry Gulch 2..........Released                               Blackberry Oaks.............Released

 


#6 M Rose

M Rose

    Advanced Member

  • Members
  • PipPipPip
  • 1,918 posts
  • LocationMelbourne, Australia

Posted 17 October 2016 - 08:30 PM

I've done each one as a separate model in a separate folder, and it's working just fine. Thanks for everyone's help.


VG2 • PG • 2k21 • 2019 • Links • GBC • JN5





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users