Jump to content

Recommended Posts

Posted

Hey, Im currently tying to get some particles in a mod I'm currently working on. But there are some things I dont understand about it.

 

1. the particle alpha acts pretty wierd. I tried to use "this.setAlphaF()", with some calculations between the brackets. but wether I put it in the "renderParticle" section or the "onUpdate", nothing will happen.

 

2. something wich maybe a partial answer of number 1 is the "getFXLayer()". right now Im using Layer 3 cause it doesnt have a renderer behind it.

But when I render several particles at the same time (at the same place) some will not be visible until the particles in front of it are gone.

I could arange them with the number below 3, but that would influence the vanilla particles as well. so my question is, how can I adjust things like colour and alpha for every single particle? (cause when you change colour on one particle, other will join the party)

 

3. something I noticed is that the particles I made are moving along with the player. when you move towards the left, they will go left with you, till your not moving anymore. than they will return to their original position. something wich vanilla paritcles dont do. also, when I spawn particles at a given position(for example right above a block) they will always have an certain offset. how can I work around both problems?

 

4. currently non of the entityfx has an hitbox I discovered. but I would like to do some eventhandling when players look at a particle. besides I set "canBePushed()" to true, but they wont collide since they dont have an hitbox. I tried to use  "getBoundingBox()" and "setBoundingBox()", but both gave me an error if I returned something else than "this.boudingBox" or "null". so if this can be done, how?

 

One big note on these questions is, that I looked verry closly at the vanilla codes for firework. (something wich come closely to what I want to add) I use the same setup (and GL functions) except that I changed a lot of the calculations and values and that I made my own texture for it (with multiple colours, so thats why I want to dupe the code rather than use it).

 

I hope I made my point(s)/questions pretty clear, if not (or you need more information) feel free to ask.

 

Thanks for your time!

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

3: The client position is at the player's feet from what I've seen, I added 1.6 to the y position to account for this when I spawned particles, personally.

4: Sounds like you haven't specified this.noClip = false in your EntityFX derived class's constructor, or particlevar.noclip = false after making the instance.

Posted

Thanks for your reply!

 

about point 4, I actualy did set "this.noClip" to false. so what else could it be?

 

about point 3, either I miss your point, or I didn't describe it clearly enough.

in point 3 I tried to describe that even if I set the movement to 0, that there is still movement wich is linked to the player's movement.

the second thing I tried to explain is, that particles do have an offset when they are spawned in (not at the player, but at a block). its on offset of 0.01 or lower I think. but still pretty annoying if you want it to be in an exact location you tell him to spawn at.

The first thing is possible to fix (if I look at the vanilla particles), the second one, I'm not sure.

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

