#All Blend Modes

1 messages · Page 1 of 1 (latest)

fickle echo
#

Courtesy of @loud umbra for kickstarting this

Shown are all supported blend modes available to both entities and particles. From left to right:

  1. Normal
  2. Exclusion (Inverts based on lightness)
  3. Multiply (Overlays bright colors over white; darkens most colors)
  4. Double Multiply (Brightens or highlights backgrounds when used with brighter colors; darkens most colors)
  5. Additive (Merges toward white)
  6. Additive Blend (Merges toward white based on alpha value)
  7. Premultiplied Alpha (Inversely blends to Additive based on alpha value)
  8. Opaque (Makes all pixels opaque)
fickle echo
#

Just run /function blend_materials_demo/main.

#

Check a closer look at the inversion effect provided by "Exclusion":

#

Also see the world brightening and color overlay benefits of "Double Multiply":

ancient trellis
#

Ooh those red-lighting examples are amazing

dusty pollen
#

You've mentioned these are available to entities and particles. But is there anything like this for UI?

proud fossil
#

just to be sure, this is outside of experimental, right?

silver wadi
sour geyser
#

how can i use it for an entity?

untold cedar
fickle echo
#

Yes, it is very possible to do that. 😄

untold cedar
#

Make something with it

glossy palm
#

Could I apply this to the players view always via a resource pack?

fickle echo
#

Yes, I've done this for Marketplace. Be warned of F1.

glossy palm
fickle echo
#

You place a cube over the head only in 1st person and only for the local player… configured with the materials above.

glossy palm
fickle echo
#

Yeah, sorry, when I did this, it was strictly under NDA. I have no code to give and can only leave you with the broad idea. I'd start with trying to add additional geometries to the player using render controllers.

ancient trellis
#

I'm not under NDA for it and I know what you did

glossy palm
ancient trellis
#

Sure @glossy palm

To get it working you would just need to render a cube over the player's camera using a first-person animation

#

Pretty trivial, most 3d item setups also use this method to get a model to render in the player's hand

#

Just position a cube over the player's head, add the geometry to the player's entity rp file,
create a new render controller for it and set the render controller to be enabled when v.is_first_person is true

glossy palm
ancient trellis
#

If you keep the bone structure in the new geo file the same then it will rotate with the head, as the default animations will apply to it too

#

So just keep all the bones and remove the cubes, then remove all bones that aren't in the direct "tree" - So legs and arms can be removed, etc

glossy palm
mental cipher
mental cipher
#

Here's the default skin pack.

#

Hope that is of help to you 🙂

#

The geometry.json file has the player models in it.

ancient trellis
#

Yeah it is

sour geyser
#

I already did it but it doesn't work with the material it looks the same and what is transparent disappears 😦

fickle echo
viscid cypress
#

@sturdy mesa ^

sturdy mesa
#

Ohh

sturdy mesa
viscid cypress
#

It's not too far off, I'm sure you can extrapolate

#

Given this and the messages Veka sent on OSS answering you

sturdy mesa
#

I'm confused

#

This doesn't really explain it

#

Additional geometries?

sturdy mesa
#

@viscid cypress

#

Please explain

slim cape
#

If I slapped particle on the players face, this would work right?

#

Like I would want the player to see everything but inverted

ancient trellis
#

@slim cape Should do yeah. You may even be able to use it as an entity material and have a cube over the player's face but still inside their head (so it looks normal from 3rd person). Though unfortunately 3rd person wouldn't have the effect applied

lucid mason
#

Can I use these methods in a custom block?

ancient trellis
#

Could make a fake block entity and use it tho

lucid mason
#

Oh okay

sturdy mesa
#

Not as well as with particle

loud umbra
#

Idk, works perfectly for me.

sturdy mesa
#

@loud umbra

#

Sorry ,but realy gotta know , since all i could do was this:

#

Cant say this is realy good

loud umbra
#

