Jump to content

Getting a refracting object to work


jamochawoke

Recommended Posts

Ok so I was inspired by the many times I've seen magic effects using the refract texture. I figured I could create a similar effect to make a "barrier" of some sorts.

 

So I made a huge sphere to be the barrier then gave it havok data in Blender and applied the refract.dds texture to it.

 

However, it showed up black in-game because the texture is literally a tiny black square and the normal file is the wavy-ripply stuff you see in the refract magic effect. Realized I had forgotten the normal file and voila it worked!....

 

Or not.

 

Turns out it's completely see-through. Is there some special way you have to use this texture to get it to work?

 

I'm trying to create a barrier around a building I don't want the player to get in to until quest objectives are met and figured a static using this texture would be the easiest way because then I could just disable it in a script and it would still be flashy... but is there a major difference in how Oblivion renders static meshes and say, a magic effect that uses a mesh and texture?

Link to comment
Share on other sites

Just for reference... Xilver got this to work on his Midas mods on multiple different meshes. They are animated but all they animate is the mesh size+direction... nothing complicated. But even when they aren't animating (pausing the game, in dialogue with an NPC, et cetera) they still refract the surroundings.

 

Here's an example of this:

 

 

 

The force push is just a sphere mesh with the refract.dds texture applied to it. How do I get the object to refract like that?

Link to comment
Share on other sites

I will put my money on the alpha. The alpha is set to a specific value, so it is partly invisible. Then it gets animated, and you get that nifty effects.

 

To make the barrier, you'd need:

 

1) The Barrier UVWed.

2) The animated texture.

3) The Alpha set right.

4) The script.

 

Other than that, it can be some Nifskope values that are off. I remember dabbling with particle systems, and "magic effects" some years back, and I remember having to spend tons of time inside Nifskope. I can't remember if it was relevant to this, or what I did, but I remember my modding time was testing and sitting i nifskope untill I got it right.

 

Sorry I can't be of more help!

 

Cheers,

Matth

Link to comment
Share on other sites

To make the barrier, you'd need:

 

1) The Barrier UVWed. -------------> Did this in Blender following a tutorial, pretty sure I did it right

 

 

--------------------------------------------

2) The animated texture.-----------------------|__ This is a Vanilla texture so I'm sure Bethesda did it right ;)

3) The Alpha set right.-------------------------|

--------------------------------------------

 

 

4) The script. ---------------------------> What script?

 

 

Link to comment
Share on other sites

What script?

Frankly, I got no idea >.< If it's just on a static object that doesnt move, you won't need one.

 

Okay, let's go down a notch: Exactly WHAT is the problem?

Link to comment
Share on other sites

That is very little information.

 

What should happen?

How does the original effect look?

What is the core difference between that and this?

Is the texture animated?

Did you set the animation on in Nifskope?

Does the animation loop?

Is the alpha fie?

Is the UVW fine?

Have you done anything in Nifskope? If so, what?

Have you done anything else than simply slapping on the texture?

 

If it is not the alpha, I believe you havn't done anything in Nifskope yet. You need to loop the animated texture.

 

Cheers,

Matth

Link to comment
Share on other sites

That is very little information.

 

What should happen?

 

The sphere should have the refraction effect included in the texture applied to it like all of the Vanilla items that do (oblivion gates, the soul trap casting effect before it shoots, the walls in Knights of the Nine near the end before you go into the spirit plane, et cetera).

 

How does the original effect look?

 

Like the Vanilla effect. Xilver literally just copied the effect on to his meshes for his spell like in the example above.

 

What is the core difference between that and this?

 

Mine does nothing, it just becomes an invisible mesh. Those apply the ripply refraction effect.

 

Is the texture animated?

 

I don't think so. AT least, it's not animated like the other Vanilla effects that are similar (like the Vanilla Shock Shield cast effect for instance which has multiple images that play in a loop as an animated texture). This just has one texture and no sequence. The texture is really small (almost like a pixel, which is just black) and has a normal map that has all the squiggly lines on it. I don't know how Bethesda makes this work for the Vanilla effects that use it and was hoping to learn from xilver how he did it but he never responded to any PMs to any of his accounts.

 

Did you set the animation on in Nifskope?

 

Don't know how to do this. I've only applied one animated texture before and that was using Blender when I UV wrapped the texture and it was a sequence of images.

 

Does the animation loop?

 

No idea.

 

Is the alpha fie?

 

It's a Bethesda vanilla texture.

 

Is the UVW fine?

 

It should be. All of the mesh is wrapped in that tiny little black square. The whole thing just turns invisible in-game.

 

Have you done anything in Nifskope? If so, what?

 

I messed with the niMaterialProperty to make it like xilver's nif files and I also tried changing the name of the niMaterialProperty to "Refract" just like in the Vanilla nifs. Neither worked.

 

Have you done anything else than simply slapping on the texture?

 

Anything I can. "Slapping on the texture" and doing minor adjustments on things like emissive properties and making glowmaps is about as complicated of things I have done before.

 

If it is not the alpha, I believe you havn't done anything in Nifskope yet. You need to loop the animated texture.

 

/facepalm

 

But thanks.

 

This is also used in the chameleon and invisibility effects as a shader and they point to the refract.dds texture as well.

Link to comment
Share on other sites

Make sure your normal map is right

 

It's not mine. It's Bethesda's literally unpacked from their Textures-compressed.bsa. Their normal is fine.

 

and make sure you have reflections turned on in your game play video settings.

 

Every other refraction effect works and this option is enabled.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...