Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16] 3D render in a Screen
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
Iterator

[1.16] 3D render in a Screen

By Iterator, November 16, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Iterator    0

Iterator

Iterator    0

  • Tree Puncher
  • Iterator
  • Members
  • 0
  • 6 posts
Posted November 16, 2020

Heyo! So I'm trying to code some kind of space planet UI and I need to make some sort of impression that player is orbiting a planet while selecting it.

What I need to do it is to render a planet texture and then rotate it 90 degrees on Z axis. Didn't find any examples in MC code close to that so that's why I'm asking here.

Any OpenGL professionals? Any help will be appreciated.

  • Quote

Share this post


Link to post
Share on other sites

Beethoven92    69

Beethoven92

Beethoven92    69

  • Dragon Slayer
  • Beethoven92
  • Members
  • 69
  • 556 posts
Posted November 16, 2020

Not an expert in rendering stuff but..i don't think you "rotate" a 2d texture to get a 3d effect. You either rotate a 3d model or render a sequence of 2d images represeting a planet that is rotating, each one drawing your planet in a different angle

  • Quote

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

A little fun project: https://www.curseforge.com/minecraft/mc-mods/two-players-one-horse

Share this post


Link to post
Share on other sites

Draco18s    2403

Draco18s

Draco18s    2403

  • Reality Controller
  • Draco18s
  • Members
  • 2403
  • 15926 posts
Posted November 17, 2020

The player is rendered in the inventory, which counts as rendering in a GUI.

But if you want a planet rotation effect, you can achieve it with a 2D scrolling image and a mask:

https://gamedev.stackexchange.com/questions/147193/imitate-a-textured-sphere-in-2d

  • Quote

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Klarks
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks · Posted 4 minutes ago

      Like this public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) { if(cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return getCapability(cap,side).cast(); } return super.getCapability(cap, side); }
    • diesieben07
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By diesieben07 · Posted 8 minutes ago

      Call getCapability.
    • Klarks
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks · Posted 24 minutes ago

      I dont understand how i can get them from my class
    • diesieben07
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By diesieben07 · Posted 29 minutes ago

      Yes, exactly.
    • Klarks
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks · Posted 39 minutes ago

      those handlers ? public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, @Nullable Direction facing) { if (this.isAlive() && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { if (facing == null) return handlers[2].cast(); else if (facing.getAxis().isVertical()) return handlers[0].cast(); else if (facing.getAxis().isHorizontal()) return handlers[1].cast(); } return super.getCapability(capability, facing); }  
  • Topics

    • Klarks
      10
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks
      Started 4 hours ago

    • Fars3O_
      1
      Minecraft forge not fully loading

      By Fars3O_
      Started 4 hours ago

    • BastouP
      3
      [1.16.4] Get Overworld save directory

      By BastouP
      Started 14 hours ago

    • Woodside
      15
      [1.15.2] Render as 2D icon in GUI, 3D model in hand

      By Woodside
      Started Sunday at 08:26 PM

    • CatSack
      1
      Forge unable to find model

      By CatSack
      Started 12 hours ago

  • Who's Online (See full list)

    • WildHeart
    • diesieben07
    • FreshMod
    • desht
    • Wintersky20
    • Terestriel
    • Klarks
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16] 3D render in a Screen
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community