Jump to content

Recommended Posts

Posted

Hey,

 

I was wondering if it was possible to render a wireframe model (Like the attached image). Like a Holo-Projector which you right click and then a spinning hologram appears. Like in sci-fi movies.

 

I'd really appreciate any help.

 

Thanks.

1.jpg

Posted
4 hours ago, BerryHeyy said:

I was wondering if it was possible...

Yes.

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
1 minute ago, Draco18s said:

Yes.

Yeah. But how would I go about implementing it? Like a general idea. I have no clue on which functions to use or where to use them because I have never done any rendering outside of just blocks and json models.

Posted

Short answer: with pain

Long answer: You’re going to want to draw directly with the BufferBuilder in the RenderWorldLastEvent or a TESR. 

  • Haha 1

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

You should be pretty comfortable with rendering and computer graphics before attempting this. The best way to do this is to get your input data (the mountain), render it to a BufferBuilder (how you do it is tricky and up to you) and then render that BufferBuilder every frame in the RenderWorldLastEvent or your TESR. I have an example of how to render blocks this way at https://gist.github.com/Cadiboo/753607e41ca4e2ca9e0ce3b928bab5ef. Since your not rendering blocks, you don’t need to deal with a separate BufferBuilder for each render layer, and you can also just initialise the BufferBuilder statically (if the mountain data never changes) because you’re only concerned about your input data and nothing else.

 

You might be interested in https://github.com/Cadiboo/NoCubes/blob/751bffc602cbf18859969227218b5a0fb256e5c6/src/main/java/io/github/cadiboo/nocubes/client/ClientEventSubscriber.java#L462 where I do something very like what you’re aiming for. Looking over that code, I’m not sure why I start & draw multiple times when only once is necessary. I’ll go fix it.

 

I also do something very similar in https://github.com/Cadiboo/NoCubes/blob/751bffc602cbf18859969227218b5a0fb256e5c6/src/main/java/io/github/cadiboo/nocubes/client/render/RenderDispatcher.java#L365 however I don’t call draw each time. In this code I need to call draw and start in reverse order because of some weird side effects caused by BufferBuilder.noColor (which is called in the method right before my method that I have no control over). You likely won’t need to deal with this problem and should call start and draw in the moral order.

  • Like 1

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

I decided to give this a shot and was reasonably successful.
2019-05-20_13_53_03.thumb.png.dd0fefd5ea7531194168d056b200969d.png2019-05-20_14_24_51.thumb.png.8dc18676b1556ece4b0893e1d18f726b.png

Unfortunately I didn't manage to render anything meaningful. I took the test data from http://mikolalysenko.github.io/Isosurface/ but didn't get the same results. I'm guessing I made a mistake porting the code form JavaScript. My code is at https://github.com/Cadiboo/NoCubes/commit/cf5befe45d76dee246775e8f9d649266385b367e

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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.