Hm yeah I thought you were talking about the server/client positioning mismatch.  Might be an precision error with floats/doubles if it's that small?  I kind of doubt it though, otherwise I'm not sure what's causing the offset.  As for the first part of 3, it sounds like you somehow got the particles' motionX/Y/Z entangled with the player's position, that's odd.  Posting code will probably be necessary for further troubleshooting. (always best to post code anyway, there's only so much we can do without it)

 

 

As for 4, you could try making a new AABB, setting it up with the particle's positioning and whatever dimensions you want, and returning it in setBoundingBox().  What class are you extending that has setBoundingBox() though?

Posted

yea, its propably better to post the codes. right now everything works except the FlashFX. it doesn't show somehow. I spawn these particles with above an TileEntity. so it shouldn't have any motion nor offset.

 

EffectWelling, this is the Entity I spawn in with "EffectRenderer.addEffect()". this will spawn in the other 3.

package mechanical_crafting_table.client.particles;

import mechanical_crafting_table.client.particles.entityfx.EntityWellFlashFX;
import mechanical_crafting_table.client.particles.entityfx.EntityWellGlowFX;
import mechanical_crafting_table.client.particles.entityfx.EntityWellSparkFX;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class EffectWelling extends EntityFX
{

private boolean canSpawn = true;
private int WellAge;
private int count;

public EffectWelling(World world, double x,	double y, double z, double mX,double mY, double mZ)
{
	super(world, x, y, z, 0.0D, 0.0D, 0.0D);
	this.motionX = mX;
        this.motionY = mY;
        this.motionZ = mZ;
        this.particleMaxAge = 1;
}

    public void renderParticle(Tessellator tess, float x, float y, float z, float mX, float mY, float mZ) {}
    
    public void onUpdate()
    {
    	if(this.particleAge < this.particleMaxAge && count == 0)
    	{
    		this.createBurst();
    		count++;
    	}
    	++this.WellAge;

        if (this.WellAge > this.particleMaxAge)
        {
            this.setDead();
            count = 0;
        }
    }
    
    private void createBurst()
    {
    	 double d0 = this.rand.nextGaussian() * 0.05D;
         double d1 = this.rand.nextGaussian() * 0.05D;

         this.createParticle(this.posX + 0.095D, this.posY - 0.095D, this.posZ, 0.0D, 0.0D, 0.0D, 3);
         
         for (int i = 0; i < 2; ++i)
         {
             double d2 = this.rand.nextGaussian() * 0.15D + d0;
             double d3 = this.rand.nextGaussian() * 0.15D + d1;
             double d4 = this.rand.nextDouble() * 0.5D;
             this.createParticle(this.posX, this.posY, this.posZ, d2, d4, d3, 1);
         }
         
         this.createParticle(this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, 2);
    }
    
    private void createParticle(double x, double y, double z, double mX, double mY, double mZ, int id)
    {
    	switch(id){
    	case 1:
	EntityWellSparkFX WellingSpark = new EntityWellSparkFX(this.worldObj, x, y, z, mX, mY, mZ);
	Minecraft.getMinecraft().effectRenderer.addEffect(WellingSpark);
    	        break;

    	case 2:
    		EntityWellGlowFX WellingGlow = new EntityWellGlowFX(this.worldObj, x, y, z);
    		WellingGlow.setRBGColorF((float)244/255, (float)255/255, (float)130/255);
    		WellingGlow.setFadeColour((float)160/255, (float)33/255, (float)46/255);
    		Minecraft.getMinecraft().effectRenderer.addEffect(WellingGlow);
    	        break;

    	case 3:
    		EntityWellFlashFX WellingFlash = new EntityWellFlashFX(this.worldObj, x, y, z);
    		Minecraft.getMinecraft().effectRenderer.addEffect(WellingFlash);
                break;
    	}	
    }
}

 

EntityWellingSparkFX.

package mechanical_crafting_table.client.particles.entityfx;

import static org.lwjgl.opengl.GL11.*;
import mechanical_crafting_table.Main;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class EntityWellSparkFX extends EntityFX
{
private static final ResourceLocation WellingFXTexture = new ResourceLocation(Main.MODID, "textures/particles/WellingSpark.png");

public EntityWellSparkFX(World world, double x, double y, double z, double mX, double mY, double mZ)
{
	super(world, x, y, z, mX, mY, mZ);
	this.motionX = mX;
	this.motionY = mY;
	this.motionZ = mZ;
	this.particleScale *= 0.4F;
	this.particleAlpha = 1.0F;
	this.particleMaxAge = 5 + this.rand.nextInt(5);
	this.particleGravity = 1F;
	this.noClip = false;
}

 public void renderParticle(Tessellator tess, float particleTicks, float x, float y, float z, float u, float v)
 {
	if(this.particleAge < this.particleMaxAge)
	{
		Minecraft.getMinecraft().renderEngine.bindTexture(WellingFXTexture);
		glDepthMask(false);
		glEnable(GL_BLEND);
		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

		glAlphaFunc(GL_GREATER, 0.003921569F);
		tess.startDrawingQuads();
		tess.setBrightness(getBrightnessForRender(particleTicks));
		glAlphaFunc(GL_GREATER, 0.6F - ((float)this.particleAge + particleTicks - 1.0F) * 0.25F * 0.5F);
		float f10 = 0.1F * this.particleScale;
		float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)particleTicks - interpPosX);
        float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)particleTicks - interpPosY);
        float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)particleTicks - interpPosZ);
        
        tess.addVertexWithUV((double)(f11 - x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 - z * f10 - v * f10), 0, 0);//WithUV((double)(f11 - x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 - z * f10 - v * f10), 0, 0);// (double)f7, (double)f9);
        tess.addVertexWithUV((double)(f11 - x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 - z * f10 + v * f10), 0, 1);//WithUV((double)(f11 - x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 - z * f10 + v * f10), 1, 0);// (double)f7, (double)f8);
        tess.addVertexWithUV((double)(f11 + x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 + z * f10 + v * f10), 1, 1);//WithUV((double)(f11 + x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 + z * f10 + v * f10), 1, 1);// (double)f6, (double)f8);
        tess.addVertexWithUV((double)(f11 + x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 + z * f10 - v * f10), 1, 0);//WithUV((double)(f11 + x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 + z * f10 - v * f10), 0, 1);// (double)f6, (double)f9);
        tess.draw();
        
		glDisable(GL_BLEND);
		glDepthMask(true);
		glAlphaFunc(GL_GREATER, 0.1F);
	}
}

public void onUpdate()
{
	this.prevPosX = this.posX;
	this.prevPosY = this.posY;
	this.prevPosZ = this.posZ;

	if (this.particleAge++ >= this.particleMaxAge)
	{
		this.setDead();
	}

	if (this.particleAge > this.particleMaxAge / 2)
	{
		this.setAlphaF(1.0F - ((float) this.particleAge - (float) (this.particleMaxAge / 2)) / (float) this.particleMaxAge);
	}

	this.motionY -= 0.004D * (double)this.particleGravity;;
	this.moveEntity(this.motionX, this.motionY, this.motionZ);
	this.motionX *= 0.2D;//0.9100000262260437D;
	this.motionY *= 0.05D;//0.9100000262260437D;
	this.motionZ *= 0.2D;//0.9100000262260437D;
	this.setRBGColorF(this.particleRed, this.particleBlue, this.particleGreen);

	if (this.onGround) {
		this.motionX *= 0.699999988079071D;
		this.motionZ *= 0.699999988079071D;
	}

	if (this.particleAge < this.particleMaxAge / 2 && (this.particleAge + this.particleMaxAge) % 2 == 0)
	{
		EntityWellSparkFX EntityWell = new EntityWellSparkFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
		EntityWell.particleAge = EntityWell.particleMaxAge / 2;
		Minecraft.getMinecraft().effectRenderer.addEffect(EntityWell);
	}
}

public int getBrightnessForRender(float brightnessFR)
{
	return 15728880;
}

