Jump to content

Decals again


VeTaL
 Share

Recommended Posts

Continue developing weapons...

 

I saw some threads about decals, tried them, but engine cant find "bullethole.mat" ( http://leadwerks.com/werkspace/index.php?/topic/2786-decals-on-surface-from-bullets/ )

or cant render "dev_decal.mat" (i found this material in Decals folder, but can see nothing after shooting)

 

I would try to make my own decal material from this http://leadwerks.com/werkspace/index.php?/topic/439-are-decals-working-in-2-3/page__view__findpost__p__4152

but just interested: is there "official" way how to create decals in 2.40?

Working on LeaFAQ :)

Link to comment
Share on other sites

I tested this code

		//m_decalPos = TFormPoint(Vec3(pick.X,pick.Y,pick.Z), NULL, pick.entity);
		m_decalPos = Vec3(pick.X,pick.Y,pick.Z);

		TMesh _Decal = CreateDecal(pick.surface, m_decalPos, 20.0/16.0, 32); 

		EntityParent(_Decal , pick.entity, 0);
		PaintEntity(_Decal , LoadMaterial("abstract::dev_decal.mat"));

		AddMesh(_Decal , pick.entity);

 

and sometimes got a crash _Decal is "badPtr", sometimes right after starting level, sometimes after 20 shot.

Working on LeaFAQ :)

Link to comment
Share on other sites

This is my solution and video of crash: http://www.youtube.com/watch?v=heo9ow3L8-0

 

I create that cube to be sure that linepick works correctly: after second click in another point cube moves there, but decal may be left on the first point. Idk why ingame video is looking too fast, but you can note that decals are not visible and no errors (except final crash)

 

Uploaded wrong archive... 0_0

Also, got crash while load EXE file... what is going on with my notebook? :D

 

Re-uploaded archive, get it from fresh 2.40 (even with new newton.dll)

Working on LeaFAQ :)

Link to comment
Share on other sites

  • 7 months later...

Try:

 

texture0="abstract::shot1.dds"
alphatest=1
overlay=1
clamp0=1,1
castshadows=0
shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_alphatest.frag"

 

for your decal .mat file ...

 

you may need to adjust 20.0/16.0 in the creation of the decal .. to scale it.

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

franck22000 originally posted a bug in the tracker about the impact on FPS when getting closer to decals. It was lost in the data loss. He needs to re-state the issue as Josh cant remember what it refers to.

 

http://www.leadwerks.com/werkspace/tracker/issue-171-issue-with-decals-reloaded/

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...