Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Greetings! I have been dabbling with the TESR to create some interesting blocks and had an idea. Is it possible to use a fluid's texture (either flowing or still) as the UV map for the renderer? For a dumb example, if I wanted a cube to look like flowing water, is there a way for me to get that (animated) texture information into the ResourceLocation variable I'm using for my TESR? Thank you in advance! :-)

Able to differentiate the difference of a sum and an integral.

  • Author

I know how to grab a fluid's IIcon and use the Tessellator to render this in a GUI, but I can't find any way to bind this as the resource in the bindTexture() method...

Able to differentiate the difference of a sum and an integral.

  • Author

I saw that TextureMap.locationBlocksTexture returns a ResourceLocation (of course), but (correct me if I'm wrong), isn't this a giant map of all block textures in the game? How would I tell the renderer which portion of the map I would like to use to do the actual rendering? Thanks.

Able to differentiate the difference of a sum and an integral.

  • Author

I really don't see how IIcon is used in this way. I see that you can get the max/min U/V values from an IIcon, but I still don't understand how to use this in conjunction with the TextureMap in order to extract the specific texture desired. Is there a Vanilla class that does this sort of thing that I could look at for more information?

Able to differentiate the difference of a sum and an integral.

  • Author

I understand that much, I just can't figure out how to do that. I've been using .obj models for my TESR and using bindTexture(texture) method (where texture is a ResourceLocation). What you're saying is to use the TextureMap.locationsBlockTexture as the aforementioned texture, but then to (somehow) use the IIcon u/v info to limit the domain of the map which is being used correct? If so, I can't figure out how this is done. Is there any example I can learn from?

Able to differentiate the difference of a sum and an integral.

  • Author

Maybe I'm not completely clear as to what I'm trying to accomplish: I want my model to be textured with the fluid's texture. I know the fluid's texture is dynamic, but at this point I don't care about having it play its animation when rendered, I just want the entire model to look somewhat like the fluid.

 

As for "draw[ing] the fluid separate from the model", are you implying that I should use the Tessellator to do this? If so, then it's going to be very difficult for me to get my desired effect...

Able to differentiate the difference of a sum and an integral.

  • Author

Alright. Do you know of any other file types that could be used then? If you don't, that's fine; I'll just have to figure something else out...

Able to differentiate the difference of a sum and an integral.

  • Author

I was afraid of that...haha. My model has 482 vertices, so I think I'm going to have to simplify it a bit. Thanks for the help, though!

Able to differentiate the difference of a sum and an integral.

  • Author

Just thought I should post an update here: I simplified my model to have less than 200 vertices and created a Python script to create Tessellator code from the OBJ file. So, in short, I got what I wanted! I have my model that takes on the (animated) texture of any fluid I choose!

Able to differentiate the difference of a sum and an integral.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.