public float getBrightness(float brightness)
{
	return 1.0F;
}

    public boolean canBePushed()
    {
        return true;
    }
    
    public int getFXLayer()
    {
        return 3;
    }
}

 

EntityWellingGlowFX.

package mechanical_crafting_table.client.particles.entityfx;

import static org.lwjgl.opengl.GL11.*;
import mechanical_crafting_table.Main;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class EntityWellGlowFX extends EntityFX
{
private static final ResourceLocation GlowingFXTexture = new ResourceLocation(Main.MODID, "textures/particles/WellingGlow.png");
private float fadeColourR;
private float fadeColourG;
private float fadeColourB;
private boolean hasFade;

public EntityWellGlowFX(World world, double x, double y, double z)
{
	super(world, x, y, z, 0, 0, 0);
	this.particleScale *= 0.75F;
	this.particleMaxAge = 72;// + this.rand.nextInt(12);
	this.noClip = false;
	this.particleGravity = 0F;
	this.particleAlpha = 1.0F;
	this.motionX = this.motionX * 0.00;
	this.motionY = this.motionY * 0.00;
	this.motionZ = this.motionZ * 0.00;
}

public void renderParticle(Tessellator tess, float particleTicks, float x, float y, float z, float u, float v)
{
	if (this.particleAge < this.particleMaxAge)
	{
		Minecraft.getMinecraft().renderEngine.bindTexture(GlowingFXTexture);
		glDepthMask(false);
		glEnable(GL_BLEND);
		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
		tess.startDrawingQuads();

		tess.setBrightness(getBrightnessForRender(particleTicks));
		float f10 = 0.1F * this.particleScale;
		float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)particleTicks - interpPosX);
        float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)particleTicks - interpPosY);
        float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)particleTicks - interpPosZ);
        
		float CR = this.particleRed;
		float CG = this.particleGreen;
		float CB = this.particleBlue;
        
        tess.setColorRGBA_F(CR, CG, CB, this.particleAlpha);
		tess.addVertexWithUV((double)(f11 - x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 - z * f10 - v * f10), 0, 0);//WithUV((double)(f11 - x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 - z * f10 - v * f10), 0, 0);// (double)f7, (double)f9);
        tess.addVertexWithUV((double)(f11 - x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 - z * f10 + v * f10), 0, 1);//WithUV((double)(f11 - x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 - z * f10 + v * f10), 1, 0);// (double)f7, (double)f8);
        tess.addVertexWithUV((double)(f11 + x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 + z * f10 + v * f10), 1, 1);//WithUV((double)(f11 + x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 + z * f10 + v * f10), 1, 1);// (double)f6, (double)f8);
        tess.addVertexWithUV((double)(f11 + x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 + z * f10 - v * f10), 1, 0);//WithUV((double)(f11 + x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 + z * f10 - v * f10), 0, 1);// (double)f6, (double)f9);
        tess.draw();

		glDisable(GL_BLEND);
		glDepthMask(true);
		glAlphaFunc(GL_GREATER, 0.1F);
	}
}

public void setFadeColour(float CR, float CG, float CB)
{
	this.fadeColourR = CR;
	this.fadeColourG = CG;
	this.fadeColourB = CB;
	this.hasFade = true;
}

public void onUpdate()
{
	this.prevPosX = this.posX;
	this.prevPosY = this.posY;
	this.prevPosZ = this.posZ;

	if (this.particleAge++ > this.particleMaxAge)
	{
		this.setDead();
	}

	if(this.particleAge > (this.particleMaxAge / 4)*3)
	{
		this.setAlphaF(this.particleAlpha / 2);
	}
	else
	{
		this.setAlphaF(1.0F);
	}

	if (this.hasFade && this.particleAge > this.particleMaxAge / 2)
	{
		this.particleRed -= ((this.particleRed - this.fadeColourR) / this.particleMaxAge) * this.particleAge;
		this.particleGreen -= ((this.particleGreen - this.fadeColourG) / this.particleMaxAge) * this.particleAge;
		this.particleBlue -= ((this.particleBlue - this.fadeColourB) / this.particleMaxAge) * this.particleAge;
	}

	this.moveEntity(this.motionX, this.motionY, this.motionZ);
	this.motionX *= 0.0;
	this.motionY *= 0.0;
	this.motionZ *= 0.0;
}

public int getBrightnessForRender(float brightnessFR)
{
	return 15728880;
}

public float getBrightness(float brightness)
{
	return 0.654F;
}

public int getFXLayer()
{
	return 3;
}
}

 

EntityWellingFlashFX. Right now this is not visible, eventhough it gets spawned in.(I debugged it)

package mechanical_crafting_table.client.particles.entityfx;

