HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Wish-List] Render to Texture  (Read 2055 times)

XCalPro

  • General Accounts
  • *
  • Posts: 105
  • 3D Artist & HSL Coder
    • View Profile
    • Excalibur Productions
[Wish-List] Render to Texture
« on: Jan 18, 12, 08:19:44 AM »

Don't know if this is the appropriate forum for posting feature requests or if HE-Devs are taking feature requests at this point. I figure I would give it a shot anyway.

There is one thing that I would really like to see in HE that would truly make it the perfect engine for my project. I would like to be able to place cameras as object nodes and have those cameras render to texture for remote display on other objects. For example, this would allow me to create a security station with video cameras. This feature is available in Unity and would love to see something similar in HE.

The closest I have come to finding anything like this in HE is Virtual Stage, but that is limited to GUI displays and doesn't seem practical for what I intend.

Are there any plans to add a similar feature?
Logged
Tony Oliveira aka XCalPro
HeroEngine Projects: Traveller 6 Online - www.traveller6.com/forum/
Portfolio: www.xcalpro.com/art

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: [Wish-List] Render to Texture
« Reply #1 on: Jan 18, 12, 09:04:44 AM »

75% of our development work is on client to server communication, server backbone, and then on core systems, like seamless terrain, speedtree upgrades, etc. But we do try to add client based features that fit the needs of the widest range of developers in off updates. I'm not actually certain that we can't do what you're talking about, though my gut tells me no. But there are minimap systems in various games on the HeroEngine that effectively create textures by taking a top down image of the terrain. But I honestly don't know enough to know exactly what process is happening there.
Logged

XCalPro

  • General Accounts
  • *
  • Posts: 105
  • 3D Artist & HSL Coder
    • View Profile
    • Excalibur Productions
Re: [Wish-List] Render to Texture
« Reply #2 on: May 03, 12, 08:57:19 AM »

The Virtual Stage wiki alludes that you can render the stage to a texture and that "These created textures may also be used for objects in the world." Does this mean that you can apply these textures to game assets like a monitor or vidscreen?

There is a function; StageSaveTexture() that appears to provide this ability. Has anyone tried applying this to something other than a GUI?

If this can be done, then it would be the solution I have been looking for.



Logged
Tony Oliveira aka XCalPro
HeroEngine Projects: Traveller 6 Online - www.traveller6.com/forum/
Portfolio: www.xcalpro.com/art

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: [Wish-List] Render to Texture
« Reply #3 on: May 03, 12, 10:23:25 AM »

I would presume that the texture then is simply a snapshot of the stage at one particular time, so I am not sure how useful that is.

You can, however, create billboards from guis, and so can display a stage on one.  For instance, after the code at the end of the Virtual Stage page, add these lines:

Code: [Select]
  bb as NodeRef of Class BillboardNode = CreateBillboardFromGUIControl(window)
  bb["OrientationAxis"] = "NONE"
  bb["CentroidLocation"] = "BOTTOM"
  bb["Position"] = (0.2299435,-0.1, -0.2)
  bb["Rotation"] = (1.998987,-17.99088,0)

If you are standing at the origin, such as when entering a clean test area instance, you will see the billboard with the gui pasted on it.  You can even interact with it, such as clicking the close button.

One problem that I noticed in trying this is that the image does not update except when the cursor moves within the gui borders.  So you have to continually move the cursor around to see the character animate.  Rather disappointing.

Does anyone know a way to get a virtual stage which is rendered on a billboard to update on its own without moving the cursor on it?
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.