Page 1 of 1

[ogre] catchmesh(), catchtexture(), catchmaterial() or ...

Posted: Fri Jul 04, 2008 8:28 am
by djes
As I'm doing encryption for all other PB objects, I use a lot "catch" functions. Badly, there's no catchmesh(), catchtexture(), catchmaterial().
If it can't be done, maybe you can add a password protected zip reading, eg

Code: Select all

Add3DArchive("MyData.zip", #PB_3DArchive_Zip,"my_password")
Thanx! :)

Re: [ogre] catchmesh(), catchtexture(), catchmaterial() or .

Posted: Mon Sep 07, 2015 4:44 am
by J. Baker
Catching the mesh, skeleton, and so forth would be nice. Maybe in 5.40, Fred? :D

Re: [ogre] catchmesh(), catchtexture(), catchmaterial() or .

Posted: Mon Sep 07, 2015 7:40 am
by DK_PETER
(@Djes - Just saw, that it was a very old post getting bumped, so this is mostly to J. Baker).

Personally, I don't see the reason for embedding meshes. Your exe is gonna get massive real quick
and I guarantee you, that the majority is really not interested in your meshes, material scripts
or textures. There are LOTS of free stuff out there.

Anyway, if you feel it's REALLY important to "protect" your work...
Material scripts are simply text and can easily be imbedded.
Meshes can be embedded as binaries..I wouldn't do it myself, though. :-)
Textures are images and can be embedded and fetched with catchimage()

ex:

Code: Select all

InitEngine3D()
InitSprite()

UseJPEGImageDecoder()

OpenWindow(0, 0, 0, 800, 600, "BlitzTest")
OpenWindowedScreen(WindowID(0), 0, 0, 800, 600)

Procedure.i CatchTexture(Index.i)
  Protected tx.i, im.i
  Select Index
    Case 0
      im = CatchImage(#PB_Any, ?TheImage)
    Case 1
      ;
  EndSelect
  tx = CreateTexture(#PB_Any, ImageWidth(im), ImageHeight(im))
  StartDrawing(TextureOutput(tx))
  DrawImage(ImageID(im),0,0)
  StopDrawing()
  ProcedureReturn tx
EndProcedure

Debug CatchTexture(0)
End

DataSection
  TheImage:
  IncludeBinary "G:\atlantis.jpg"
EndDataSection
But..You never know...The team might implement your requests. :-)

Re: [ogre] catchmesh(), catchtexture(), catchmaterial() or .

Posted: Mon Sep 07, 2015 1:36 pm
by djes
Look at the date of my post ;)
Anyway, for some projects, it would be nice to be able to protect the 3D work, to avoid things like cheat, robbery, or whatever the humain brain is capable of !
And for the "catch" things, maybe for portable apps, easy to give away.

Re: [ogre] catchmesh(), catchtexture(), catchmaterial() or ...

Posted: Mon Mar 10, 2025 9:44 pm
by Mijikai
+1

Re: [ogre] catchmesh(), catchtexture(), catchmaterial() or ...

Posted: Mon Mar 10, 2025 11:00 pm
by skinkairewalker
+1

Re: [ogre] catchmesh(), catchtexture(), catchmaterial() or ...

Posted: Sat Mar 15, 2025 1:59 am
by miso
catchtexture() +1
(for me it's not for protection)
(Also a bit more texture control would be nice. Ability to manually control mipmap levels, not always autogenerated. Mipmap distances or sometimes to disallow it. Ability to directly load a texture outside the scope of the parse3dscripts() part. 2d drawing is a bit slow on textureoutput().)