Adding more entityblend?

Blitz3D Forums/Blitz3D Beginners Area/Adding more entityblend?

Cubed Inc.(Posted 2010) [#1]
Does anyone know how to add a higher entity blend to an entity? I'm trying to make my entities have a glowish,bloomish effect without using any extensions, but it's incredibly slow and lags to much.
This was the code that I used to make my experimental effect.

This is the "Main.bb"
Include "CodePart1.bb"
Include "CodePart2.bb"
Graphics3D 800, 600, 0, 2

InitGraphics()

While Not KeyHit(1)
Render()
RenderWorld
Flip
Wend

This is the "CodePart1.bb"
Function InitGraphics()
Graphics3D 800, 600, 0, 2
SetBuffer BackBuffer()

AmbientLight 70,70,70

camera=CreateCamera()
PositionEntity camera,0,0,-10
light=CreateLight(2)
tex=LoadTexture ("media/ffg2.jpg")
CameraClsColor camera,0,0,10
stage=LoadMesh ("media/stage2.b3d")
EntityTexture stage,tex
ScaleEntity stage,.1,.1,.1

Flip
End Function

End

This is the "CodePart2.bb"
Function Render()
camera=CreateCamera()
AmbientLight 70,70,70
PositionEntity camera,0,0,-10
light=CreateLight(2)
tex=LoadTexture ("media/ffg2.jpg")
CameraClsColor camera,0,0,10
stage=LoadMesh ("media/stage2.b3d")
EntityTexture stage,tex
ScaleEntity stage,.1,.1,.1
EntityBlend stage,3

Flip
End Function

If you tried out the code, you would see how the glowish,bloomish effect starts to take effect after a little while, but it builds up too slowly,and it LAGS very much.

Once again, does anyone know how to add a higher blend effect?
Please reply,thanks;)


GfK(Posted 2010) [#2]
You're repeatedly loading meshes and creating lights/cameras in your main loop (via your Render() function), which is going to cause lag and a colossal memory leak.


Oiduts Studios(Posted 2010) [#3]
I can see he did not learn much once everyone just started pasting code in another thread...

First of all, you do not need includes in this stage of learning. Too many files will only get confusing for anyone.

Second, you do not need a function for everything. People in the other thread were just explaining that you can put anything in a function.

Look at your Render() function, you are calling it every loop. Under the declaration of the function, you are creating a camera, a light, and loading a mesh. Since you are creating so many entities, the program will lag and eventually crash like GfK said.


Cubed Inc.(Posted 2010) [#4]
Blitz Monkey
Please forget about the rude comment. Trust me, you know more about this than I do, so just please help me out with my question.


Cubed Inc.(Posted 2010) [#5]
sorry for the rude comment Blitz Monkey, it's just that no one seems to be helping me out with my question. Is there another way or teqnuique on how to increase the entityblend?


Ross C(Posted 2010) [#6]
....Rez?


GfK(Posted 2010) [#7]
sorry for the rude comment Blitz Monkey, it's just that no one seems to be helping me out with my question
What? I've told you what's wrong with it!

If this is your attitude when people try to help you, then I'll let you figure it out for yourself in future.

....Rez?
I imagine so - his surname is Suarez. You can change your name but you're stuck with your personality.


Cubed Inc.(Posted 2010) [#8]
will you just be quiet about my last name. It's spanish for god's sake. Now about the comment that I wrote to blitz monkey, I apologized, didn't I?
Why would you people judge my personality by a comment that I wrote and the last 3 letters of my last name. Yes, i'm sorry and i'm not a bad person. I knew what the problem was with my code, and I should of said that I knew what the problem was. I know my mistake, so how about we forget about my rude comment and get back on the topic please?

P.S Sorry about using the include code so much, t's just easier for me to use, that's all :)


Yasha(Posted 2010) [#9]
...TaGames joined these forums before Rez left, if the post dates are anything to go by.

Just throwing that out there.


Cubed Inc.(Posted 2010) [#10]
Ok, who's Rez?


Ross C(Posted 2010) [#11]
no matter :)


Cubed Inc.(Posted 2010) [#12]
oh, all right then. I just want to clarify that i'm not him:)


Warner(Posted 2010) [#13]
But erm, you didn't mean EntityShininess?