Horde3D

Next-Generation Graphics Engine
It is currently 17.11.2024, 07:07

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Some rendering questions
PostPosted: 20.05.2008, 18:57 
Offline

Joined: 15.05.2008, 05:32
Posts: 46
Location: California
Shouldn't these be properties of the material instead of the context? I'll end up with quite a lot of duplicated GLSL code... or am I missing something?
Code:
writeDepth     enable writing to depth buffer (Values: false, true) (Default: true) {optional}
blendMode    blend function (Values: REPLACE, BLEND, ADD, ADD_BLENDED, MULT) (Default: REPLACE) {optional}


Where is the testDepth property to enable/disable depth testing?

Where is the property to control backface culling?

Is there support for sorting of some objects to be rendered back-to-front relative to the camera?

Is there support for 'rendering layers' where I can define groups/layers of objects, and the render-order of these groups/layers?


Top
 Profile  
Reply with quote  
PostPosted: 20.05.2008, 20:21 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Hi roarflolo,

roarflolo wrote:
Shouldn't these be properties of the material instead of the context? I'll end up with quite a lot of duplicated GLSL code... or am I missing something?
Code:
writeDepth     enable writing to depth buffer (Values: false, true) (Default: true) {optional}
blendMode    blend function (Values: REPLACE, BLEND, ADD, ADD_BLENDED, MULT) (Default: REPLACE) {optional}

It makes sense that they are different for the contexts. A light pass should be additive while the ambient or early-z pass uses no blending (all contexts).

roarflolo wrote:
Where is the testDepth property to enable/disable depth testing?

Where is the property to control backface culling?

Yeah these are still missing but should be trivial to add.

roarflolo wrote:
Is there support for sorting of some objects to be rendered back-to-front relative to the camera?

Yes, this can be done in the pipeline (see pipeline docs).

roarflolo wrote:
Is there support for 'rendering layers' where I can define groups/layers of objects, and the render-order of these groups/layers?

You can realize such things with the pipeline in combination with the material classes. Have a look at the sample pipelines where translucent objects get special processing.


Top
 Profile  
Reply with quote  
PostPosted: 20.05.2008, 22:10 
Offline

Joined: 15.05.2008, 05:32
Posts: 46
Location: California
I admit I haven't read the pipeline/shader/material documentation properly yet... :) but does this make sense

Code:
<Material>
  <RenderConfig context="AMBIENT" writeDepth="true" blendMode="ADD" />
  <RenderConfig context="LIGHTING" writeDepth="false" blendMode="REPLACE" />
  <Shader source="standard.shader.xml" />
  <TexUnit unit="0" map="10m_build_01.png" />
</Material>


The reason I have a problem with these properties in the context is that the GLSL code is there as well, duplicating it, which makes it very hard to maintain once you get a few variations.


Top
 Profile  
Reply with quote  
PostPosted: 22.05.2008, 08:48 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
You will usually have clearly more materials than shaders. With your proposal you would have to add the context information manually to all materials (ColladaConv can't do that automatically), so this is real duplicatation effort ;)
Furthermore, I don't think that the blending params will usually vary so much for a shader context.


Top
 Profile  
Reply with quote  
PostPosted: 22.05.2008, 09:40 
Offline

Joined: 15.05.2008, 05:32
Posts: 46
Location: California
This information is in the Collada files (from Max or Maya materials) so the Collada converter can do this automatically.


Top
 Profile  
Reply with quote  
PostPosted: 22.05.2008, 18:49 
Offline

Joined: 18.05.2008, 17:47
Posts: 96
is there an easy way to make a material that uses 3 maps(diffuse,normal,specular) or do I need to create a shader myself for the material (thanks to parallax.shader I already have one for diffuse+normal, but too shiny :P )


Top
 Profile  
Reply with quote  
PostPosted: 22.05.2008, 18:51 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
kal wrote:
is there an easy way to make a material that uses 3 maps(diffuse,normal,specular) or do I need to create a shader myself for the material (thanks to parallax.shader I already have one for diffuse+normal, but too shiny :P )

You will need to create your own shader - but you should be able to copy/paste from parallax.shader and just add a couple of lines of code.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group