Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 winsjansen · Jul 30, 2012 at 02:27 PM · texturematerialsminecraft

Unity3d - Minecraft

Greetings,

I am currently working on making "Unity3d Version Of Minecraft", atleast, the game is build around the functions in Minecraft.

I have been able to do alot, more then I thougth whitout any help, but there is a few things I can't seem to work my way around, and I would be very happy if someone could atleast help me whit some of the issues I have been getting so far in the development!

(NB; My questions rely on that you have played Minecraft)

  • When you damage blocks in Minecraft, a texture is slowly appearing over the main texture of the objects, to help you know how much its left to damage before its broken! This, is something I cant seem to work my way around in Unity3d.

I have already made an method for damage and breaking objects, and its in the same code I need to implement the texture. When the player is clicking the block, and holding it down for a certein time, it gets destroyd, and it works perfect. What I need help whit, is to add a second texture (transperant) to the main texture when this is happening! I have 4 textures that I need to be placed over the main texture, over time, but the only thing I can seem to get to work, is to change the main texture, but I still need that to be there!

Is there someone, who have any ideas? Or, know how to do this?

Thanks in advance! Best Regards, M!

Comment
Add comment · Show 1
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 Cherno · Feb 14, 2016 at 12:50 PM 0
Share

I recommend this thread: After playing $$anonymous$$ecraft...

It is a treasure trove of information about all things $$anonymous$$inecraft in Unity-related.

3 Replies

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

Answer by Screenhog · Jul 30, 2012 at 07:06 PM

"When you damage blocks in Minecraft, a texture is slowly appearing over the main texture of the objects, to help you know how much its left to damage before its broken! This, is something I cant seem to work my way around in Unity3d."

The Transparent Cutout shaders might be helpful here. They have a slider that can change at what point a texture's transparency goes from opaque to transparent. You can make good gradual cracked effects with this technique.

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 winsjansen · Sep 16, 2012 at 01:57 PM 0
Share

Thanks for the reply, I have actualy never heard of this technique! Would you like to explain it abit for me? $$anonymous$$aybe throw out an example script?

avatar image Screenhog · Sep 16, 2012 at 03:24 PM 0
Share

It's best to experience it for yourself... it might not be quite what you're looking for, although it certainly makes an object look cracked.

  1. Create a texture in an image editing program that can support editing the alpha (transparent) layer.

  2. Do whatever you want for the RGB channels of the texture.

  3. In the alpha channel of the image, put in a grayscale of some kind. In your case, a black and white image of something cracked would be good.

  4. Bring the image into Unity. Apply it as the texture of a transparent cutout shader. $$anonymous$$ove the slider back and forth to see the texture getting gradually more cracked.

Now, that might not be exactly what you want, but it does do a cracked effect, and if you had a slightly smaller object inside it, it might just work.

avatar image
0

Answer by joeyaaaaa · Jul 30, 2012 at 02:40 PM

theres a blended sky script that you caqn probably mess around with to blend a texture like you say search for it

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
0

Answer by Bunny83 · Jul 30, 2012 at 03:08 PM

The easiest way is to display another block / cube that is slightly larger than the actual block and display your animated "cracking" texture on this cube with a transparent / cutout shader.

Btw, have you seen the Minecraft starter package? Because most people who try to do a minecraft clone start by using seperate cubes and end up with a framerate of 2 fps for 10x10x10 cubes (1000). As seperate objects each object has it's own drawcall. Minecraft has overall something like 250 drawcalls (including gui and mobs). You have to chunk your terrain.

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

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

11 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

Related Questions

Unity3D - Ammo Texture repeat 2 Answers

Get Texture 2D after all shader passes are applied 0 Answers

Textured model issue in Unity 3.5 -1 Answers

Help with Unity + Orthello + Texture Packer 0 Answers

Assigning UV Map to model at runtime 0 Answers


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