Jump to content

Recommended Posts

Posted

I have an entity which I want to render as a sphere. Just like this:

Poessoul.png

It is a little hard to tell but there is three spheres, The inner purple/blue, the middle dark purple/black and the outer red haze. How would I achieve this?

 

Posted

You will have to figure out how to draw that using regular OpenGL (maybe a tesselator) and then hook into

@SubscribeEvent(receiveCanceled=false)
public void onEvent(RenderGameOverlayEvent.Pre event) {

and call your draw method.

 

I would like to render it as 3D not a 2D Image. The image is an example of how I would like it to look.

Posted

I have figured it out thanks to one of Jabelar's tutorials, albeit a few issues.  One, the entity does not render correctly. It renders the color incorrectly, depending on the side/angle viewed. Two, when looking at the entity it causes the item/block that is in the players hand and items on the floor to turn blue/black. 

 

Client Proxy:

https://github.com/LogicTechCorp/SoulMagic/blob/master/src/main/java/soulmagic/proxy/ClientProxy.java

 

Render Class:

https://github.com/LogicTechCorp/SoulMagic/blob/master/src/main/java/soulmagic/client/render/entiy/SoulRenderFactory.java

 

ea35rE6.png

 

InA3aeT.png

Posted

I ha this exact same problem when i was trying to do something similiar. Mine was a fun project though so i gave up. The author of the tutorial probably is the one who can give you a solution, but wait for possible fixes from the more experienced programmers of this community. What i would like to tell you though is that you shouldn't be rendering 2 spheres (4 technically, outer sphere inside and outside and inner sphere inside and outside). Render just one sphere and apply a texture to it to make it look like there's another sphere inside it. This is just for better performance. If there are around 100 of these spheres in the same area some computers will struggle to keep up. Well i am not quite sure how minecraft renders objects but a sphere is a complex one. It's made up with a lot of vertexes.

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



×
×
  • Create New...

Important Information

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