Is that entity material?

sturdy mesa
#

That's why it doesn't look good

loud umbra
#

Add "-defines": ["FANCY"] to that material and in RC use "ignores_lighting": true. Also I hope you're using the double multiply material, and not additive.

sturdy mesa
loud umbra
#

See example pack in this post for blendSrc and blendDst values for double multiply blending mode

sturdy mesa
#

This is what im using

#

Its nowhere as good as the particle material

#

this is what it should look like

#

But this is what it actualy look like:

loud umbra
sturdy mesa
#

I did the same with the model

#

I stacked multiple layers of intensifying model parts

loud umbra
#

Make sure the texture is 100% green, 0% blue and 0% red

sturdy mesa
#

I think it was even

#

But the contrast in yours is much clearer

#

Much brighter without being too bright too

loud umbra
#

Try "+states": ["DisableDepthWrite"], intensifying layers might be blocking each other

sturdy mesa
#

Ohh

#

In material?

#
{
  "materials": {
    "version": "1.0.0", 
    "night_vision:entity_alphablend": {
      "blendSrc": "DestColor",
      "blendDst": "SourceColor",
      "-defines": ["FANCY"],
      "+states": ["DisableDepthWrite"]
    }
  }
}
loud umbra
sturdy mesa
#

Oh

loud umbra
#

Actually hold on, how are you displaying this geometry? In UI paper doll or in hand?

sturdy mesa
#

In attachable

#

So it doesnt require player json

loud umbra
#

Alright, good

sturdy mesa
#

How much of an issue is it when its not 100% green

#

?

sturdy mesa
sturdy mesa
#

is it #008000

#

?

loud umbra
#

00FF00

sturdy mesa
#

alr

#

with and without "+states": ["DisableDepthWrite"]

loud umbra
#

What's that thing on the right?

sturdy mesa
#

without

loud umbra
#

Also what is the alpha value of your texture?

sturdy mesa
#

its 100%

#

you mean opacity right?

loud umbra
#

yes

#

It looks like you're using wrong material somehow

sturdy mesa
#

emmisive one

loud umbra
sturdy mesa
#

kk

pale furnace
#

I've tried using this and I can make it work for particles, but it says materials not defined when I try to use it for entities and it just crashes my game

loud umbra
#

You have to edit entity materials file, and name your materials something like "example:entity_alphablend"

sturdy mesa
loud umbra
#

It does -_-

slim estuary
#

Been using these on entities since the day this post was written bao_ext_toldyouso

sturdy mesa
sturdy mesa
#

that would only mean attachables are different

slim estuary
sturdy mesa
#

nono

#

still same as in my image

slim estuary
#

Attachables are the sole reason everything in this showcase post worked

#

What?

sturdy mesa
#

it does multiply , but isnt 100% transparent

#

as i can read out of that image

slim estuary
#

Well idk how you control opacity with an emissive material. Normally, you could set the alpha value from the RC assuming the entity supported that feature, but not sure about attachables.

#

Saying “blends don’t work on attachables” is simply not true though, that’s not the root of your problem

sturdy mesa
#

hmm, alr

serene vapor
mossy quiver
#

How to do it white black like an impact frames??

fickle echo
serene vapor
fickle echo
#

I'm afraid I don't remember the ramifications of doing this in entities.

loud umbra
#

Fun fact, framebuffer in MC actually has an alpha channel that you can write to... The issue is that you can't read anything from it because there is no blend mode that utilises DestAlpha which is a real shame because having a whole new invisible color channel would've been very useful for various effects

wooden pawn
#

Is it possible to create a material that converts lighter color to white and darker ones to black?

#

Black and white in short

fickle echo
deep galleon
#

Amazing

hazy sphinx
#

Interesting

potent pelican
#

this is peak

fickle echo
#

It's in the add-on.

hot siren
#

Is there any way to reproduce this rendering bug on a custom fence? Using render_method or some other approach?