import static org.lwjgl.opengl.GL11.*;
import mechanical_crafting_table.Main;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class EntityWellFlashFX extends EntityFX
{
private static final ResourceLocation WellingFXTexture = new ResourceLocation(Main.MODID, "textures/particles/WellingFlash.png");

public EntityWellFlashFX(World world, double x, double y, double z)
{
	super(world, x, y, z);
	this.particleScale = 8.0F;
	this.particleMaxAge = 2;
	this.particleGravity = 1F;
	this.particleAlpha = 0.4F;
	this.noClip = false;
}

@Override
 public void renderParticle(Tessellator tess, float particleTicks, float x, float y, float z, float u, float v)
 {
	if(this.particleAge < this.particleMaxAge)
	{
		Minecraft.getMinecraft().renderEngine.bindTexture(WellingFXTexture);
		glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
		glDepthMask(false);
		glEnable(GL_BLEND);
		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
		glAlphaFunc(GL_GREATER, 0.003921569F);

		tess.startDrawingQuads();
		tess.setBrightness(this.getBrightnessForRender(particleTicks));
		float f10 = 0.1F * this.particleScale;
		float f11 = (float) this.posX;
        float f12 = (float) this.posY;
        float f13 = (float) this.posZ;
        
        tess.addVertexWithUV((double)(f11 - x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 - z * f10 - v * f10), 0, 0);
        tess.addVertexWithUV((double)(f11 - x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 - z * f10 + v * f10), 0, 1);
        tess.addVertexWithUV((double)(f11 + x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 + z * f10 + v * f10), 1, 1);
        tess.addVertexWithUV((double)(f11 + x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 + z * f10 - v * f10), 1, 0);
        tess.draw();
        
		glDisable(GL_BLEND);
		glDepthMask(true);
		glAlphaFunc(GL_GREATER, 1.0F);
	}
}

public void onUpdate()
{
	this.prevPosX = this.posX;
	this.prevPosY = this.posY;
	this.prevPosZ = this.posZ;

	if (this.particleAge++ >= this.particleMaxAge)
	{
		this.setDead();
	}

	if (this.particleAge > this.particleMaxAge / 5)
	{
		this.setAlphaF(this.particleAlpha / 2);
	}

	this.moveEntity(this.motionX, this.motionY, this.motionZ);
	this.motionX *= 0.0D;
	this.motionY *= 0.0D;
	this.motionZ *= 0.0D;
}

public int getBrightnessForRender(float brightnessFR)
{
	return 15728880;
}

public float getBrightness(float brightness)
{
	return 1.0F;
}
    
    public int getFXLayer()
    {
        return 3;
    }
}

 

About point 4, I tried to set the boundingbox earlier, but doesnt seem to work somehow. Anyway, I looked at the XPOrb, cause they get picked up when they collide with the player. And it seems that MC. is using an actual Entity. so I might have to create one for this purpose.(but it will get pretty laggy if I spawn a bunch of them in. (wich Im planning on doing)

 

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

Well, I went in and tinkered with the flash FX, the reason it's not showing up is because of the addVertexWithUV calls, I don't care to go through the math too much but I suspect it's because all the verticies are being created in the exact same coordinates since you set f11-13 to the posX/Y/Z instead of the calculations the vanilla code uses:

 

float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * particleTicks - interpPosX);
float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * particleTicks - interpPosY);
float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * particleTicks - interpPosZ);

 

Replacing them with the vanilla calculations makes it show up fine.

Posted

Yes, copy-pasting the codes brought it back. but there is one thing I'm concerned about. The part

"(this.posX - this.prevPosX)" (and same for Y and Z) should return 0 since there is no motion.

But when I leave that part out, the particle is gone!

 

So it might explain the texture offset(maybe?), but right now I'm clueless of where the motion is comming from (or at least the difference between 'this' and 'prev' position).

The only thing I can think of right now is that the paritcles (because they are all rendered in FXLayer 3) might share some values? just like the colour and Aplha?

 

this is realy confusing.  :-\

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

This is why I was saying I don't care to go through the math, I don't know what interpPosX is, but it's likely not the same as posX/prevPosX.  It works, no point in arguing about it. :P

Posted

The alpha, you're not using the same alpha or blend func combinations as me, so try:

 

GL11.glAlphaFunc(GL11.GL_GREATER, 0.0F);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);

 

You're also specifying GL11.glColor4F's alpha as 1.0, that may also be it.  You also don't disable GL11.GL_LIGHTING for the particle render, but I doubt that would cause this.

 

As for the particle moving with the player, do you think setting canBePushed to true is causing it to collide with the player and move with them?  Otherwise, I'm not sure about that.

Posted

Hey, I swapped the codes out and it works kinda better?

I can change the alpha to a verry low number, while it just wouldn't show up when I did that with my code. But sadly, no matter what value I set the alpha to, it doesn't seem to affect the texture verry much.

so am I doing something wrong here?

 

secondly, the particle movement problem is unfortunatly still not solved.

 

btw, sorry that I wasn't answering. I had to do some stuff this weekend.

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

Well, is your texture grayscale?  AFAIK, particle textures have to be an oldschool alpha map, black being transparent and white being completely opaque, and then you color them in the code.  I may be wrong about that, though, someone else can comment on that.  I also haven't figured out how to make black particles yet, which is either me not understanding fully how the particle textures and GL code work together, or having to find a needle-in-a-haystack combination of blendfuncs and alphafuncs to invert the color its looking for to subtract as alpha and leave a full black particle.  For some reason the opacity and color are inextricably linked, too?  When I try to color my particles a darker shade of a color, it just decreases the opacity.  I need to learn OGL and rewrite the vanilla code, it seems really...bad. :/

Posted

Wel I figured out that when you set your brightness at 0. Your particles will be pitch black!

And my particles are not greyscaled. I made them with paint.net, just a basic editor. If you look at the colour tab, there are 7 different scales. I only use 4 (3 colours and alpha) but what you want to do is set one of the other 3 scales? Im pretty sure you'll be able to do that with gl11..

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

Well, is your texture grayscale?  AFAIK, particle textures have to be an oldschool alpha map, black being transparent and white being completely opaque, and then you color them in the code.  I may be wrong about that, though, someone else can comment on that.  I also haven't figured out how to make black particles yet

 

