how to use texture on a cube entity?

Blitz3D Forums/Blitz3D Programming/how to use texture on a cube entity?

dman(Posted 2010) [#1]
I want to create a texture with a cube and have the cube transparent so only the texture show.

is it possible ? or another way to do it.


thanks


Warner(Posted 2010) [#2]
Could you post an example of this problem?


dman(Posted 2010) [#3]
sorry I can not, but what mean was to create a cube with a texture in 3d then make the cube invisible so only the texture show.


when I use cube transparency, the texture do not show.

I also tried changing the color of the cube to black it still do not show.

I'm using a black background.

any suggestions.

thanks


Krischan(Posted 2010) [#4]
Do you mean this effect? Try a transparent texture loaded with Flag 2 and use EntityFX 2,16 and 32 like in my example:



Use this texture and save it as "texture.png" in the same folder:




dman(Posted 2010) [#5]
Hi, I tried it and did not work.

I'm trying to create a knob control with the image.


Doggie(Posted 2010) [#6]
That's odd because I just ran that code and it does exactly what you said you were wanting. Another suggestion is to use a 3d model of the knob instead of a cube.


dman(Posted 2010) [#7]
I had thought of using a 3d model, I'll do that thanks very much.


Warner(Posted 2010) [#8]
sorry I can not
Why not? It is as easy as putting your code in your message. I think it is much better if you put a little effort in your post if you ask for people's help.


dman(Posted 2010) [#9]
I know, but it would have not made any sense to you cause its a very small part of the whole code and its also a project I'm working on.


don't mean to seem selfish, you know how it is.

but I appreciate the help very much.

here is one of my demos.

CLICK HERE


Warner(Posted 2010) [#10]
No, not the entire project offcourse, I was thinking more along the lines of a small demo or example that shows the problem. Usually, it helps a lot to be able to see the problem. It is more difficult when you have to guess what the problem is. Then the thread ends up like: is it this? no. and this? no..


_PJ_(Posted 2010) [#11]
I'm not sure I understand the problem, since if an entity has a texture applied to it, then of course making the object transparent would render the texture trasnparent (i.e. invisible) too.

Do you emant hat you want some form of alpha'd texture, so that only parts of the texture are visible?

If so, then I suspect that it would be much easier to use a cylinder instead or some other shaped object if as you say, Krischan's code is unsuitable...


it would have not made any sense to you cause its a very small part of the whole code
It's possibl that it's only the small part of the whole that we need in order to see where you're having problems.


dman(Posted 2010) [#12]
I'm going with 3d models, using 3ds format. when I loaded an 3ds file I get the mesh but no textures. do the 3ds format have the textures built in or separate file ?


I guess its built in.

how to show the textures.


Warner(Posted 2010) [#13]
Not built in. Open the 3ds file with Notepad. You'll see a lot of garbage, but if you enter a search for "jpg" or "png", depending on what texture you used, you see the filename of what it is looking for.
Try one of the example 3ds files that comes with blitz3d. You can find them in the \examples folder of the program.


dman(Posted 2010) [#14]
yes I see that I have to load the texture with it.

I use blender for my 3d and load as a 3ds format.

Is there an example of creating a knob and slider controls in blitz3d ?


I would like some code of it.


Warner(Posted 2010) [#15]
You could look at Schnok. It might have those controls, but I don't know:
http://www.blitzbasic.com/Community/posts.php?topic=62516


dman(Posted 2010) [#16]
This is what I was working on, trying to put controls on it when the files menu is off or hidden.


its written in BLITZ3D but I'm going to write it in another language cause it has the controls I need.

Please try it and let me know what you all think.

go here http://www.mediaandgames.com/media.html