Archived

This topic is now archived and is closed to further replies.

Mark Tanner

Extending PowerRender Part II

Recommended Posts

Mark Tanner    100
Hey Chris, With rendering custom data in PR is possible, I''ve been able to render custom model formats with no problem. Great stuff. This is the first time I''m getting seriously into PR, and have come across a few things related to this and a few other issues: 1. In your reply, you say: >>If you change the states you should also reset the PR_Globals.last_material and PR_Globals.last_method to negative numbers so it knows the states need to be updated.<< PR_Globals.last_material: this is a pointer; do I set it to NULL and PR_Globals.last_method to -1 at the exit of custom rendering functions to ''force'' PR to update? 2. Is it possible to use/access PR''s shadowing functions for rendering custom tris, or are there functions that would make writing shadowing easier? 3. Finally, regarding Q3convert. I understand that you don''t support entities, this makes sense. However for level designs its great to have access to the entity data and since you''re parsing the various bsp nodes anyway, would it be possible for you to write a quick new version that stores (some of) the entity node information in a seperate file? You could for example create an entity structure holding name and some useful attributes like location, etc. and save out an array of these structs to a file. For example, having just the names and locations will already allow for someone to ''add in'' characters/objects at runtime at the appropriate coordinates. As you know, the BSP functionality is one of the big favourites of PR users, I think this could be an quick but useful addon. Thanks for your time, Mark

Share this post


Link to post
Share on other sites
ChrisE    184
>PR_Globals.last_material: this is a pointer; do I set it to >NULL and PR_Globals.last_method to -1 at the exit of custom >rendering functions to ''force'' PR to update?

Yes. Just set them to something invalid and the renderer will know the states need to be changed.

>2. Is it possible to use/access PR''s shadowing functions for >rendering custom tris, or are there functions that would make >writing shadowing easier?

No. The engines stores edge connectivity data in the structures and it requires you to use PR''s object structures for making shadows.

>you''re parsing the various bsp nodes anyway, would it be >possible for you to write a quick new version that stores (some >of) the entity node information in a seperate file? You could >for example create an entity structure holding name and some

I believe the entities are still in the PBS file after conversion but I don''t do anything with them. I have no plans on using them since they contain Q3 specific things and can be done entirely in Landscape Studio by making your own packages. For example if you load the engine.dat package you''ll see a bunch of common icons for game logic that can be used for creature spawn points and more.



Author of Power Render (http:/www.powerrender.com)

Share this post


Link to post
Share on other sites