Rendercam - Universal Camera Library

Using rendercam as lua module make it easy to work with multiple cameras. Old module fork https://github.com/d954mas/2.5d-shooter/blob/master/rendercam/rendercam_camera.lua I have better module in my current private project, with all other rendercam functions. I will try move it to github some time later.

You can use go functions in renderscript. You need to save script instance in go. Then change that script instance in renderscript.

4 Likes

Cool, I’ll have to check out how you’re using that.

Yeah, I’m aware of the script-instance thing. I should have said, “use multiple cameras without a Native Extension”. I didn’t really want to require everyone to use a Native Extension to use Rendercam, but maybe that’s stupid.

In my own ‘dev’ branch I am using the hacky lua technique of modifying the globals table to change the script instance.

3 Likes

I am using the hacky lua technique

It is fine to use temporary solutions in order to move things forward while advocating for real solutions.

I haven’t seen anyone post a snippet for this, so here is mine if anyone needs it
local rendercam = require “rendercam.rendercam”

function init(self)	
	self.url = msg.url()
	rendercam.add_window_listener(self.url)
	self.ratio = rendercam.window.x / rendercam.window.y
end
function on_message(self, message_id, message, sender)	
	if (message_id == hash("window_update")) then
		if (message.aspect > self.ratio) then
			rendercam.activate_camera(hash("/camera2"))
		else
			rendercam.activate_camera(hash("/camera1"))
		end
	end	
end
1 Like

@Pkeod PBR is definately possible, but not easy. I made some examples with normal mapping for tangent stuff, but it’s using mesh buffers for that so it’s not a drag n drop solution. It would be nice to have that as part of the import process however, but I don’t know if @JCash has any input on it?

3 Likes

Our mesh component is currently purposefully manual, in order to give most control to our users.
However for the model component, I see us supporting a custom vertex declaration later on, and as such import any tangent space data (or other custom data) from the models.

2 Likes

A bit late to the party. I’m quietly alarmed at the words “retire rendercam” as I’m actively using it, and loving it, in my projects!

I use Rendercam for 3D projects and Orthographic for 2D projects. A minimal 3D only camera sounds like a great idea to me.

To me, a well maintained camera extension is important in any engine. It’s one of those make or break things that newcomers are likely to immediately start using, and see as a core part of the engine. Having two options, Orthographic, which is superb, and its 3D counterpart would be ace.

7 Likes

+1 :blush:

4 Likes

I agree. RenderCam is great. But it is also quite stable and would work in its current state for a long time. We do not plan to introduce any breaking changes the APIs used by render cam.

3 Likes

No worries, I wasn’t planning on deleting the repository or anything. I’m not actively maintaining it, that’s all I really meant. Though it does seem to be pretty stable, albeit quirky.

7 Likes

For some (very mysterious I guess) reasons it’s not working now. I’m trying to make 2D lighting along with rendercam (last github version) but with this I get just black screen instead of something.
Any advices?

No idea, I’ll check it out today though.

…or today. :upside_down_face:
I just tried building from the editor, both native (linux) and HMTL5, and it ran just fine. Did you change the project at all, can you re-download to make sure? What platform are you on?

1 Like

Hey buddy! I thought the extension was missing an “actuall” camera so I modeled one myself! I forked the repository, but feel free to ad the mesh and material to the original repo. https://github.com/Caue-Aron/rendercam

6 Likes

Thanks!

3 Likes