Jump to content

Particle problems


Michael Betke
 Share

Recommended Posts

I'm using this Emittereditor 1.0 and managed to make a nice underwater particle.

But after saving the emitter to .lua and placing it in my level the emitters are acting different.

 

My particle should flow in the air, rotate and move a bit. In Sandbox Editor it flows upwards very fast.

Plus the particles are flickering which looks odd.

In emitterEDitor theres all fine.

 

Here's the .lua I get exported:

require('scripts/class')

local class=CreateClass(...)

function class:CreateObject(model)
 local object=self.super:CreateObject(model)

 if fw~=nil then
	SetWorld(fw.transparency.world)
                   object.Unterwasser=CreateEmitter(100,20000,Vec3(0,0,0),0,object.model)
                   object.Unterwasser:SetPositionf(0,01,0,0,02)
                   object.Unterwasser:SetOrder(0, 0)
                   object.Unterwasser:Paint(LoadMaterial('abstract::unterwasser.mat'),0)
                   object.Unterwasser:SetRadius(0,2,0,2)
                   object.Unterwasser:SetColorf(1,1,1,1)
                   object.Unterwasser:SetWaver(0,5)
                   object.Unterwasser:SetVelocity(Vec3(-0,02,-0,01,0,01),Vec3(0,0,0))
                   object.Unterwasser:SetRotationSpeed(0,06)
                   object.Unterwasser:SetArea(Vec3(12,12,12))
                   SetEmitterAcceleration(object.Unterwasser, Vec3(0,0,0))
               SetWorld(fw.main.world)
end


function object:SetKey(key,value)
	if key=='color' then
	elseif key=='intensity' then
	else
		return self.super:SetKey(model,key,value)
	end
	return 1
end


function object:GetKey(key,value)
	if key=='color' then
	elseif key=='intensity' then
	else
		return self.super:GetKey(model,key,value)
	end
	return value
end

function object:Render()
end

end

 

Suggestions?

post-6-12671958224213_thumb.jpg

Pure3d Visualizations Germany - digital essences

AAA 3D Model Shop specialized on nature and environments

Link to comment
Share on other sites

Oh just found it out mayself. This is silly.

 

The Edmitter Editor exports like this:

 object.Unterwasser:SetPositionf(0,01,0,0,0,02)

 

But Leadwerks understands needs it with points and no commas

 object.Unterwasser:SetPositionf(0.01,0.0,0.02)

 

I need to change this in the .lua after export.

Maybe it will help someone else.

 

Seems I tunr into a coder now, hehe...

Pure3d Visualizations Germany - digital essences

AAA 3D Model Shop specialized on nature and environments

Link to comment
Share on other sites

hmmm weird... your code just crashes my editor no matter what... but in any case, why are you re-inventing the wheel? the emitter entity that comes with the editor has all of the options that you are setting and you dont even have to touch the script... just change the properties dialog to the settings you want...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

has anything changed since the particle editor was created and 2.31 ? ... but I agree with mack try setting up a normal emiiter in the editor to your settings, atleast then you have a comparison? :)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

I used the Emitter Editor because it seems to be a nice program. Plus it can export my emitters so I can reuse them like models in several levels.

With the build in emitter I have to set it up each time again.

This is the main reason.

Pure3d Visualizations Germany - digital essences

AAA 3D Model Shop specialized on nature and environments

Link to comment
Share on other sites

I agree it seems like a nice program but was created a "few syncs" ago and maybe needs updating? I thought it just saved the a script? dont yu still have to create the object and folder?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...