Jump to content

[No Version] 1.9, side specific dependencies, stencils and item rendering


Elix_x

Recommended Posts

Good day.

I don't want to create 4 specific topics for each question, so i will ask them all here.

 

1) 1.9 just came out, forge is probably waiting for mcp, but what changes to code and especially rendering should we expect?

 

2) My mod is using some rendering abilities of another mod. So this other mod is not required on server, but is on client. Is there simple way of telling this to forge?

 

3) By default in minecraft and forge, stencils are disabled (GL stencils). Why?

 

4) I'm currently in progress of moving my mod to 1.8.9 from 1.7.10. In 1.7.10 i "enabled"stencils with CoFHCore, because my items (with IItemRenderer) and tile entities were using them. Even if i will "enable" stencils in a different way/mod, how can i render my items, if there's no IItemRenderer?

 

Thanks for help!

If you have any questions - just ask!

Link to comment
Share on other sites

You won't be using manual rendering for items, from 1.8 on-wards. Item models are the future!

I know, the new item rendering cuts out a ton of flexibility and cool effects that you can use through the GL pipeline. However, it can break when several mods are trying to do all these effects at once. So to keep things simple, the items use baked models, which also speed up rendering a bit. It also means that resource pack authors can change some things in the model to suit the style of their textures.

 

It will take some getting used to for the migration. However, it is definitely worth while. Lots of headache is saved in the long run. Plus, even with the cuts to flexibility, the Forge team has worked really hard to give us as much opportunity with this new system, to side step some of the restrictions, and implement some of the flexibility we had before.

Link to comment
Share on other sites

You won't be using manual rendering for items, from 1.8 on-wards. Item models are the future!

I know, the new item rendering cuts out a ton of flexibility and cool effects that you can use through the GL pipeline. However, it can break when several mods are trying to do all these effects at once. So to keep things simple, the items use baked models, which also speed up rendering a bit. It also means that resource pack authors can change some things in the model to suit the style of their textures.

 

It will take some getting used to for the migration. However, it is definitely worth while. Lots of headache is saved in the long run. Plus, even with the cuts to flexibility, the Forge team has worked really hard to give us as much opportunity with this new system, to side step some of the restrictions, and implement some of the flexibility we had before.

I know about 1.8 rendering system and models. It's very flexible and usefull.

However, the coolest effects you can do with Open GL aren't possible. Luckily, it's not the case for most mods.

 

Tile entity still having TESR really helps.

But with items...

 

Actually, here's my mod's repository that i'm talking about, that uses stencils and other effects, as depths for rendering: https://github.com/elix-x/Teleplates.

Link to comment
Share on other sites

Unfortunately, the only way you'll be able to utilize direct calls is through means of overriding the default rendering system, which can mean conflicts.

 

So if it really is necessary to tweak the base classes to do so, then go for it. But it's heavily discouraged by the Forge team, simply on the fact that it has a high chance of breaking when used with other mods.

 

And actually, I've heard of people utilizing the getModel method in the item class to do direct GL calls. That's also discouraged do to the possibility to break, and may get patched. But that may be your easiest entry point for now. Good luck, and have fun.

Link to comment
Share on other sites

Unfortunately, the only way you'll be able to utilize direct calls is through means of overriding the default rendering system, which can mean conflicts.

 

So if it really is necessary to tweak the base classes to do so, then go for it. But it's heavily discouraged by the Forge team, simply on the fact that it has a high chance of breaking when used with other mods.

 

And actually, I've heard of people utilizing the getModel method in the item class to do direct GL calls. That's also discouraged do to the possibility to break, and may get patched. But that may be your easiest entry point for now. Good luck, and have fun.

I'm trying to not modifiy base classes in this case, but i've heard of that too. I think coolAlias is using it.

 

Still, thanks for help!

Link to comment
Share on other sites

1) No stencils will not be enabled by default but you cna opt-in to them yourself you don't need a library like cofh. They will never again be enabled by default in Forge because there are to many systems out there that break horribly when stencils are enabled. We have to support everyone do it's now a opt-in system instead of opt-out.

2) You SHOULD NOT be rendering your own things in 1.8+

3) Yes 99% of everything you have/want to do with rendering can be done with the model system

4) DO NOT RENDER GL CRAP MANUALLY.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

1) No stencils will not be enabled by default but you cna opt-in to them yourself you don't need a library like cofh. They will never again be enabled by default in Forge because there are to many systems out there that break horribly when stencils are enabled. We have to support everyone do it's now a opt-in system instead of opt-out.

So if it is opt-in, than what i/users have to put/do to enable stencils?

2) You SHOULD NOT be rendering your own things in 1.8+

3) Yes 99% of everything you have/want to do with rendering can be done with the model system

4) DO NOT RENDER GL CRAP MANUALLY.

But sadly, not all.

I'm not saying that i hate it, i'm just saying that it's very good and very optimized in 99.999%.

Some things are not possible without invoking GL calls, for example: drawing block even if it is not visible (disable depth) and intergrating one 3d world into another visible through flat surface (which is my case).

 

Also, what about 1.9?

And spectral glow effect (i haven't decompiled 1.9 yet, but it seems that it is using stencils)?

Link to comment
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.
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.