Multiply their grayscale texture by the color black?  0 times anything is 0.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Are yo using an EntityFX layer below 3? Cause they have an renderer already wich might cause this Problem.

 

Anyway, does anybody knows where the particle movements come from?(the movments wich are linked with the players movement)

 

And Does anybody know where the undifined offset is comming from?

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

lol, didn't see your link, anyway try to ad this:

public int getBrightnessForRender(float brightnessFR)
{
	return 0; //or another low number
}

I'm sure your particle will be black  :P, Ik it's not clean but it works!

 

Anyway, we are getting a bit off topic here.

There are still 2 problems I realy don't know how to solve. Is there anyone who have an idea?

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Mit dem Temu Gutscheincode (ALB496107) sichern Sie sich maximale Vorteile, speziell für unsere Nutzer in Deutschland. Wir haben diesen Code exklusiv für Sie aufbereitet, um sicherzustellen, dass Sie bei Ihren Temu-Einkäufen das Beste herausholen können. Bereiten Sie sich darauf vor, Ihre Wunschartikel zu unglaublich niedrigen Preisen zu erhalten. Egal, ob Sie ein neuer Temu-Kunde sind oder bereits fleißig auf der Plattform einkaufen, wir haben für jeden etwas dabei. Dieser Artikel beleuchtet, wie der Temu coupon code 2025 for existing customers und der Temu 90% discount coupon Ihnen dabei helfen können, Ihre Ersparnisse zu maximieren. Wir möchten sicherstellen, dass Sie keine der fantastischen Möglichkeiten verpassen, die Temu zu bieten hat. Was ist der Temu Gutscheincode 90% Rabatt? (What Is The Temu Coupon Code 90% off?) Unter dieser Überschrift möchten wir Ihnen erklären, wie sowohl Neu- als auch Bestandskunden von unseren fantastischen 90%-Rabatt-Gutscheincodes auf der Temu-App und -Website profitieren können. Wir haben uns bemüht, die besten Angebote für Sie zu finden, und der Temu coupon 90% off ist definitiv einer unserer Top-Funde. Mit diesem Code können Sie sich einen beeindruckenden 90% discount Temu coupon sichern, der Ihre Einkaufspreise drastisch senkt. (ALB496107): Sichern Sie sich einen pauschalen 90% Rabatt für neue Nutzer, um Ihren ersten Einkauf bei Temu unvergesslich günstig zu gestalten. (ALB496107): Auch für bestehende Nutzer gibt es einen satten 90% Rabatt, damit Sie auch weiterhin von den besten Preisen profitieren können. (ALB496107): Erhalten Sie ein 100€-Gutscheinpaket für mehrfache Nutzungen, das Ihnen immer wieder neue Sparmöglichkeiten bietet. (ALB496107): Profitieren Sie von einem pauschalen 100€-Rabatt für Neukunden, der Ihren Einkauf noch attraktiver macht. (ALB496107): Ein zusätzlicher 100€-Rabatt-Promocode für bestehende Kunden sorgt dafür, dass Ihre Treue belohnt wird, und sichern Sie sich einen 100€-Gutschein für neue Nutzer in Deutschland. Temu Gutscheincode 90% Rabatt für neue Nutzer (Temu Coupon Code 90% Off For New Users) Als neuer Nutzer bei Temu können Sie die höchsten Vorteile erzielen, wenn Sie unseren exklusiven Gutscheincode in der Temu-App verwenden. Wir wissen, wie aufregend es ist, eine neue Plattform zu entdecken, und wir möchten sicherstellen, dass Ihr Start bei Temu so vorteilhaft wie möglich ist. Mit dem Temu coupon 90% off eröffnen sich Ihnen unglaubliche Sparmöglichkeiten, während der Temu coupon code 40 off for existing users Ihnen zeigt, dass wir auch an unsere treuen Kunden denken. (ALB496107): Ein pauschaler 90% Rabatt für neue Nutzer, der Ihren ersten Einkauf zu einem echten Schnäppchen macht. (ALB496107): Ein 100€-Gutscheinbündel für neue Kunden, um Ihnen noch mehr Möglichkeiten zum Sparen zu bieten. (ALB496107): Bis zu 100€-Gutscheinbündel für mehrfache Nutzungen, damit Sie auch bei zukünftigen Einkäufen profitieren. (ALB496107): Kostenloser Versand nach Deutschland, damit Sie sich keine Gedanken über zusätzliche Kosten machen müssen. (ALB496107): Zusätzliche 30% Rabatt auf jeden Einkauf für Erstnutzer, was Ihre Ersparnisse noch weiter steigert. So lösen Sie den Temu 90% Rabatt-Gutscheincode für neue Kunden ein (How To Redeem The Temu 90% Off Coupon Code For New Customers?) Um den Temu 90% off Gutschein einzulösen und von den unglaublichen Ersparnissen zu profitieren, folgen Sie einfach unserer Schritt-für-Schritt-Anleitung. Es ist ganz einfach, und wir möchten sicherstellen, dass Sie keine Probleme haben, Ihren Rabatt zu erhalten. Der Temu 40 off coupon code ist ebenfalls eine großartige Option, aber mit unserem 90%-Code sichern Sie sich die maximalen Vorteile. Temu App herunterladen/Website besuchen: Laden Sie die Temu-App aus Ihrem App Store herunter oder besuchen Sie die Temu-Website über Ihren Browser. Konto erstellen/Anmelden: Erstellen Sie ein neues Konto, wenn Sie noch keines haben. Der Prozess ist schnell und unkompliziert. Produkte in den Warenkorb legen: Stöbern Sie durch die riesige Auswahl an Produkten und legen Sie Ihre Wunschartikel in den Warenkorb. Zum Warenkorb gehen: Klicken Sie auf das Warenkorb-Symbol, um eine Übersicht Ihrer ausgewählten Artikel zu erhalten. Gutscheincode eingeben: Suchen Sie das Feld für Gutscheincodes oder Promocodes. Geben Sie dort den Code ALB496107 ein. Rabatt anwenden: Klicken Sie auf „Anwenden“ oder „Einlösen“, um den Rabatt auf Ihren Einkauf anzuwenden. Sie sollten sehen, wie sich der Gesamtbetrag reduziert. Bestellung abschließen: Gehen Sie zur Kasse und schließen Sie Ihre Bestellung ab. Genießen Sie Ihre Ersparnisse! Temu Gutscheincode 90% Rabatt für bestehende Nutzer (Temu Coupon Code 90% Off For Existing Users) Auch bestehende Nutzer können von den großartigen Vorteilen profitieren, wenn sie unseren Gutscheincode in der Temu-App verwenden. Wir schätzen Ihre Treue und möchten sicherstellen, dass Sie weiterhin die besten Angebote erhalten. Der Temu 40 off coupon code ist zwar gut, aber unser Code geht noch einen Schritt weiter, um Ihnen maximale Ersparnisse zu bieten. Der Temu coupon code for existing customers ist speziell darauf ausgelegt, Ihnen als treuem Kunden die besten Rabatte zu sichern. (ALB496107): Sichern Sie sich einen zusätzlichen 90% Rabatt für bestehende Temu-Nutzer, um Ihre Einkaufspreise noch weiter zu senken. (ALB496107): Ein 100€-Gutscheinbündel für mehrere Einkäufe, das Ihnen immer wieder neue Sparmöglichkeiten bietet. (ALB496107): Ein kostenloses Geschenk mit Expressversand in ganz Deutschland, als Dankeschön für Ihre Treue. (ALB496107): Zusätzliche 30% Rabatt zusätzlich zum bestehenden Rabatt, um Ihre Ersparnisse zu maximieren. (ALB496107): Kostenloser Versand nach Deutschland, damit Sie sich keine Gedanken über Lieferkosten machen müssen. So verwenden Sie den Temu Gutscheincode 90% Rabatt für bestehende Kunden (How To Use The Temu Coupon Code 90% Off For Existing Customers?) Die Verwendung des Temu coupon code 40 off für bestehende Kunden ist genauso einfach wie für neue Nutzer. Wir möchten, dass Sie problemlos von den Vorteilen profitieren können. Der Temu discount code for existing users ist Ihr Schlüssel zu weiteren unschlagbaren Angeboten. Bei Temu anmelden: Loggen Sie sich in Ihr bestehendes Temu-Konto ein, entweder über die App oder die Website. Produkte auswählen: Stöbern Sie durch die neuesten Angebote und legen Sie die Artikel, die Sie kaufen möchten, in Ihren Warenkorb. Zum Warenkorb gehen: Überprüfen Sie Ihre Auswahl im Warenkorb. Gutscheincode eingeben: Suchen Sie das Feld für Gutscheincodes oder Promocodes. Geben Sie den Code ALB496107 ein. Rabatt anwenden: Bestätigen Sie die Eingabe, um den Rabatt auf Ihren Einkauf anzuwenden. Bestellung abschließen: Fahren Sie mit dem Bestellvorgang fort und genießen Sie die zusätzlichen Ersparnisse. So finden Sie den Temu Gutscheincode 90% Rabatt (How To Find The Temu Coupon Code 90% Off?) Sie fragen sich, wie Sie den Temu coupon code 90% off first order finden können? Wir verraten Ihnen die besten Wege, um an verifizierte und getestete Coupons zu gelangen. Es ist einfacher, als Sie denken, und wir sind hier, um Ihnen zu helfen, die besten Deals zu finden. Auch die latest Temu coupons 40 off sind leicht zu entdecken, wenn Sie wissen, wo Sie suchen müssen. Eine der besten Methoden, um stets über die neuesten und funktionierenden Temu-Gutscheincodes informiert zu sein, ist die Anmeldung für den Temu-Newsletter. Oft erhalten Abonnenten exklusive Angebote und Codes direkt in ihr Postfach. Besuchen Sie außerdem die Social-Media-Seiten von Temu. Viele Unternehmen veröffentlichen ihre neuesten Coupons und Promos zuerst auf Plattformen wie Facebook, Instagram oder Twitter. Wir empfehlen Ihnen auch, regelmäßig unsere Website zu besuchen, da wir stets die neuesten und besten Temu-Gutscheincodes für Sie aktualisieren. Vertrauenswürdige Coupon-Seiten wie unsere sind eine hervorragende Quelle, um sicherzustellen, dass Sie immer die aktuellsten und funktionierenden Rabattcodes erhalten. Wie funktionieren Temu 90% Rabatt-Coupons? (How Temu 90% Off coupons work?) Temu 90% Rabatt-Coupons, wie der Temu coupon code 90% off first time user oder der Temu coupon code 40 percent off, funktionieren, indem sie Ihnen einen erheblichen Preisnachlass auf Ihre Einkäufe gewähren. Im Grunde genommen, wenn Sie einen solchen Coupon während des Bezahlvorgangs anwenden, wird der angegebene Prozentsatz (in diesem Fall 90%) vom Gesamtpreis Ihrer Bestellung abgezogen. Dies kann entweder ein pauschaler Rabatt auf den gesamten Warenkorb sein, oder es kann sich auf bestimmte Artikel oder Kategorien beziehen, je nach den spezifischen Bedingungen des Coupons. Die Funktionsweise ist simpel: Sie geben den Code ein, das System überprüft seine Gültigkeit, und falls er gültig ist, wird der Rabatt sofort angewendet, bevor Sie die Zahlung abschließen. Dies ermöglicht Ihnen, Produkte zu einem Bruchteil des ursprünglichen Preises zu erwerben, was besonders bei größeren Einkäufen oder teureren Artikeln zu erheblichen Ersparnissen führt. Wie verdiene ich 90% Rabatt-Coupons bei Temu als Neukunde? (How To Earn 90% Off Coupons In Temu As A New Customer?) Als Neukunde bei Temu können Sie 90% Rabatt-Coupons verdienen, indem Sie bestimmte Aktionen auf der Plattform durchführen. Der Temu coupon code 90% off ist oft ein Willkommensgeschenk, um neue Nutzer anzulocken und ihnen einen Anreiz zum ersten Kauf zu geben. Der Temu 40 off coupon code first order ist ebenfalls eine häufige Willkommensaktion. Der direkteste Weg ist oft die Anmeldung über einen speziellen Empfehlungslink oder die erstmalige Registrierung in der Temu-App. Temu bietet häufig exklusive Willkommenspakete für Neukunden an, die Gutscheine mit hohem Rabattprozentsatz, manchmal sogar bis zu 90%, enthalten können. Achten Sie auf Pop-ups in der App, E-Mails nach der Registrierung oder spezielle Promotionsbanner auf der Startseite. Manchmal können Sie auch einen hohen Rabatt erhalten, indem Sie eine bestimmte Anzahl von Freunden einladen oder an bestimmten Einführungsveranstaltungen teilnehmen. Was sind die Vorteile der Nutzung von Temu 90% Rabatt-Coupons? (What Are The Advantages Of Using Temu 90% Off Coupons?) Die Nutzung von Temu 90% Rabatt-Coupons, wie dem Temu 90% off coupon code legit oder dem coupon code for Temu 40 off, bietet eine Fülle von Vorteilen, die Ihr Einkaufserlebnis erheblich verbessern können. Wir sind überzeugt, dass diese Coupons eine fantastische Möglichkeit sind, qualitativ hochwertige Produkte zu unschlagbaren Preisen zu erhalten. 90% Rabatt auf die erste Bestellung: Ein unglaublicher Start in Ihr Temu-Einkaufserlebnis, der Ihnen sofortige und erhebliche Ersparnisse beschert. 100€-Gutscheinbündel für mehrere Nutzungen: Profitieren Sie nicht nur einmal, sondern immer wieder von zusätzlichen Rabatten auf zukünftige Einkäufe. 90% Rabatt auf beliebte Artikel: Sichern Sie sich Ihre Lieblingsprodukte zu einem Bruchteil des Preises. Zusätzliche 30% Rabatt für bestehende Temu-Kunden: Eine Belohnung für Ihre Treue, die Ihre Ersparnisse weiter maximiert. Bis zu 90% Rabatt auf ausgewählte Artikel: Entdecken Sie spezielle Angebote und sichern Sie sich Top-Produkte zu Tiefpreisen. Kostenloses Geschenk für neue Nutzer: Ein kleines Dankeschön von Temu, das Ihren ersten Einkauf noch schöner macht. Kostenlose Lieferung nach Deutschland: Sorgenfreies Einkaufen ohne zusätzliche Versandkosten. Temu kostenloses Geschenk und Sonderrabatt für neue und bestehende Nutzer (Temu Free Gift And Special Discount For New And Existing Users) Es gibt zahlreiche Vorteile, unseren Temu-Gutscheincode zu verwenden, nicht nur für neue, sondern auch für bestehende Nutzer. Mit dem Temu 90% off coupon code und dem 90% off Temu coupon code möchten wir sicherstellen, dass jeder die Möglichkeit hat, bei Temu zu sparen und gleichzeitig von exklusiven Boni zu profitieren. (ALB496107): 90% Rabatt auf die erste Bestellung, um Ihnen den Einstieg bei Temu so attraktiv wie möglich zu machen. (ALB496107): 90% Rabatt für bestehende Kunden, als Zeichen unserer Wertschätzung für Ihre Treue. (ALB496107): Zusätzliche 30% Rabatt auf jeden Artikel, um Ihre Ersparnisse bei jedem Einkauf zu steigern. (ALB496107): Kostenloses Geschenk für neue Temu-Nutzer, um Ihren ersten Kauf noch spezieller zu gestalten. (ALB496107): Bis zu 90% Rabatt auf jeden Artikel in der Temu-App, damit Sie Ihre Wunschprodukte zu unschlagbaren Preisen erhalten können, sowie ein kostenloses Geschenk mit kostenlosem Versand in Deutschland. Vor- und Nachteile der Verwendung des Temu Gutscheincodes 90% Rabatt (Pros And Cons Of Using Temu Coupon Code 90% Off) Die Nutzung des Temu coupon 90% off code und des Temu free coupon code 40 off bietet viele Vorteile, aber wie bei jedem Angebot gibt es auch einige Punkte zu beachten. Wir möchten Ihnen eine ausgewogene Perspektive bieten, damit Sie eine fundierte Entscheidung treffen können. Vorteile (Pros): Erhebliche Ersparnisse: Der offensichtlichste Vorteil ist der enorme Rabatt von 90%, der Ihre Einkaufskosten drastisch senkt. Zugang zu Premium-Produkten: Ermöglicht den Kauf von Artikeln, die Sie sich sonst vielleicht nicht leisten könnten. Kostenloser Versand: Oft in Verbindung mit dem Code, was zusätzliche Kosten eliminiert. Für Neu- und Bestandskunden: Viele Vorteile sind nicht nur auf Neukunden beschränkt, sondern auch für treue Nutzer verfügbar. Attraktive Willkommensangebote: Besonders für Erstbesteller gibt es oft zusätzliche Boni und Geschenke. Nachteile (Cons): Begrenzte Verfügbarkeit: Solche hohen Rabatte sind oft zeitlich oder mengenmäßig begrenzt. Spezifische Bedingungen: Es können Mindestbestellwerte oder bestimmte Produktkategorien ausgeschlossen sein. Eingeschränkte Nutzung: Manchmal ist der Code nur einmal pro Kunde oder Haushalt verwendbar. Allgemeine Geschäftsbedingungen des Temu 90% Rabatt-Gutscheincodes im Jahr 2025 (Terms And Conditions Of The Temu 90% Off Coupon Code In 2025) Bevor Sie den Temu coupon code 90% off free shipping oder den Temu coupon code 90% off reddit verwenden, ist es wichtig, die Allgemeinen Geschäftsbedingungen zu verstehen. Wir möchten Ihnen volle Transparenz bieten, damit Sie wissen, worauf Sie sich einlassen. Kein Ablaufdatum: Unsere Gutscheincodes haben kein Verfallsdatum, Sie können sie also jederzeit verwenden, wann immer es Ihnen passt. Gültig für Neu- und Bestandskunden: Die Codes sind sowohl für neue Nutzer als auch für bestehende Kunden in Deutschland gültig, sodass jeder profitieren kann. Keine Mindestbestellanforderungen: Es gibt keine Mindestkaufbeträge, die für die Verwendung unserer Temu-Gutscheincodes erforderlich sind. Nicht mit anderen Aktionen kombinierbar: Unsere Coupons sind in der Regel nicht mit anderen laufenden Aktionen oder Rabatten kombinierbar. Einmalige Nutzung: Der Code kann in der Regel einmal pro Nutzer und Bestellung angewendet werden. Gültigkeit für bestimmte Artikel: In einigen Fällen kann der Rabatt auf bestimmte Produktkategorien oder ausgewählte Artikel beschränkt sein. Überprüfen Sie immer die Details des jeweiligen Angebots. Schlussbemerkung (Final Note) Wir hoffen, dass dieser Artikel Ihnen einen umfassenden Überblick über den Temu coupon code 90% off gegeben hat und wie Sie ihn nutzen können, um Ihre Ersparnisse zu maximieren. Wir sind stets bemüht, Ihnen die besten Angebote zu präsentieren und Ihr Einkaufserlebnis so angenehm wie möglich zu gestalten. Verpassen Sie nicht die Gelegenheit, mit dem Temu 90% off coupon unglaubliche Schnäppchen zu machen. Wir sind zuversichtlich, dass Sie von den Vorteilen dieses Codes begeistert sein werden. FAQs zum Temu 90% Rabatt-Coupon (FAQs Of Temu 90% Off Coupon) Ist der Temu 90% Rabatt-Coupon echt? Ja, der 90% Rabatt-Coupon ist absolut echt und bietet Ihnen erhebliche Ersparnisse. Wir testen und verifizieren alle unsere Codes, um sicherzustellen, dass sie funktionieren und Ihnen den beworbenen Rabatt gewähren. Kann ich den 90% Rabatt-Coupon mehrmals verwenden? In den meisten Fällen ist der 90% Rabatt-Coupon für die einmalige Nutzung pro Kunde vorgesehen. Es gibt jedoch oft zusätzliche Gutscheinpakete für mehrfache Nutzungen, die Sie erhalten können. Gibt es Einschränkungen bei der Nutzung des Coupons? Ja, manchmal können Einschränkungen wie ein Mindestbestellwert oder die Gültigkeit für bestimmte Produktkategorien bestehen. Überprüfen Sie immer die spezifischen Bedingungen des jeweiligen Angebots. Wie lange ist der 90% Rabatt-Coupon gültig? Unsere spezifischen Gutscheincodes haben in der Regel kein Ablaufdatum. Es ist jedoch immer ratsam, die AGBs zu prüfen, da manche Aktionen zeitlich begrenzt sein können. Kann ich den 90% Rabatt-Coupon mit anderen Angeboten kombinieren? Normalerweise können 90% Rabatt-Coupons nicht mit anderen laufenden Aktionen oder Rabatten kombiniert werden. Es gilt immer nur ein Gutschein pro Bestellung.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.