• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by kingIZZZY · Dec 16, 2009 at 12:32 AM · mayacg

3ds max / Maya / Lightwave / etc exporting CgFX

This is a 3rd party software question i'd highly appreciate if you could answer.

How to export CgFX from 3ds Max / Maya / Lightwave / etc, for further conversion into ShaderLab?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by soulzero · Oct 29, 2010 at 05:46 PM

By default, DirectX shaders, including CGFX files, are saved in \maps\fx\ in the 3ds Max program directory.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Lance Sun · Dec 16, 2009 at 07:30 AM

You can cut and paste the bulk of the Cg code from the CgFX file to a ShaderLabs file, because ShaderLabs supports Cg, but you still have to rewrite the top-level constructs of how to handle passes, renderstates, fallbacks, and semantics.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image kingIZZZY · Dec 17, 2009 at 06:47 AM 0
Share

Lance Sun:

Thanks, but actually what I was asking was about generating the CgFX code to begin with. I'm looking for the "Export CgFX" button in these DCC tools. After texturing and adding lots of special materials and effects to my model, how do I get my hands on the CgFX shader code behind it.

(For clarification, I ended off explaining why I need this, the answer being because - once I figure out how to generate the CgFX code - I'm gonna convert it to ShaderLab, as you explained).

avatar image Lance Sun · Dec 17, 2009 at 11:19 AM 0
Share

I don't know about the others, but $$anonymous$$ax has a comes with a couple of shaders you can use. (StandardFX.fx)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Euler Rotation for Imported Assets 1 Answer

Unity importing Instances wrong via FBX. 4 Answers

X and Z Changed When Importing From Maya 0 Answers

How can a young programming beginner break into Unity? 3 Answers

Unity importing Maya mesh incorrectly 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges