#$500 Bounty - 1.20.1 Custom Models on Player Body

1 messages · Page 1 of 1 (latest)

amber wraith
#

what do you mean by render? You mean you want to add a model to the back of a player?

void geyser
amber wraith
#

don't you think $500 is too much for that sort of thing?

#

or do you want some professional lighting rendering done for an item?

void geyser
amber wraith
#

oh ok makes sense

void geyser
#

here is an example, the duck floatie is just a leather horse armour with custom model data but this was originally achieved with client side. it needs to be done now strictly server-side

amber wraith
#

oh it's stuck in the middle

#

and you want to flip it, and put it on the back?

void geyser
#

$500 Bounty - 1.20.1 Custom Models on Player Body

void geyser
#

that photo it is in the right spot, it needs to be attached to the players body without any delay in movement or lag

amber wraith
#

is the photo a clientside version? How do you get a model to show up in a serverside mod?

#

oh are you using a texturepack

#

you can use a tool to arrange it's position

void geyser
amber wraith
#

oh I bet you got it to work, but when you move, it jiggles around like it's in the player's hand

amber wraith
#

you can use a texturepack and a serverside mod, or even a plugin to do this

#

you just have to force a texturepack in the server.properties of your server

#

and it should work

void geyser
amber wraith
#

what if you use an armour stand, and a CustomModelData to assign it the rubberduck model, and use the serverside mod to keep it on the player's back

#

do you know what I mean

#

you need a texturepack though, which can be forced with a url

void geyser
amber wraith
#

I don't know how, but this server somehow made a plugin look like a mod

#

it's definitely possible

#

I don't know if I can help much though

void geyser
#

yeah hence why i need to find someone to make it possible

amber wraith
#

you have the duck as a model?

#

json file or something?

void geyser
amber wraith
#

you can make it equippable in the chestplate slot using your mod

void geyser
#

yeah the issue is it doesn't render though like it won't show anything

amber wraith
#

edit the model file using something like blockbench to position it how you want

amber wraith
#

or is it in the wrong position

void geyser
amber wraith
#

oh

#

and equipping it as a head item won't be good enough because it takes up the slot

#

I think it might be dissapearing because you didn't position it right

#

the resource pack model

night solar
#

You could just check how the spigot plugins do it, afaik it's just an invisible armorstand (riding?)/following the player

amber wraith
#

no they're too laggy or something he said

#

@void geyser I think you're not using armour stands correctly

#

make the armour stand ride the player, like you can make mobs ride each other

#

it should fix the lag issue

#

good luck

magic geyser
#

are the models created by attaching display entities? if so then you can use polymer virtual entities to attach display entities on player with EntityAttachment

#

can even use that for animated models if you wanted to, like using nylon library for example

#

oh and for the "lag issue": interpolation can be applied to display entities for smooth looking animations

#

normally it would updates 20 times a second (aka 20 fps) but with interpolation, it will looks like it's being animated at your game's frame rate

hard prairie
#

it’d probably still be difficult to sync that up to the position of specific modelparts tho

#

if not impossible

#

so i see the issue here

cedar stag
#

Nylon may help with this. Not easy, but theoretically possible.

winged aurora
void geyser
winged aurora
#

Can’t you just make something ride the player, and the model to that?

#

Seems pretty simple

#

Although rotation may be tricky

#

Hmmmm, I’ll have to experiment

void geyser
magic geyser
#

im not sure what's the current problem with rotations

winged aurora
#

Unless I’m mistaken

magic geyser
#

you can keep setting the yaw of the entity

winged aurora
#

Oh I guess so. Yeah you could probably get it pretty close. But I think there will always be a little lag between the body moving on the client and the server getting that and then sending the rotation packet back to the client. You could probably get it close with interpolation, but it would be tricky

magic geyser
#

i did thought of using vertex shader, but it couldn't be used for generating vertices for model because it is for transforming vertices only

winged aurora
#

Oh smart

magic geyser
#

if there is support for geometry shader in vanilla it would be really nice

winged aurora
#

Perhaps all the rotation could be handled via a shader?

#

Load the model in statically facing one direction and rotate it with the shader?

#

I don’t know nearly enough about shaders to know if that’s a real solution

magic geyser
#

how does one even do that 🤔

#

rn im modifying the armor cutout shader

winged aurora
#

I know it’s possible to rotate a mesh using just linear transforms, I watched a good video on it recently. But I’m not sure if that can be done in a shader

magic geyser
#

problem is: i couldn't find a way to get player's rotation when modifying the item model shader

winged aurora
#

Ah. That would be a problem

magic geyser
#

each component is completely separated from each other

winged aurora
#

Like the body parts?

magic geyser
#

i mean player and item

winged aurora
#

Ooo

#

Yeah I got nothing

magic geyser
#

overkill solution would be 1. make the vertex shader map vertices to a small square in screen space, and 2. emulate vertex + fragment shader in the fragment side (or use sdf magic idk tbh)

#

i have seen someone emulated the vertex + fragment shader pipeline with just fragment shader alone on shadertoy

magic geyser
#

ok so: with armor cutout shader, in theory you need a model for each part of the armor (legs, chest, hands, etc.)

#

and then we emulate the shader pipeline on fragment shader

#

the issue right now is: how do i make depth testing works as intended

#

for those that want to try implementing this: UV0 vertex attribute in armor_cutout_no_cull tell you the coordinates of the vertex on the armor texture so use that to identify which model part the game is trying to render, then use rasterizer like https://www.shadertoy.com/view/XdlGzn to generate model on fragment shader side

magic geyser
#

this one uses ray tracing so it's more or less the same as my intention to use rasterizer

winged aurora
#

I guess it’s been done haha

void geyser
magic geyser
#

i think it doesn't work with user's shaders because of vanilla-style lightning on the models

#

your best other option is to attach display entities on player

void geyser
magic geyser
#

huh wait does 1.20.1 have display entities 🤔