About Store Forum Documentation Contact



Post Reply 
Two Questiosn
Author Message
Brainache Offline
Member

Post: #1
Two Questiosn
Hey there, couple quick questions:

1 - Is there a way to have a bump/normal map loaded into the material created, along with the diffuse texture, during the .x import via mesh editor?


2 - I need to have a viewport that renders only a specific object, can this be accomplished? (ie: I have a seperate viewport, using its own Render function that only renders solids, now I want to narrow it down to only rendering a specific solid... then have several different viewports, each rendering its own solid)

Thanks!
04-06-2009 01:41 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
Re: Two Questiosn
Hello,

1. X format supports only one texture per material, so it can't be done via importing, however you may drag and drop the textures manually after importing.

2. You can do this by using different Render functions, for example

Code:
void Render0()
{
// here render object A
}
void Render1()
{
// here render object B
}

are you using Gui Viewport (GViewport) or VIEWPORT?

if GViewport then you specify custom Render function in the GViewport object creation method 'create', like
Code:
gviewport.create(..,Render0);

if VIEWPORT then just call custom render function after setting the viewport, like

Code:
VIEWPORT custom;
void Draw()
{
  custom.set(..);
  Render0();
}

Let me know if something is not clear.
04-06-2009 02:30 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #3
Re: Two Questiosn
For #2... simple solution! I was already using a seperate render function... just changed it to call the draw function of the object like you suggest.. perfect...


for #1... what I was thinking was that if you a texture called "wall1.png" and in the same folder... a "wall1_bump.png"... it could just automatically put the wall1_bump into the normal slot of the material ( even tho it isnt mentioned in the .x file..) ie: have mesh editor look for a filename with "_bump" appended to the name..

I mention this becuase I am imported models with many different textures.. would save alot of time smile


Thanks!
04-06-2009 04:35 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
Re: Two Questiosn
sounds good, I'll try to look at the idea closer when I'll find the time smile
04-06-2009 09:16 PM
Find all posts by this user Quote this message in a reply
Post Reply