Jump to content

Recommended Posts

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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

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