Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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
0
Question by Crayder · Dec 17, 2019 at 03:35 AM · texturematerialobjecttexture2dmodeling

How to make dynamically texturable object model?

Basically I've had experience in a previous project. That project took place in the GTASA engine.


In my new unity project I'm attempting to make a similar material system. In GTASA object models are very basic and manually changing the textures is a really easy process (given you already have knowledge in modding or scripting servers). Each model has textures assigned to indexes.


For example you could have a sidewalk, the concrete slabs would be texture index 0 and the grass would be texture index 1 of the object. The textures were indexed on each object. This was a very simple and useful system for things like SA:MP (https://wiki.sa-mp.com/wiki/SetObjectMaterial, you could set textures in the game at runtime or even just change the color of a texture on the object).


What would be a good way of having a similar access to textures in Unity? I would like to make it so players could paint house walls and make cool colored sculptures while in game with my project.


Is there a way to make a shader that can hold perhaps like 24 different texture indexes? Then the textures could be selected by the material or perhaps a script on the object. I'm not sure what the best approach would be. Multiple materials on one object that can be changed during runtime, textures that can be changed and updated by the shader, mind boggled here.

Comment
Add comment · Show 2
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 Crayder · Dec 17, 2019 at 05:13 AM 0
Share

I found these similarly relative links:


Shader with multiple textures and material options for each of the four (max 4 per mat) https://assetstore.unity.com/packages/vfx/shaders/multi-texture-shader-56137


Similar question, unanswered and not exactly what I want but the most similar I could find https://answers.unity.com/questions/1207394/multiple-textures-on-single-game-object.html

avatar image Crayder · Dec 17, 2019 at 05:28 AM 0
Share

The textures themselves will be generally 256x256 or 512x512. Thus, potentially I could have just a really large texture atlas of like 4096x4096 yielding 256 different textures (16 by 16 textures, each 256 by 256px). This seems like it's like the better option but would this be more efficient than my above thought process?


SanAndreas ran quite efficiently even on dinosaur computers... and that's basically what I'm looking for. $$anonymous$$aybe if Unity had some sort of similar support for texture archives ins$$anonymous$$d of relying on texture atlasing for less GPU calls.

0 Replies

· Add your reply
  • Sort: 

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.

Follow this Question

Answers Answers and Comments

170 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to add texture to Blender objects properly? 2 Answers

Material not updating on Image 2 Answers

Set image as material 0 Answers

Texture problems with Mixamo and Unity 0 Answers

Having wrong texture on my model? 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