I’ve been experimenting with realtime transparency (using GLSL, but Texture Face or multitexture works just as well) as a way to show pre-rendered volumetrics in realtime. This works very well with a really good framerate. However, there seems to be a directional dependence to the transparency. It’s probably better explained by the images… everything looks great from one direction, but viewed from behind things are not rendered correctly.
I’ve attached an example file, it only uses 1 texture to keep the file size down. Obviously this looks way more impressive using multiple images. I’m using Blender 2.49 but the effect is the same in 2.61.
Any thoughts would be hugely appreciated. I don’t keep up to date with Blender as much as I would like, so maybe there’s a better way to do this that I’ve missed.
Does anyone have any ideas ? I’ve found that the materials are processed correctly from all directions if I use TexFace materials and start game mode, but that’s the only way it works. But it would be so much more useful if it worked in normal realtime mode…
The reason that there are so many planes is because each one has a different texture. This is the classic “dupliframes” method for faking volumetrics.
(ok, in this example, I’m only using one texture to save file size - in practise I have hundreds of planes that all have different materials and textures assigned to them)
how do i get like in first pic !
You need to be in textured mode and turn on GLSL materials. EDIT : You might also want to scale the object down, or increase the clipping size of the 3D view as the mesh is quite big.
i assume here that this is seen from the 3D viewport
Yup !
alpha =1 so tranps is not used !
Actually there is a texture assigned to the material which multiplies the alpha values, so transparency is used.
what does the mist has to do with this ?
Umm… nothing… I never touched the mist options at all !
but you have already applied the dupliframe to make all these faces here !
Yes, but this makes no difference to the problem I’m seeing - it just means that instead of seeing some nice fluffy volumetric clouds, you see some weird-looking pillar structures. The difference in transparency effect that you see from looking from different angles is exactly the same.
sorry to ask but how does the alpha from mat affect the texture ?
texture has it’s own alpha value !
It’s the other way around - the texture is multiplying the alpha value of the material. Actually, although it’s a PNG file, this image doesn’t have its own true alpha values, those are just calculated based on the RGB values. So, because most of the image is black, most of the alpha of the material will be close to zero.
well we did some work on volume mat last year with NRK
so did you see this thread cause we did many different type of volumetric mat
one thing here not certain how you make your texture work in viewport
i mean even if you use GLSL it wont show generated texture only UV texture
and i don’t see your text being UV here
I haven’t seen that thread, could you post a link ?
Actually, GLSL textures don’t need to be UV mapped to show up correctly in the viewport - at least for planes. Cubic and spherical mapping doesn’t work, but planes are fine. Hopefully you can get the same display from the example file that I’m getting.
I already tried using UV mapping, but unfortunately that still has the same effect as in this example - transparency looks great from one direction, but horrible from the opposite.
but lost’s of pages and example you can ask NRK to have a look at your thread here
he might help
i tried again in texture mode and GLSL to see any proc texture on a plane
and sorry to say but cannot see it !
and don’t remember this is something yu can do with GLSL!
but i may be wrong !
mind you i don’t have a big vid card so may be i cannot do it !
i do remember seeing something a long time ago but not certain if this was with proc text or UV Text
so you want to see the inside of an object transp in the viewport
but does this object has some sort of proc textu inside too ?
like a volume mat with some volume texture inside ?
i mean you could make a smoke texture transp inside
do you have a pic showng a model like that apart of the first pic in your thread
it may give us a clue on how to do this in 2.6 !
can you make a single plane with text using GLSL and show pic of viewport then upload sample file
i’d like to test it on my vid card and see if it can do it and if i get same results then you !
Thanks for the link, will give it a good read. This technique definitely works for me ! Here is a flyaround video showing how things look using different images on each plane (again this is realtime, not a render). It also shows the weird transparency problem I’m having.
Cheers for looking at the file. Does the texture show up in the texture settings panel ? Pretty sure I packed the data, so it should be there…
but does this object has some sort of proc textu inside too ?
like a volume mat with some volume texture inside ?
The example file contains only a single image texture - nothing else. I guess if you wanted to you could pre-render procedural textures for realtime display. Personally I’m using it to look at radio astronomy data. It could make my life quite a lot easier if it worked properly…
I’ve attached a single-plane example file. It won’t show the transparency problem (you need multiple planes to see that) but hopefully you’ll be able to see a single plane with transparency. I also attached an image of what you should see on loading the file. All you should need to do is turn on GLSL.
From my tests I’ve found that 2.49 and 2.61 handle this in exactly the same way, so if you’re not seeing it in either version then I guess it could be your graphics card… we’ll need a third party to test this.
well here is what i see in 2.49 or even in 2.6
and i’v reloaded the text file.
so i guess i don’t see what you see i must be blind !LOL
but dont’ remember that GLSL can show proc texture anyway !
anyone can confirm this
now one thing if you add several layer of transp mat i don’t think they will stay transp after a few layer
i mean with well over 400 of layers it cannot be transp anymore !
there is too many layers anyway
so my guess is that you will have to use volume or may be go with voxels!
#13, #14. Texture image is png and packed into .blend. To experiment, i saved image on hd and reapplyed. Blender does not export/save any alpha information . File consisted of just RGB channels in exported .png. Had to add some alpha channel in gimp. Then it works in GLSL preview.
@ RickyBlender: Where, well, 4000 file rgba channel pixel values at some coordinates are 0, there it’ll be transparent if you summ them up…
Ignore if too late…
Sorry, red from beginning. So there is no alpha in texture file VolumeExample2, ok. Thing with calculated alpha seem do not work. All i see is black-red image in GLSL textured mode. No transparency at all in 3dviewport. In Material preview i see reddish transparent cube which suggest that something works nevertheless.
well here is what i see in 2.49 or even in 2.6
and i’v reloaded the text file.
Hmm, that’s interesting. You did have GLSL enabled (from the game menu)… right ? Just checking ! If you don’t then you won’t see the textures…
Could someone else take a look at the .blend ? Maybe it’s a video card thing. Unfortunately I don’t have access to any other machines I can install Blender on.
EDIT :
#13, #14. Texture image is png and packed into .blend. To experiment, i saved image on hd and reapplyed. Blender does not export/save any alpha information . File consisted of just RGB channels in exported .png. Had to add some alpha channel in gimp. Then it works in GLSL preview.
Thanks for looking ! It shouldn’t be necessary to generate an alpha map though… mine works fine just from RGB values… hmm…
I will take a look at those links. Actually I already have other scripts that can import data as verticies/cubes that are visible in the viewport. But this method of using image planes is potentially MUCH more powerful, because it uses a lot less memory. And because it works in realtime, that makes it really useful… making nice renders is great, but you can’t do a lot with them.